1{ stdenv
2, fetchPypi
3, python
4, wrapPython
5, unzip
6}:
7
8# Should use buildPythonPackage here somehow
9stdenv.mkDerivation rec {
10 pname = "setuptools";
11 version = "36.4.0";
12 name = "${python.libPrefix}-${pname}-${version}";
13
14 src = fetchPypi {
15 inherit pname version;
16 extension = "zip";
17 sha256 = "2758b0270fe8ceec42f336ee5b411e60dc8579febc27bb3ba9b794dc7f0239ae";
18 };
19
20 buildInputs = [ python wrapPython unzip ];
21 doCheck = false; # requires pytest
22 installPhase = ''
23 dst=$out/${python.sitePackages}
24 mkdir -p $dst
25 export PYTHONPATH="$dst:$PYTHONPATH"
26 ${python.interpreter} setup.py install --prefix=$out
27 wrapPythonPrograms
28 '';
29
30 pythonPath = [];
31
32 meta = with stdenv.lib; {
33 description = "Utilities to facilitate the installation of Python packages";
34 homepage = http://pypi.python.org/pypi/setuptools;
35 license = with licenses; [ psfl zpl20 ];
36 platforms = platforms.all;
37 priority = 10;
38 };
39}