Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
rustPlatform,
fetchFromGitHub,
libiconv,
dirty-equals,
pytestCheckHook,
nix-update-script,
}:
buildPythonPackage rec {
pname = "jiter";
version = "0.8.2";
pyproject = true;
src = fetchFromGitHub {
owner = "pydantic";
repo = "jiter";
tag = "v${version}";
hash = "sha256-6FPwQ6t/zLB86k97S+6z5xWKBPJvjZ5/x3KrxOOT1gk=";
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
buildAndTestSubdir = "crates/jiter-python";
nativeBuildInputs = [ rustPlatform.cargoSetupHook ];
build-system = [ rustPlatform.maturinBuildHook ];
buildInputs = [ libiconv ];
pythonImportsCheck = [ "jiter" ];
nativeCheckInputs = [
dirty-equals
pytestCheckHook
];
passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
meta = {
description = "Fast iterable JSON parser";
homepage = "https://github.com/pydantic/jiter/";
changelog = "https://github.com/pydantic/jiter/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}