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-06-16 17:23:12 +00:00
|
|
|
version = "0.41.1";
|
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-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-JQqoQiug4n1o4PbGT/Ry/Qib11KmaTmkhPtZjhwmpc4=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pytz = "^2021.1"' 'pytz = "*"'
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|