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