1{
2 lib,
3 argcomplete,
4 buildPythonPackage,
5 colorlog,
6 fetchFromGitHub,
7 hatchling,
8 importlib-metadata,
9 jinja2,
10 packaging,
11 pytestCheckHook,
12 pythonOlder,
13 tox,
14 typing-extensions,
15 virtualenv,
16}:
17
18buildPythonPackage rec {
19 pname = "nox";
20 version = "2024.04.15";
21 format = "pyproject";
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitHub {
26 owner = "wntrblm";
27 repo = pname;
28 rev = "refs/tags/${version}";
29 hash = "sha256-PagZR2IdS1gS/ukl4b0Al9sdEsFnFwP8oy0eOGKJHMs=";
30 };
31
32 nativeBuildInputs = [ hatchling ];
33
34 propagatedBuildInputs =
35 [
36 argcomplete
37 colorlog
38 packaging
39 virtualenv
40 ]
41 ++ lib.optionals (pythonOlder "3.8") [
42 typing-extensions
43 importlib-metadata
44 ];
45
46 nativeCheckInputs = [
47 jinja2
48 tox
49 pytestCheckHook
50 ];
51
52 pythonImportsCheck = [ "nox" ];
53
54 disabledTests = [
55 # our conda is not available on 3.11
56 "test__create_venv_options"
57 ];
58
59 disabledTestPaths = [
60 # AttributeError: module 'tox.config' has...
61 "tests/test_tox_to_nox.py"
62 ];
63
64 meta = with lib; {
65 description = "Flexible test automation for Python";
66 homepage = "https://nox.thea.codes/";
67 changelog = "https://github.com/wntrblm/nox/blob/${version}/CHANGELOG.md";
68 license = licenses.asl20;
69 maintainers = with maintainers; [
70 doronbehar
71 fab
72 ];
73 };
74}