Files
nixpkgs/pkgs/development/python-modules/libipld/default.nix
2026-06-01 00:32:48 +00:00

69 lines
1.3 KiB
Nix

{
lib,
fetchPypi,
buildPythonPackage,
rustPlatform,
nix-update-script,
# build-system
maturin,
# nativeCheckInputs
pytestCheckHook,
pytest-benchmark,
pytest-codspeed,
pytest-xdist,
}:
buildPythonPackage rec {
pname = "libipld";
version = "3.4.1";
pyproject = true;
# use pypi, GitHub does not include Cargo.lock
src = fetchPypi {
inherit pname version;
hash = "sha256-XTT8j5DJVDIPyn/vEg5f6a9Y+2dP9yNfJ4cDZN5sEG8=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-8DYIiX/lFGYz/4+vWgoYTsV5L3O7rulof6UomrulbeM=";
};
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/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ vji ];
};
}