1{ lib
2, beautifulsoup4
3, buildPythonPackage
4, click
5, dataclasses
6, dataclasses-json
7, fetchFromGitHub
8, htmlmin
9, jinja2
10, markdown2
11, poetry-core
12, pygments
13, pytestCheckHook
14, pythonOlder
15, pytz
16, pyyaml
17, requests
18}:
19
20buildPythonPackage rec {
21 pname = "json-schema-for-humans";
22 version = "0.39.1";
23 format = "pyproject";
24
25 disabled = pythonOlder "3.6";
26
27 src = fetchFromGitHub {
28 owner = "coveooss";
29 repo = pname;
30 rev = "v${version}";
31 sha256 = "sha256-JoD4XEfIUsAbITWa0LMYgNP6WzrblI4HUIgLpx5gn18=";
32 };
33
34 nativeBuildInputs = [
35 poetry-core
36 ];
37
38 propagatedBuildInputs = [
39 click
40 dataclasses-json
41 htmlmin
42 jinja2
43 markdown2
44 pygments
45 pytz
46 pyyaml
47 requests
48 ] ++ lib.optionals (pythonOlder "3.7") [
49 dataclasses
50 ];
51
52 checkInputs = [
53 beautifulsoup4
54 pytestCheckHook
55 ];
56
57 disabledTests = [
58 # Tests require network access
59 "test_references_url"
60 # Tests are failing
61 "TestMdGenerate"
62 ];
63
64 pythonImportsCheck = [
65 "json_schema_for_humans"
66 ];
67
68 meta = with lib; {
69 description = "Quickly generate HTML documentation from a JSON schema";
70 homepage = "https://github.com/coveooss/json-schema-for-humans";
71 license = licenses.asl20;
72 maintainers = with maintainers; [ astro ];
73 };
74}