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
|
2022-02-10 20:34:41 +00:00
|
|
|
, importlib-resources
|
2023-08-10 07:59:29 +00:00
|
|
|
, jsonschema-specifications
|
2023-07-15 17:15:38 +00:00
|
|
|
, pkgutil-resolve-name
|
2023-08-10 07:59:29 +00:00
|
|
|
, pytestCheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
2023-08-10 07:59:29 +00:00
|
|
|
, referencing
|
|
|
|
, rpds-py
|
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-08-10 07:59:29 +00:00
|
|
|
version = "4.18.4";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-+zZCc1OZ+pWMDSqtcFeQFVRZbGM0n09rKDxJPPaSol0=";
|
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
|
2023-08-10 07:59:29 +00:00
|
|
|
jsonschema-specifications
|
|
|
|
referencing
|
|
|
|
rpds-py
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
2023-07-15 17:15:38 +00:00
|
|
|
pkgutil-resolve-name
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
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 = [
|
2023-08-10 07:59:29 +00:00
|
|
|
pytestCheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"jsonschema"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
description = "An implementation of JSON Schema validation";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|