2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, beautifulsoup4
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
2021-12-06 16:07:01 +00:00
|
|
|
, dataclasses
|
2021-06-28 23:13:55 +00:00
|
|
|
, dataclasses-json
|
|
|
|
, fetchFromGitHub
|
|
|
|
, htmlmin
|
|
|
|
, jinja2
|
|
|
|
, markdown2
|
2021-12-06 16:07:01 +00:00
|
|
|
, poetry-core
|
2021-06-28 23:13:55 +00:00
|
|
|
, pygments
|
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytz
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "json-schema-for-humans";
|
2022-01-07 04:07:37 +00:00
|
|
|
version = "0.39.5";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coveooss";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-13 20:06:32 +00:00
|
|
|
hash = "sha256-gaholnLO5oIQaXgliuvlU2MfpjiCMgAPplOPgvMYim8=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
click
|
|
|
|
dataclasses-json
|
|
|
|
htmlmin
|
|
|
|
jinja2
|
|
|
|
markdown2
|
|
|
|
pygments
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
requests
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
dataclasses
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
checkInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/coveooss/json-schema-for-humans/issues/127
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'PyYAML = "^5.4.1"' 'PyYAML = "*"'
|
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_references_url"
|
2021-12-06 16:07:01 +00:00
|
|
|
# Tests are failing
|
|
|
|
"TestMdGenerate"
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"json_schema_for_humans"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-15 22:18:51 +00:00
|
|
|
description = "Quickly generate HTML documentation from a JSON schema";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/coveooss/json-schema-for-humans";
|
|
|
|
license = licenses.asl20;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with maintainers; [ astro ];
|
|
|
|
};
|
|
|
|
}
|