@@ -283,24 +283,24 @@ are provided with all modules included.</para>
283283 <filename>pkgs/development/python-modules/generic/default.nix</filename></link>.
284284 Example usage:
285285
286− <programlisting language="nix">
287− twisted = buildPythonPackage {
288− name = "twisted-8.1.0";
289−
290− src = pkgs.fetchurl {
291− url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
292− sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
293− };
294−
295− propagatedBuildInputs = [ self.ZopeInterface ];
296−
297− meta = {
298− homepage = http://twistedmatrix.com/;
299− description = "Twisted, an event-driven networking engine written in Python";
300− license = stdenv.lib.licenses.mit;
301− };
302− };
303− </programlisting>
286+<programlisting language="nix">
287+twisted = buildPythonPackage {
288+ name = "twisted-8.1.0";
289+
290+ src = pkgs.fetchurl {
291+ url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
292+ sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
293+ };
294+
295+ propagatedBuildInputs = [ self.ZopeInterface ];
296+
297+ meta = {
298+ homepage = http://twistedmatrix.com/;
299+ description = "Twisted, an event-driven networking engine written in Python";
300+ license = stdenv.lib.licenses.mit;
301+ };
302+};
303+</programlisting>
304304
305305 Most of Python packages that use <varname>buildPythonPackage</varname> are defined
306306 in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>
@@ -428,16 +428,14 @@ are provided with all modules included.</para>
428428 <para>
429429 Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
430430
431− <programlisting language="nix">
432− <![CDATA[
433− with import <nixpkgs> {};
434−
435− python.buildEnv.override {
436− extraLibs = [ pkgs.pythonPackages.pyramid ];
437− ignoreCollisions = true;
438− }
439− ]]>
440− </programlisting>
431+<programlisting language="nix">
432+<![CDATA[with import <nixpkgs> {};
433+
434+python.buildEnv.override {
435+ extraLibs = [ pkgs.pythonPackages.pyramid ];
436+ ignoreCollisions = true;
437+}]]>
438+</programlisting>
441439
442440 Running <command>nix-build</command> will create
443441 <filename>/nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env</filename>
@@ -507,22 +505,23 @@ exist in community to help save time. No tool is preferred at the moment.
507505 <command>${python.interpreter} setup.py develop</command> for the package.
508506 </para>
509507
508+ <warning><para><varname>shellPhase</varname> is executed only if <filename>setup.py</filename>
509+ exists.</para></warning>
510+
510511 <para>
511512 Given a <filename>default.nix</filename>:
512513
513− <programlisting language="nix">
514− <![CDATA[
515− with import <nixpkgs> {};
516−
517− buildPythonPackage {
518− name = "myproject";
519−
520− buildInputs = with pkgs.pythonPackages; [ pyramid ];
521−
522− src = ./.;
523− }
524− ]]>
525− </programlisting>
514+<programlisting language="nix">
515+<![CDATA[with import <nixpkgs> {};
516+
517+buildPythonPackage {
518+ name = "myproject";
519+
520+ buildInputs = with pkgs.pythonPackages; [ pyramid ];
521+
522+ src = ./.;
523+}]]>
524+</programlisting>
526525
527526 Running <command>nix-shell</command> with no arguments should give you
528527 the environment in which the package would be build with
@@ -615,11 +614,11 @@ sed -i '/ = data_files/d' setup.py</programlisting>
615614<section xml:id="ssec-language-ruby"><title>Ruby</title>
616615 <para>For example, to package yajl-ruby package, use gem-nix:</para>
617616
618− <screen>
619− $ nix-env -i gem-nix
620− $ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
621− $ nix-build -A rubyPackages.yajl-ruby
622− </screen>
617+<screen>
618+$ nix-env -i gem-nix
619+$ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
620+$ nix-build -A rubyPackages.yajl-ruby
621+</screen>
623622</section>
624623
625624