Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools-scm, 6 setuptools, 7 python, 8 jaraco-envs, 9 jaraco-path, 10 jaraco-text, 11 more-itertools, 12 path, 13 pyfakefs, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "distutils"; 19 inherit (setuptools) version; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "pypa"; 24 repo = "distutils"; 25 rev = "813ab9868b353991ec7324eb09619ee5beb9183f"; 26 hash = "sha256-/YtITDuZlTJRisqsQ6SrgRRUrqLZpj+k3drrouURZlc="; 27 }; 28 29 build-system = [ setuptools-scm ]; 30 31 postInstall = '' 32 rm -r $out/${python.sitePackages}/distutils 33 ln -s ${setuptools}/${python.sitePackages}/setuptools/_distutils $out/${python.sitePackages}/distutils 34 ''; 35 36 pythonImportsCheck = [ "distutils" ]; 37 38 nativeCheckInputs = [ 39 jaraco-envs 40 jaraco-path 41 jaraco-text 42 more-itertools 43 path 44 pyfakefs 45 pytestCheckHook 46 ]; 47 48 meta = { 49 description = "Distutils as found in cpython"; 50 homepage = "https://github.com/pypa/distutils"; 51 license = lib.licenses.mit; 52 maintainers = with lib.maintainers; [ dotlambda ]; 53 }; 54}