depot/third_party/nixpkgs/pkgs/development/python-modules/tox/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

77 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
packaging,
pluggy,
py,
six,
virtualenv,
setuptools-scm,
toml,
tomli,
filelock,
hatchling,
hatch-vcs,
platformdirs,
pyproject-api,
colorama,
chardet,
cachetools,
testers,
tox,
}:
buildPythonPackage rec {
pname = "tox";
version = "4.15.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "tox-dev";
repo = "tox";
rev = "refs/tags/${version}";
hash = "sha256-BLOxyvcC3ngQDVSMaw/NfLVbFkIHbTmhUOOVBqlcK/Q=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "packaging>=22" "packaging"
'';
nativeBuildInputs = [
hatchling
hatch-vcs
];
propagatedBuildInputs = [
cachetools
chardet
colorama
filelock
packaging
platformdirs
pluggy
py
pyproject-api
six
toml
virtualenv
] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
doCheck = false; # infinite recursion via devpi-client
passthru.tests = {
version = testers.testVersion { package = tox; };
};
meta = with lib; {
changelog = "https://github.com/tox-dev/tox/releases/tag/${version}";
description = "Generic virtualenv management and test command line tool";
mainProgram = "tox";
homepage = "https://github.com/tox-dev/tox";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}