nixpkgs/pkgs/development/python-modules/setuptools/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, python, wrapPython }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
2013-07-27 20:51:54 +02:00
name = "${python.executable}-${shortName}";
2013-12-29 19:15:22 +01:00
version = "2.0.2";
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz";
2013-12-29 19:15:22 +01:00
sha256 = "09nv5x45y8fgc0kjmmw4gig3hr0is9xlc5rq053vnbmkxr5q5xmi";
};
buildInputs = [ python wrapPython ];
2013-07-27 20:51:54 +02:00
buildPhase = "${python}/bin/${python.executable} setup.py build --build-base $out";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
2013-07-27 20:51:54 +02:00
PYTHONPATH="$dst:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install --prefix=$out
wrapPythonPrograms
'';
doCheck = stdenv.system != "x86_64-darwin";
2013-07-27 20:51:54 +02:00
checkPhase = ''
${python}/bin/${python.executable} setup.py test
'';
meta = with stdenv.lib; {
description = "Utilities to facilitate the installation of Python packages";
homepage = http://pypi.python.org/pypi/setuptools;
licenses = [ "PSF" "ZPL" ];
platforms = platforms.all;
};
}