Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchurl, python, wrapPython }: 2 3stdenv.mkDerivation rec { 4 shortName = "setuptools-${version}"; 5 name = "${python.libPrefix}-${shortName}"; 6 7 version = "26.1.1"; # 18.4 and up breaks python34Packages.characteristic and many others 8 9 src = fetchurl { 10 url = "mirror://pypi/s/setuptools/${shortName}.tar.gz"; 11 sha256 = "475ce28993d7cb75335942525b9fac79f7431a7f6e8a0079c0f2680641379481"; 12 }; 13 14 buildInputs = [ python wrapPython ]; 15 doCheck = false; # requires pytest 16 installPhase = '' 17 dst=$out/${python.sitePackages} 18 mkdir -p $dst 19 export PYTHONPATH="$dst:$PYTHONPATH" 20 ${python.interpreter} setup.py install --prefix=$out 21 wrapPythonPrograms 22 ''; 23 24 pythonPath = []; 25 26 meta = with stdenv.lib; { 27 description = "Utilities to facilitate the installation of Python packages"; 28 homepage = http://pypi.python.org/pypi/setuptools; 29 license = with lib.licenses; [ psfl zpt20 ]; 30 platforms = platforms.all; 31 priority = 10; 32 }; 33}