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

71 lines
1.4 KiB
Nix

{
lib,
fetchPypi,
buildPythonPackage,
pythonOlder,
rustPlatform,
nix-update-script,
# build-system
maturin,
# nativeCheckInputs
pytestCheckHook,
pytest-benchmark,
pytest-codspeed,
pytest-xdist,
}:
buildPythonPackage rec {
pname = "libipld";
version = "3.1.1";
format = "pyproject";
disabled = pythonOlder "3.8";
# use pypi, GitHub does not include Cargo.lock
src = fetchPypi {
inherit pname version;
hash = "sha256-S5qdoOpdhI6foSxwACdhmh437MHaOdvRQkwOkGLynkQ=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-LMd1M2gCK0i3TJPnUIY/2pskt9Rm/yki4uDX5uQGi8Q=";
};
build-system = [
maturin
];
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
nativeCheckInputs = [
pytestCheckHook
pytest-benchmark
pytest-codspeed
pytest-xdist
];
pytestFlags = [ "--benchmark-disable" ];
disabledTests = [
# touches network
"test_decode_car"
];
pythonImportsCheck = [ "libipld" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Fast Python library to work with IPLD: DAG-CBOR, CID, CAR, multibase";
homepage = "https://github.com/MarshalX/python-libipld";
changelog = "https://github.com/MarshalX/python-libipld/blob/v${version}/CHANGES.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ vji ];
};
}