blob: 4b518e5f8ef1dab327ecc5f175c7c8e35add9f7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "fastjsonschema";
version = "2.19.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "horejsek";
repo = "python-fastjsonschema";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-UxcxVB4ldnGAYJKWEccivon1CwZD588mNiVJOJPNeN8=";
};
patches = [
(fetchpatch2 {
name = "fastjsonschema-pytest8-compat.patch";
url = "https://github.com/horejsek/python-fastjsonschema/commit/efc04daf4124a598182dfcfd497615cd1e633d18.patch";
hash = "sha256-G1/PIpdN+KFfRP9pUFf/ANXLq3mzrocEHyBNWQMVOZM=";
})
];
nativeCheckInputs = [ pytestCheckHook ];
dontUseSetuptoolsCheck = true;
disabledTests =
[
"benchmark"
# these tests require network access
"remote ref"
"definitions"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"test_compile_to_code_custom_format" # cannot import temporary module created during test
];
pythonImportsCheck = [ "fastjsonschema" ];
meta = with lib; {
description = "JSON schema validator for Python";
homepage = "https://horejsek.github.io/python-fastjsonschema/";
license = licenses.bsd3;
maintainers = with maintainers; [ drewrisinger ];
};
}
|