blob: 01c93b61a9fe79606cfa07aa15003a4360e8757a (
plain)
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
|
{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
jq,
oniguruma,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "jq";
version = "1.11.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "jq.py";
tag = version;
hash = "sha256-v5Hi3SkLKX7KrCHiXDuEThSLghDU5VVhNGt1KpMEqC4=";
};
env.JQPY_USE_SYSTEM_LIBS = 1;
nativeBuildInputs = [ cython ];
buildInputs = [
jq
oniguruma
];
preBuild = ''
cython jq.pyx
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# tries to match exact error text, fails with jq 1.8
"test_value_error_is_raised_if_program_is_invalid"
];
pythonImportsCheck = [ "jq" ];
meta = {
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 = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ benley ];
};
}
|