Files
nixpkgs/pkgs/development/python-modules/json-stream-rs-tokenizer/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

66 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
cargo,
libiconv,
fetchFromGitHub,
json-stream,
json-stream-rs-tokenizer,
rustc,
rustPlatform,
setuptools,
setuptools-rust,
wheel,
}:
buildPythonPackage rec {
pname = "json-stream-rs-tokenizer";
version = "0.4.32";
pyproject = true;
src = fetchFromGitHub {
owner = "smheidrich";
repo = "py-json-stream-rs-tokenizer";
tag = "v${version}";
hash = "sha256-J68feE7C4I0zHmRjop7Pexx2ApkzUefz/lokYTINSiI=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-IPQrqayhyQ/gmT6nK+TgDcUQ4mPrG9yiJJk6enBzybA=";
};
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustc
setuptools
setuptools-rust
wheel
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
# Tests depend on json-stream, which depends on this package.
# To avoid infinite recursion, we only enable tests when building passthru.tests.
doCheck = false;
checkInputs = [ json-stream ];
pythonImportsCheck = [ "json_stream_rs_tokenizer" ];
passthru.tests = {
runTests = json-stream-rs-tokenizer.overrideAttrs (_: {
doCheck = true;
});
};
meta = {
description = "Faster tokenizer for the json-stream Python library";
homepage = "https://github.com/smheidrich/py-json-stream-rs-tokenizer";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ winter ];
};
}