Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 26 lines 834 B view raw
1<section xmlns="http://docbook.org/ns/docbook" 2 xmlns:xlink="http://www.w3.org/1999/xlink" 3 xmlns:xi="http://www.w3.org/2001/XInclude" 4 xml:id="sec-pkgs-mkShell"> 5 <title>pkgs.mkShell</title> 6 7 <para> 8 <function>pkgs.mkShell</function> is a special kind of derivation that is 9 only useful when using it combined with <command>nix-shell</command>. It will 10 in fact fail to instantiate when invoked with <command>nix-build</command>. 11 </para> 12 13 <section xml:id="sec-pkgs-mkShell-usage"> 14 <title>Usage</title> 15 16<programlisting><![CDATA[ 17{ pkgs ? import <nixpkgs> {} }: 18pkgs.mkShell { 19 # this will make all the build inputs from hello and gnutar 20 # available to the shell environment 21 inputsFrom = with pkgs; [ hello gnutar ]; 22 buildInputs = [ pkgs.gnumake ]; 23} 24]]></programlisting> 25 </section> 26</section>