1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/development/python-modules/setuptools/default.nix
Vladimír Čunát 9f37e91ec5 Merge master into staging
There are larger-rebuild changes: gnutls and samba.
2015-07-17 06:38:04 +02:00

40 lines
1.1 KiB
Nix

{ stdenv, fetchurl, python, wrapPython, distutils-cfg }:
stdenv.mkDerivation rec {
shortName = "setuptools-${version}";
name = "${python.executable}-${shortName}";
version = "18.0.1";
src = fetchurl {
url = "http://pypi.python.org/packages/source/s/setuptools/${shortName}.tar.gz";
sha256 = "152b4qlpqc54939vfx5ipjpgx0kln02n3ywpm6x25pqysngwjjad";
};
buildInputs = [ python wrapPython distutils-cfg ];
buildPhase = "${python}/bin/${python.executable} setup.py build";
installPhase =
''
dst=$out/lib/${python.libPrefix}/site-packages
mkdir -p $dst
export PYTHONPATH="$dst:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install --prefix=$out --install-lib=$out/lib/${python.libPrefix}/site-packages
wrapPythonPrograms
'';
doCheck = false; # requires pytest
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;
license = [ "PSF" "ZPL" ];
platforms = platforms.all;
};
}