{ stdenv, lib, buildPythonPackage, cargo, fetchPypi, pytestCheckHook, pythonOlder, rustc, rustPlatform, libiconv, }: buildPythonPackage rec { pname = "rpds-py"; version = "0.17.1"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { pname = "rpds_py"; inherit version; hash = "sha256-AhCyZo8kwHgwcmC/iL2snW8Qk2Nd9RI3ib/uTY1/yOc="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; hash = "sha256-sFutrKLa2ISxtUN7hmw2P02nl4SM6Hn4yj1kkXrNWmI="; }; nativeBuildInputs = [ rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook cargo rustc ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "rpds" ]; meta = with lib; { description = "Python bindings to Rust's persistent data structures (rpds"; homepage = "https://pypi.org/project/rpds-py/"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; }