1{
2 lib,
3 buildPythonPackage,
4 chardet,
5 fetchPypi,
6 jinja2,
7 jinja2-pluralize,
8 pluggy,
9 poetry-core,
10 pycodestyle,
11 pyflakes,
12 pygments,
13 pylint,
14 pytest-datadir,
15 pytest-mock,
16 pytestCheckHook,
17 pythonOlder,
18 tomli,
19}:
20
21buildPythonPackage rec {
22 pname = "diff-cover";
23 version = "9.7.1";
24 pyproject = true;
25
26 disabled = pythonOlder "3.9";
27
28 src = fetchPypi {
29 pname = "diff_cover";
30 inherit version;
31 hash = "sha256-oDt4vGS33Cfdp/EcRrxtRPThIcj7mlBo1B8goF1GNUg=";
32 };
33
34 build-system = [ poetry-core ];
35
36 dependencies = [
37 chardet
38 jinja2
39 jinja2-pluralize
40 pluggy
41 pygments
42 tomli
43 ];
44
45 nativeCheckInputs = [
46 pycodestyle
47 pyflakes
48 pylint
49 pytest-datadir
50 pytest-mock
51 pytestCheckHook
52 ];
53
54 disabledTests = [
55 # Tests check for flake8
56 "file_does_not_exist"
57 # Comparing console output doesn't work reliable
58 "console"
59 # Assertion failure
60 "test_html_with_external_css"
61 "test_style_defs"
62 ];
63
64 pythonImportsCheck = [ "diff_cover" ];
65
66 meta = with lib; {
67 description = "Automatically find diff lines that need test coverage";
68 homepage = "https://github.com/Bachmann1234/diff-cover";
69 changelog = "https://github.com/Bachmann1234/diff_cover/releases/tag/v${version}";
70 license = licenses.asl20;
71 maintainers = with maintainers; [ dzabraev ];
72 };
73}