1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, pytest-metadata
6, pytest-xdist
7, pytestCheckHook
8, pythonOlder
9, setuptools
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-json-report";
14 version = "1.5.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "numirias";
21 repo = "pytest-json-report";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-hMB/atDuo7CjwhHFUOxVfgJ7Qp4AA9J428iv7hyQFcs=";
24 };
25
26 nativeBuildInputs = [
27 setuptools
28 ];
29
30 buildInputs = [
31 pytest
32 ];
33
34 propagatedBuildInputs = [
35 pytest-metadata
36 ];
37
38 nativeCheckInputs = [
39 pytest-xdist
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # pytest-flaky is not available at the moment
45 "test_bug_31"
46 "test_environment_via_metadata_plugin"
47 ];
48
49 pythonImportsCheck = [
50 "pytest_jsonreport"
51 ];
52
53 meta = with lib; {
54 description = "Pytest plugin to report test results as JSON";
55 homepage = "https://github.com/numirias/pytest-json-report";
56 changelog = "https://github.com/numirias/pytest-json-report/releases/tag/v${version}";
57 license = licenses.mit;
58 maintainers = with maintainers; [ fab ];
59 };
60}