mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-18 19:17:31 +03:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
102 lines
1.7 KiB
Nix
102 lines
1.7 KiB
Nix
{ lib
|
|
, attrs
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, hatch-fancy-pypi-readme
|
|
, hatch-vcs
|
|
, hatchling
|
|
, importlib-metadata
|
|
, importlib-resources
|
|
, pyrsistent
|
|
, pythonOlder
|
|
, twisted
|
|
, typing-extensions
|
|
|
|
# optionals
|
|
, fqdn
|
|
, idna
|
|
, isoduration
|
|
, jsonpointer
|
|
, rfc3339-validator
|
|
, rfc3986-validator
|
|
, rfc3987
|
|
, uri-template
|
|
, webcolors
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "jsonschema";
|
|
version = "4.17.3";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-D4ZEN6uLYHa6ZwdFPvj5imoNUSqA6T+KvbZ29zfstg0=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs json/bin/jsonschema_suite
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
hatch-fancy-pypi-readme
|
|
hatch-vcs
|
|
hatchling
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
pyrsistent
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
importlib-metadata
|
|
typing-extensions
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
importlib-resources
|
|
];
|
|
|
|
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
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
twisted
|
|
];
|
|
|
|
checkPhase = ''
|
|
export JSON_SCHEMA_TEST_SUITE=json
|
|
trial jsonschema
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"jsonschema"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "An implementation of JSON Schema validation for Python";
|
|
homepage = "https://github.com/python-jsonschema/jsonschema";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
};
|
|
}
|