{ stdenv, lib, buildPythonPackage, cargo, fetchPypi, pytestCheckHook, rustc, rustPlatform, libiconv, }: buildPythonPackage rec { pname = "rpds-py"; version = "0.25.0"; pyproject = true; src = fetchPypi { pname = "rpds_py"; inherit version; hash = "sha256-TZdmG/WEjdnl633tSA3sz50yzizVALiKJqy/e9KGSYU="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; hash = "sha256-0wMmhiUjXY5DaA43l7kBKE7IX1UoEFZBJ8xnafVlU60="; }; nativeBuildInputs = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook cargo rustc ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "rpds" ]; meta = with lib; { changelog = "https://github.com/crate-py/rpds/releases/tag/v${version}"; description = "Python bindings to Rust's persistent data structures"; homepage = "https://github.com/crate-py/rpds"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }