2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, attrs
|
2022-02-10 20:34:41 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-09-30 11:47:45 +00:00
|
|
|
, hatch-fancy-pypi-readme
|
2022-06-26 10:26:21 +00:00
|
|
|
, hatch-vcs
|
|
|
|
, hatchling
|
2020-04-24 23:36:52 +00:00
|
|
|
, importlib-metadata
|
2022-02-10 20:34:41 +00:00
|
|
|
, importlib-resources
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyrsistent
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, twisted
|
2022-02-10 20:34:41 +00:00
|
|
|
, typing-extensions
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
# optionals
|
|
|
|
, fqdn
|
|
|
|
, idna
|
|
|
|
, isoduration
|
|
|
|
, jsonpointer
|
|
|
|
, rfc3339-validator
|
|
|
|
, rfc3986-validator
|
|
|
|
, rfc3987
|
|
|
|
, uri-template
|
|
|
|
, webcolors
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jsonschema";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "4.17.3";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-D4ZEN6uLYHa6ZwdFPvj5imoNUSqA6T+KvbZ29zfstg0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs json/bin/jsonschema_suite
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
hatch-fancy-pypi-readme
|
2022-06-26 10:26:21 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
pyrsistent
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
typing-extensions
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
format = [
|
|
|
|
fqdn
|
|
|
|
idna
|
|
|
|
isoduration
|
|
|
|
jsonpointer
|
|
|
|
rfc3339-validator
|
|
|
|
rfc3987
|
|
|
|
uri-template
|
|
|
|
webcolors
|
|
|
|
];
|
|
|
|
format-nongpl = [
|
|
|
|
fqdn
|
|
|
|
idna
|
|
|
|
isoduration
|
|
|
|
jsonpointer
|
|
|
|
rfc3339-validator
|
|
|
|
rfc3986-validator
|
|
|
|
uri-template
|
|
|
|
webcolors
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
twisted
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export JSON_SCHEMA_TEST_SUITE=json
|
|
|
|
trial jsonschema
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"jsonschema"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An implementation of JSON Schema validation for Python";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/python-jsonschema/jsonschema";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
|
|
};
|
|
|
|
}
|