1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 click,
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 = "1.0.2";
23 pyproject = true;
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = "coveooss";
29 repo = "json-schema-for-humans";
30 rev = "refs/tags/v${version}";
31 hash = "sha256-SSMUHC4IsMIIhmRrG0ZWNO2MNKKvoBSybmEEibAY5q0=";
32 };
33
34 pythonRelaxDeps = [ "dataclasses-json" ];
35
36 build-system = [ poetry-core ];
37
38
39 dependencies = [
40 click
41 dataclasses-json
42 htmlmin
43 jinja2
44 markdown2
45 pygments
46 pytz
47 pyyaml
48 requests
49 ];
50
51 nativeCheckInputs = [
52 beautifulsoup4
53 pytestCheckHook
54 ];
55
56 disabledTests = [
57 # Tests require network access
58 "test_references_url"
59 # Tests are failing
60 "TestMdGenerate"
61 ];
62
63 pythonImportsCheck = [ "json_schema_for_humans" ];
64
65 meta = with lib; {
66 description = "Quickly generate HTML documentation from a JSON schema";
67 homepage = "https://github.com/coveooss/json-schema-for-humans";
68 changelog = "https://github.com/coveooss/json-schema-for-humans/releases/tag/v${version}";
69 license = licenses.asl20;
70 maintainers = with maintainers; [ astro ];
71 mainProgram = "generate-schema-doc";
72 };
73}