1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00
nixpkgs/doc/functions/shell.xml

25 lines
830 B
XML
Raw Normal View History

2018-10-02 19:16:27 +01:00
<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">
2018-10-02 20:59:59 +01:00
<title>pkgs.mkShell</title>
2018-10-02 19:16:27 +01:00
2018-10-02 20:59:59 +01:00
<para>
2019-09-18 21:12:54 +01:00
<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>.
2018-10-02 20:59:59 +01:00
</para>
2018-10-02 19:16:27 +01:00
2018-10-02 20:59:59 +01:00
<section xml:id="sec-pkgs-mkShell-usage">
<title>Usage</title>
2018-10-02 19:16:27 +01:00
2018-10-02 20:59:59 +01:00
<programlisting><![CDATA[
2018-10-02 19:16:27 +01:00
{ 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>
2018-10-02 20:59:59 +01:00
</section>
2018-10-02 19:16:27 +01:00
</section>