at master 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 cargo, 6 fetchPypi, 7 pytestCheckHook, 8 rustc, 9 rustPlatform, 10 libiconv, 11}: 12 13buildPythonPackage rec { 14 pname = "rpds-py"; 15 version = "0.25.0"; 16 pyproject = true; 17 18 src = fetchPypi { 19 pname = "rpds_py"; 20 inherit version; 21 hash = "sha256-TZdmG/WEjdnl633tSA3sz50yzizVALiKJqy/e9KGSYU="; 22 }; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit pname version src; 26 hash = "sha256-0wMmhiUjXY5DaA43l7kBKE7IX1UoEFZBJ8xnafVlU60="; 27 }; 28 29 nativeBuildInputs = [ 30 rustPlatform.cargoSetupHook 31 rustPlatform.maturinBuildHook 32 cargo 33 rustc 34 ]; 35 36 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 pythonImportsCheck = [ "rpds" ]; 41 42 meta = with lib; { 43 changelog = "https://github.com/crate-py/rpds/releases/tag/v${version}"; 44 description = "Python bindings to Rust's persistent data structures"; 45 homepage = "https://github.com/crate-py/rpds"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}