Files
nixpkgs/pkgs/development/python-modules/jq/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

56 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
jq,
oniguruma,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "jq";
version = "1.10.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "jq.py";
tag = version;
hash = "sha256-xzkOWIMvGBVJtdZWFFIQkfgTivMTxV+dze71E8S6SlM=";
};
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 ];
};
}