2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-01-20 10:41:00 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, packaging
|
|
|
|
, pluggy
|
|
|
|
, py
|
|
|
|
, six
|
|
|
|
, virtualenv
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, toml
|
2022-11-04 12:27:35 +00:00
|
|
|
, tomli
|
2020-04-24 23:36:52 +00:00
|
|
|
, filelock
|
2023-01-20 10:41:00 +00:00
|
|
|
, hatchling
|
|
|
|
, hatch-vcs
|
|
|
|
, platformdirs
|
|
|
|
, pyproject-api
|
|
|
|
, colorama
|
|
|
|
, chardet
|
|
|
|
, cachetools
|
|
|
|
, testers
|
|
|
|
, tox
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tox";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "4.4.6";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tox-dev";
|
|
|
|
repo = "tox";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-kWvYN2PA4al2X813Mu4R/n2ZLsZ+MaYCCWNfmYD3nBo=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "packaging>=22" "packaging"
|
|
|
|
'';
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cachetools
|
|
|
|
chardet
|
|
|
|
colorama
|
|
|
|
filelock
|
|
|
|
packaging
|
|
|
|
platformdirs
|
|
|
|
pluggy
|
|
|
|
py
|
|
|
|
pyproject-api
|
|
|
|
six
|
|
|
|
toml
|
|
|
|
virtualenv
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
doCheck = false; # infinite recursion via devpi-client
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion { package = tox; };
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/tox-dev/tox/releases/tag/${version}";
|
|
|
|
description = "A generic virtualenv management and test command line tool";
|
|
|
|
homepage = "https://github.com/tox-dev/tox";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-01-20 10:41:00 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|