From c6e65bd1c65376d1c844466db58f9726fb72f368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 25 May 2009 00:10:20 +0000 Subject: [PATCH] doc: Mention `buildPythonPackage'. svn path=/nixpkgs/trunk/; revision=15718 --- doc/language-support.xml | 41 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/doc/language-support.xml b/doc/language-support.xml index d1a85974d67..2e88a5ad9a5 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. -
Perl +
Perl Nixpkgs provides a function buildPerlPackage, a generic package builder function for any Perl package that has a @@ -156,7 +156,42 @@ ClassC3Componentised = buildPerlPackage rec {
Python -TODO + + Python packages that + use setuptools, + which many Python packages do nowadays, can be built very simply using + the buildPythonPackage function. This function is + implemented + in pkgs/development/python-modules/generic/default.nix + and works similarly to buildPerlPackage. (See + for details.) + + + + Python packages that use buildPythonPackage are + defined + in pkgs/python-packages.nix. + Most of them are simple. For example: + + +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"; + }; +}; + +
@@ -182,4 +217,4 @@ ClassC3Componentised = buildPerlPackage rec {
- \ No newline at end of file +