blob: 952cbe1ff4d630ae21c47712b01b1ed8fd7f0309 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{ stdenv, fetchurl, python, wrapPython }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
name = "${python.executable}-${shortName}";
version = "2.0.2";
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz";
sha256 = "09nv5x45y8fgc0kjmmw4gig3hr0is9xlc5rq053vnbmkxr5q5xmi";
};
buildInputs = [ python wrapPython ];
buildPhase = "${python}/bin/${python.executable} setup.py build --build-base $out";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
PYTHONPATH="$dst:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install --prefix=$out
wrapPythonPrograms
'';
doCheck = true;
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;
};
}
|