2021-04-12 18:23:04 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-25 14:12:00 +00:00
|
|
|
, fetchpatch
|
2021-07-04 02:40:35 +00:00
|
|
|
, python-dateutil
|
2021-04-12 18:23:04 +00:00
|
|
|
, docopt
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, ruamel-yaml
|
|
|
|
, testfixtures
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "1.8.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-07-18 16:06:22 +00:00
|
|
|
pname = "pykwalify";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-eWsq0+1MuZuIMItTP7L1WcMPpu+0+p/aETR/SD0kWIQ=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
patches = [
|
|
|
|
# fix test failures with ruamel.yaml 0.18+
|
|
|
|
(fetchpatch {
|
|
|
|
name = "pykwalify-fix-tests-ruamel-yaml-0.18.patch";
|
|
|
|
url = "https://github.com/Grokzen/pykwalify/commit/57bb2ba5c28b6928edb3f07ef581a5a807524baf.diff";
|
|
|
|
hash = "sha256-XUiebDzFSvNrPpRMoc2lv9m+30cfFh0N0rznMiSdQ/0=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-07-18 16:06:22 +00:00
|
|
|
docopt
|
2021-04-12 18:23:04 +00:00
|
|
|
ruamel-yaml
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-12 18:23:04 +00:00
|
|
|
pytestCheckHook
|
2020-07-18 16:06:22 +00:00
|
|
|
testfixtures
|
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
pythonImportsCheck = [ "pykwalify" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Grokzen/pykwalify";
|
|
|
|
description = "YAML/JSON validation library";
|
|
|
|
longDescription = ''
|
|
|
|
This framework is a port with a lot of added functionality
|
|
|
|
of the Java version of the framework kwalify that can be found at
|
|
|
|
http://www.kuwata-lab.com/kwalify/
|
|
|
|
|
|
|
|
The original source code can be found at
|
|
|
|
http://sourceforge.net/projects/kwalify/files/kwalify-java/0.5.1/
|
|
|
|
|
|
|
|
The source code of the latest release that has been used can be found at
|
|
|
|
https://github.com/sunaku/kwalify.
|
|
|
|
Please note that source code is not the original authors code
|
|
|
|
but a fork/upload of the last release available in Ruby.
|
|
|
|
|
|
|
|
The schema this library is based on and extended from:
|
|
|
|
http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html#schema
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siriobalmelli ];
|
|
|
|
};
|
|
|
|
}
|