diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-05-25 00:10:20 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-05-25 00:10:20 +0000 |
commit | c6e65bd1c65376d1c844466db58f9726fb72f368 (patch) | |
tree | 429138772ec714b4720f6ef6a2909a9892af0afc /doc/language-support.xml | |
parent | f08797b1a381477b41fd4660dddf971af8147f7a (diff) |
doc: Mention `buildPythonPackage'.
svn path=/nixpkgs/trunk/; revision=15718
Diffstat (limited to 'doc/language-support.xml')
-rw-r--r-- | doc/language-support.xml | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/doc/language-support.xml b/doc/language-support.xml index d1a85974d6723..2e88a5ad9a5d1 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -13,7 +13,7 @@ in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter.</para> -<section><title>Perl</title> +<section xml:id="ssec-language-perl"><title>Perl</title> <para>Nixpkgs provides a function <varname>buildPerlPackage</varname>, a generic package builder function for any Perl package that has a @@ -156,7 +156,42 @@ ClassC3Componentised = buildPerlPackage rec { <section><title>Python</title> -<para>TODO</para> +<para> + Python packages that + use <link xlink:href="http://pypi.python.org/pypi/setuptools/"><literal>setuptools</literal></link>, + which many Python packages do nowadays, can be built very simply using + the <varname>buildPythonPackage</varname> function. This function is + implemented + in <link xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/python-modules/generic/default.nix"><filename>pkgs/development/python-modules/generic/default.nix</filename></link> + and works similarly to <varname>buildPerlPackage</varname>. (See + <xref linkend="ssec-language-perl"/> for details.) +</para> + +<para> + Python packages that use <varname>buildPythonPackage</varname> are + defined + in <link xlink:href="https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/top-level/python-packages.nix"><filename>pkgs/python-packages.nix</filename></link>. + Most of them are simple. For example: + + <programlisting> +twisted = buildPythonPackage { + name = "twisted-8.1.0"; + + src = fetchurl { + url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; + sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; + }; + + propagatedBuildInputs = [ pkgs.ZopeInterface ]; + + meta = { + homepage = http://twistedmatrix.com/; + description = "Twisted, an event-driven networking engine written in Python"; + license = "MIT"; + }; +}; + </programlisting> +</para> </section> @@ -182,4 +217,4 @@ ClassC3Componentised = buildPerlPackage rec { </section> -</chapter> \ No newline at end of file +</chapter> |