Files
nixpkgs/pkgs/development/python-modules/jq/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

53 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
jq,
oniguruma,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "jq";
version = "1.10.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "mwilliamson";
repo = "jq.py";
tag = version;
hash = "sha256-1BhRX9OWCfHnelktsrje4ejFxMTpSaGbYuocQ2H4pAI=";
};
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 ];
};
}