diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/builders/special.xml | 2 | ||||
-rw-r--r-- | doc/builders/special/mkshell.section.md | 15 | ||||
-rw-r--r-- | doc/builders/special/mkshell.xml | 24 |
3 files changed, 16 insertions, 25 deletions
diff --git a/doc/builders/special.xml b/doc/builders/special.xml index 15fdba9a0419..09115751d6a7 100644 --- a/doc/builders/special.xml +++ b/doc/builders/special.xml @@ -6,5 +6,5 @@ This chapter describes several special builders. </para> <xi:include href="special/fhs-environments.xml" /> - <xi:include href="special/mkshell.xml" /> + <xi:include href="special/mkshell.section.xml" /> </chapter> diff --git a/doc/builders/special/mkshell.section.md b/doc/builders/special/mkshell.section.md new file mode 100644 index 000000000000..1feb75cbd6f7 --- /dev/null +++ b/doc/builders/special/mkshell.section.md @@ -0,0 +1,15 @@ +# pkgs.mkShell {#sec-pkgs-mkShell} + +`pkgs.mkShell` is a special kind of derivation that is only useful when using it combined with `nix-shell`. It will in fact fail to instantiate when invoked with `nix-build`. + +## Usage {#sec-pkgs-mkShell-usage} + +```nix +{ pkgs ? import <nixpkgs> {} }: +pkgs.mkShell { + # this will make all the build inputs from hello and gnutar + # available to the shell environment + inputsFrom = with pkgs; [ hello gnutar ]; + buildInputs = [ pkgs.gnumake ]; +} +``` diff --git a/doc/builders/special/mkshell.xml b/doc/builders/special/mkshell.xml deleted file mode 100644 index cef65d06b882..000000000000 --- a/doc/builders/special/mkshell.xml +++ /dev/null @@ -1,24 +0,0 @@ -<section xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - xml:id="sec-pkgs-mkShell"> - <title>pkgs.mkShell</title> - - <para> - <function>pkgs.mkShell</function> is a special kind of derivation that is only useful when using it combined with <command>nix-shell</command>. It will in fact fail to instantiate when invoked with <command>nix-build</command>. - </para> - - <section xml:id="sec-pkgs-mkShell-usage"> - <title>Usage</title> - -<programlisting><![CDATA[ -{ pkgs ? import <nixpkgs> {} }: -pkgs.mkShell { - # this will make all the build inputs from hello and gnutar - # available to the shell environment - inputsFrom = with pkgs; [ hello gnutar ]; - buildInputs = [ pkgs.gnumake ]; -} -]]></programlisting> - </section> -</section> |