nixpkgs-suyu/doc/functions/shell.xml

25 lines
830 B
XML
Raw Normal View History

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