53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildPythonPackage,
|
|
distutils,
|
|
fetchFromGitHub,
|
|
python,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "setuptools";
|
|
version = "80.7.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pypa";
|
|
repo = "setuptools";
|
|
tag = "v${version}";
|
|
hash = "sha256-lOGvJoVwFxASI7e5fJkeS7iGOIPklGRYmmMfclqn0H4=";
|
|
};
|
|
|
|
patches = [
|
|
./tag-date.patch
|
|
];
|
|
|
|
# Drop dependency on coherent.license, which in turn requires coherent.build
|
|
postPatch = ''
|
|
sed -i "/coherent.licensed/d" pyproject.toml
|
|
'';
|
|
|
|
preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
|
|
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
|
|
'';
|
|
|
|
# Requires pytest, causing infinite recursion.
|
|
doCheck = false;
|
|
|
|
passthru.tests = {
|
|
inherit distutils;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Utilities to facilitate the installation of Python packages";
|
|
homepage = "https://github.com/pypa/setuptools";
|
|
changelog = "https://setuptools.pypa.io/en/stable/history.html#v${
|
|
replaceStrings [ "." ] [ "-" ] version
|
|
}";
|
|
license = with licenses; [ mit ];
|
|
platforms = python.meta.platforms;
|
|
teams = [ teams.python ];
|
|
};
|
|
}
|