at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 pythonOlder, 6 rustPlatform, 7 nix-update-script, 8 9 # build-system 10 maturin, 11 12 # nativeCheckInputs 13 pytestCheckHook, 14 pytest-benchmark, 15 pytest-codspeed, 16 pytest-xdist, 17}: 18 19buildPythonPackage rec { 20 pname = "libipld"; 21 version = "3.0.1"; 22 format = "pyproject"; 23 disabled = pythonOlder "3.8"; 24 25 # use pypi, GitHub does not include Cargo.lock 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-KXB1LecOX9ysRkaQDN76oNygjbm11ZxAtUltmeO/+mQ="; 29 }; 30 31 cargoDeps = rustPlatform.fetchCargoVendor { 32 inherit src; 33 hash = "sha256-V/UGTO+VEBtv5gwKR/fZmmhbeYILsIVc7Mq/Rl6E4Dw="; 34 }; 35 36 build-system = [ 37 maturin 38 ]; 39 40 nativeBuildInputs = with rustPlatform; [ 41 cargoSetupHook 42 maturinBuildHook 43 ]; 44 45 nativeCheckInputs = [ 46 pytestCheckHook 47 pytest-benchmark 48 pytest-codspeed 49 pytest-xdist 50 ]; 51 52 disabledTests = [ 53 # touches network 54 "test_decode_car" 55 ]; 56 57 pythonImportsCheck = [ "libipld" ]; 58 59 passthru.updateScript = nix-update-script { }; 60 61 meta = { 62 description = "Fast Python library to work with IPLD: DAG-CBOR, CID, CAR, multibase"; 63 homepage = "https://github.com/MarshalX/python-libipld"; 64 changelog = "https://github.com/MarshalX/python-libipld/blob/v${version}/CHANGES.md"; 65 license = lib.licenses.mit; 66 maintainers = with lib.maintainers; [ vji ]; 67 }; 68}