This commit is contained in:
Domen Kožar 2015-02-15 18:22:14 +01:00
parent 59d2ab6563
commit ef8aaa5571

View File

@ -429,14 +429,12 @@ are provided with all modules included.</para>
Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>: Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
<programlisting language="nix"> <programlisting language="nix">
<![CDATA[ <![CDATA[with import <nixpkgs> {};
with import <nixpkgs> {};
python.buildEnv.override { python.buildEnv.override {
extraLibs = [ pkgs.pythonPackages.pyramid ]; extraLibs = [ pkgs.pythonPackages.pyramid ];
ignoreCollisions = true; ignoreCollisions = true;
} }]]>
]]>
</programlisting> </programlisting>
Running <command>nix-build</command> will create Running <command>nix-build</command> will create
@ -507,12 +505,14 @@ exist in community to help save time. No tool is preferred at the moment.
<command>${python.interpreter} setup.py develop</command> for the package. <command>${python.interpreter} setup.py develop</command> for the package.
</para> </para>
<warning><para><varname>shellPhase</varname> is executed only if <filename>setup.py</filename>
exists.</para></warning>
<para> <para>
Given a <filename>default.nix</filename>: Given a <filename>default.nix</filename>:
<programlisting language="nix"> <programlisting language="nix">
<![CDATA[ <![CDATA[with import <nixpkgs> {};
with import <nixpkgs> {};
buildPythonPackage { buildPythonPackage {
name = "myproject"; name = "myproject";
@ -520,8 +520,7 @@ exist in community to help save time. No tool is preferred at the moment.
buildInputs = with pkgs.pythonPackages; [ pyramid ]; buildInputs = with pkgs.pythonPackages; [ pyramid ];
src = ./.; src = ./.;
} }]]>
]]>
</programlisting> </programlisting>
Running <command>nix-shell</command> with no arguments should give you Running <command>nix-shell</command> with no arguments should give you