1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, poetry-core
6, jsonpatch
7, jsonschema
8, six
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "warlock";
14 version = "2.0.1";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "bcwaldon";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-HOCLzFYmOL/tCXT+NO/tCZuVXVowNEPP3g33ZYg4+6Q=";
24 };
25
26 postPatch = ''
27 sed -i '/--cov/d' pytest.ini
28 '';
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 jsonpatch
36 jsonschema
37 ];
38
39 checkInputs = [
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # https://github.com/bcwaldon/warlock/issues/64
45 "test_recursive_models"
46 ];
47
48 pythonImportsCheck = [
49 "warlock"
50 ];
51
52 meta = with lib; {
53 description = "Python object model built on JSON schema and JSON patch";
54 homepage = "https://github.com/bcwaldon/warlock";
55 license = licenses.asl20;
56 maintainers = with maintainers; [ ];
57 };
58}