nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 79 lines 1.4 kB view raw
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.40.2"; 23 format = "pyproject"; 24 25 disabled = pythonOlder "3.6"; 26 27 src = fetchFromGitHub { 28 owner = "coveooss"; 29 repo = pname; 30 rev = "v${version}"; 31 hash = "sha256-9bHylNG+YT+tZmqE8DJMbhpPPaany29+0sIt1jKmFLg="; 32 }; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace 'pytz = "^2021.1"' 'pytz = "*"' 37 ''; 38 39 nativeBuildInputs = [ 40 poetry-core 41 ]; 42 43 propagatedBuildInputs = [ 44 click 45 dataclasses-json 46 htmlmin 47 jinja2 48 markdown2 49 pygments 50 pytz 51 pyyaml 52 requests 53 ] ++ lib.optionals (pythonOlder "3.7") [ 54 dataclasses 55 ]; 56 57 checkInputs = [ 58 beautifulsoup4 59 pytestCheckHook 60 ]; 61 62 disabledTests = [ 63 # Tests require network access 64 "test_references_url" 65 # Tests are failing 66 "TestMdGenerate" 67 ]; 68 69 pythonImportsCheck = [ 70 "json_schema_for_humans" 71 ]; 72 73 meta = with lib; { 74 description = "Quickly generate HTML documentation from a JSON schema"; 75 homepage = "https://github.com/coveooss/json-schema-for-humans"; 76 license = licenses.asl20; 77 maintainers = with maintainers; [ astro ]; 78 }; 79}