about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2009-05-24 12:20:08 +0000
committerMichael Raskin <7c6f434c@mail.ru>2009-05-24 12:20:08 +0000
commitf4e6e80bcf6113f570a9fb440185c11a1c31af7c (patch)
treee6e01ae89c7c2f5f04a57cd18db70bc7bcb75697 /pkgs/development/python-modules
parented69e9ed944f2196f248d78cd13ab48098b7a3db (diff)
Restoring builderDefs functionality in setuptools
svn path=/nixpkgs/trunk/; revision=15697
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/setuptools/default.nix35
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/setuptools/default.nix b/pkgs/development/python-modules/setuptools/default.nix
index c94b6369f035b..a187b67863051 100644
--- a/pkgs/development/python-modules/setuptools/default.nix
+++ b/pkgs/development/python-modules/setuptools/default.nix
@@ -1,21 +1,34 @@
-{ fetchurl, stdenv, python, makeWrapper }:
-
-stdenv.mkDerivation rec {
-  name = "setuptools-0.6c9";
+a :  
+let 
+  fetchurl = a.fetchurl;
+
+  version = a.lib.getAttr ["version"] "0.6c9" a; 
+  buildInputs = with a; [
+    python makeWrapper
+  ];
+in
+rec {
+  name = "setuptools-" + version;
 
   src = fetchurl {
     url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz";
     sha256 = "1n5k6hf9nn69fnprgsnr9hdxzj2j6ir76qcy9d4b2v0v62bh86g6";
   };
 
-  buildInputs = [ python makeWrapper ];
+  inherit buildInputs;
+  configureFlags = [];
 
   doCheck = true;
 
-  buildPhase     = "python setup.py build --build-base $out";
-  checkPhase     = "python setup.py test";
+  doMakeCheck = a.fullDepEntry (''
+    python setup.py test
+  '') ["minInit" "doUnpack" "addInputs" "doBuild"];
+
+  doBuild = a.fullDepEntry(''
+    python setup.py build --build-base $out
+  '') ["addInputs" "doUnpack"];
 
-  installPhase   = ''
+  doInstall = a.fullDepEntry(''
     ensureDir "$out/lib/python2.5/site-packages"
 
     PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \
@@ -27,11 +40,13 @@ stdenv.mkDerivation rec {
         --prefix PYTHONPATH ":"			\
           "$out/lib/python2.5/site-packages"
     done
-  '';
+  '') ["doBuild"];
+
+  phaseNames = ["doBuild" "doInstall"];
 
   meta = {
     description = "Utilities to facilitate the installation of Python packages";
     homepage = http://pypi.python.org/pypi/setuptools;
     licenses = [ "PSF" "ZPL" ];
-  };
+  };    
 }