nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, jsonpatch
6, jsonschema
7, six
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "warlock";
13 version = "1.3.3";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "bcwaldon";
20 repo = pname;
21 rev = version;
22 hash = "sha256-59V4KOwjs/vhA3F3E0j3p5L4JnKPgcExN+mgSWs0Cn0=";
23 };
24
25 postPatch = ''
26 substituteInPlace requirements.txt \
27 --replace "jsonschema>=0.7,<4" "jsonschema"
28 sed -i "/--cov/d" pytest.ini
29 '';
30
31 propagatedBuildInputs = [
32 jsonpatch
33 jsonschema
34 six
35 ];
36
37 checkInputs = [
38 pytestCheckHook
39 ];
40
41 disabledTests = [
42 # https://github.com/bcwaldon/warlock/issues/64
43 "test_recursive_models"
44 ];
45
46 pythonImportsCheck = [
47 "warlock"
48 ];
49
50 meta = with lib; {
51 description = "Python object model built on JSON schema and JSON patch";
52 homepage = "https://github.com/bcwaldon/warlock";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ ];
55 };
56}