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>:
<programlisting language="nix">
<![CDATA[
with import <nixpkgs> {};
<![CDATA[with import <nixpkgs> {};
python.buildEnv.override {
extraLibs = [ pkgs.pythonPackages.pyramid ];
ignoreCollisions = true;
}
]]>
}]]>
</programlisting>
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.
</para>
<warning><para><varname>shellPhase</varname> is executed only if <filename>setup.py</filename>
exists.</para></warning>
<para>
Given a <filename>default.nix</filename>:
<programlisting language="nix">
<![CDATA[
with import <nixpkgs> {};
<![CDATA[with import <nixpkgs> {};
buildPythonPackage {
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 ];
src = ./.;
}
]]>
}]]>
</programlisting>
Running <command>nix-shell</command> with no arguments should give you