1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 python-dateutil,
6 docopt,
7 fetchPypi,
8 pytestCheckHook,
9 ruamel-yaml,
10 testfixtures,
11}:
12
13buildPythonPackage rec {
14 version = "1.8.0";
15 format = "setuptools";
16 pname = "pykwalify";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-eWsq0+1MuZuIMItTP7L1WcMPpu+0+p/aETR/SD0kWIQ=";
21 };
22
23 patches = [
24 # fix test failures with ruamel.yaml 0.18+
25 (fetchpatch {
26 name = "pykwalify-fix-tests-ruamel-yaml-0.18.patch";
27 url = "https://github.com/Grokzen/pykwalify/commit/57bb2ba5c28b6928edb3f07ef581a5a807524baf.diff";
28 hash = "sha256-XUiebDzFSvNrPpRMoc2lv9m+30cfFh0N0rznMiSdQ/0=";
29 })
30 ];
31
32 propagatedBuildInputs = [
33 python-dateutil
34 docopt
35 ruamel-yaml
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 testfixtures
41 ];
42
43 pythonImportsCheck = [ "pykwalify" ];
44
45 meta = with lib; {
46 homepage = "https://github.com/Grokzen/pykwalify";
47 description = "YAML/JSON validation library";
48 mainProgram = "pykwalify";
49 longDescription = ''
50 This framework is a port with a lot of added functionality
51 of the Java version of the framework kwalify that can be found at
52 http://www.kuwata-lab.com/kwalify/
53
54 The original source code can be found at
55 http://sourceforge.net/projects/kwalify/files/kwalify-java/0.5.1/
56
57 The source code of the latest release that has been used can be found at
58 https://github.com/sunaku/kwalify.
59 Please note that source code is not the original authors code
60 but a fork/upload of the last release available in Ruby.
61
62 The schema this library is based on and extended from:
63 http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html#schema
64 '';
65 license = licenses.mit;
66 maintainers = with maintainers; [ siriobalmelli ];
67 };
68}