1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 packaging,
7 pluggy,
8 py,
9 six,
10 virtualenv,
11 setuptools-scm,
12 toml,
13 tomli,
14 filelock,
15 hatchling,
16 hatch-vcs,
17 platformdirs,
18 pyproject-api,
19 colorama,
20 chardet,
21 cachetools,
22 testers,
23 tox,
24}:
25
26buildPythonPackage rec {
27 pname = "tox";
28 version = "4.15.0";
29 format = "pyproject";
30
31 src = fetchFromGitHub {
32 owner = "tox-dev";
33 repo = "tox";
34 rev = "refs/tags/${version}";
35 hash = "sha256-aKk3a0RAcLyrHK6I3Q7rcBdZVJGNBXsBqA8N7Kpdrms=";
36 };
37
38 postPatch = ''
39 substituteInPlace pyproject.toml \
40 --replace "packaging>=22" "packaging"
41 '';
42
43 nativeBuildInputs = [
44 hatchling
45 hatch-vcs
46 ];
47
48 propagatedBuildInputs = [
49 cachetools
50 chardet
51 colorama
52 filelock
53 packaging
54 platformdirs
55 pluggy
56 py
57 pyproject-api
58 six
59 toml
60 virtualenv
61 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
62
63 doCheck = false; # infinite recursion via devpi-client
64
65 passthru.tests = {
66 version = testers.testVersion { package = tox; };
67 };
68
69 meta = with lib; {
70 changelog = "https://github.com/tox-dev/tox/releases/tag/${version}";
71 description = "A generic virtualenv management and test command line tool";
72 mainProgram = "tox";
73 homepage = "https://github.com/tox-dev/tox";
74 license = licenses.mit;
75 maintainers = with maintainers; [ ];
76 };
77}