diff --git a/doc/language-support.xml b/doc/language-support.xml
index f33202d4553..5fb123ddfc1 100644
--- a/doc/language-support.xml
+++ b/doc/language-support.xml
@@ -283,24 +283,24 @@ are provided with all modules included.
pkgs/development/python-modules/generic/default.nix.
Example usage:
-
- twisted = buildPythonPackage {
- name = "twisted-8.1.0";
-
- src = pkgs.fetchurl {
- url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
- sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
- };
-
- propagatedBuildInputs = [ self.ZopeInterface ];
-
- meta = {
- homepage = http://twistedmatrix.com/;
- description = "Twisted, an event-driven networking engine written in Python";
- license = stdenv.lib.licenses.mit;
- };
- };
-
+
+twisted = buildPythonPackage {
+ name = "twisted-8.1.0";
+
+ src = pkgs.fetchurl {
+ url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
+ sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
+ };
+
+ propagatedBuildInputs = [ self.ZopeInterface ];
+
+ meta = {
+ homepage = http://twistedmatrix.com/;
+ description = "Twisted, an event-driven networking engine written in Python";
+ license = stdenv.lib.licenses.mit;
+ };
+};
+
Most of Python packages that use buildPythonPackage are defined
in pkgs/top-level/python-packages.nix
@@ -428,16 +428,14 @@ are provided with all modules included.
Create Python environments using low-level pkgs.buildEnv function. Example default.nix:
-
- {};
-
- python.buildEnv.override {
- extraLibs = [ pkgs.pythonPackages.pyramid ];
- ignoreCollisions = true;
- }
- ]]>
-
+
+ {};
+
+python.buildEnv.override {
+ extraLibs = [ pkgs.pythonPackages.pyramid ];
+ ignoreCollisions = true;
+}]]>
+
Running nix-build will create
/nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env
@@ -507,22 +505,23 @@ exist in community to help save time. No tool is preferred at the moment.
${python.interpreter} setup.py develop for the package.
+ shellPhase is executed only if setup.py
+ exists.
+
Given a default.nix:
-
- {};
-
- buildPythonPackage {
- name = "myproject";
-
- buildInputs = with pkgs.pythonPackages; [ pyramid ];
-
- src = ./.;
- }
- ]]>
-
+
+ {};
+
+buildPythonPackage {
+ name = "myproject";
+
+ buildInputs = with pkgs.pythonPackages; [ pyramid ];
+
+ src = ./.;
+}]]>
+
Running nix-shell with no arguments should give you
the environment in which the package would be build with
@@ -615,11 +614,11 @@ sed -i '/ = data_files/d' setup.py
Ruby
For example, to package yajl-ruby package, use gem-nix:
-
- $ nix-env -i gem-nix
- $ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
- $ nix-build -A rubyPackages.yajl-ruby
-
+
+$ nix-env -i gem-nix
+$ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
+$ nix-build -A rubyPackages.yajl-ruby
+