depot/third_party/nixpkgs/pkgs/development/python-modules/rpds-py/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

57 lines
1.1 KiB
Nix

{ 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 ];
};
}