blob: 21a272996cf94562b9a4d70065c08b19fda8618d (
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
|
{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
jq,
oniguruma,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "jq";
version = "1.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "jq.py";
rev = "refs/tags/${version}";
hash = "sha256-c6tJI/mPlBGIYTk5ObIQ1CUTq73HouQ2quMZVWG8FFg=";
};
env.JQPY_USE_SYSTEM_LIBS = 1;
nativeBuildInputs = [ cython ];
buildInputs = [
jq
oniguruma
];
preBuild = ''
cython jq.pyx
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# intentional behavior change in jq 1.7.1 not reflected upstream
"test_given_json_text_then_strings_containing_null_characters_are_preserved"
];
pythonImportsCheck = [ "jq" ];
meta = with lib; {
description = "Python bindings for jq, the flexible JSON processor";
homepage = "https://github.com/mwilliamson/jq.py";
changelog = "https://github.com/mwilliamson/jq.py/blob/${version}/CHANGELOG.rst";
license = licenses.bsd2;
maintainers = with maintainers; [ benley ];
};
}
|