nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.30.0";
16 pyproject = true;
17
18 src = fetchPypi {
19 pname = "rpds_py";
20 inherit version;
21 hash = "sha256-3Y/3z5ABSvDA94fuo0eU6/ZBUkLuHW+pHqunJcxEHoQ=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoVendor {
25 inherit pname version src;
26 hash = "sha256-2m2DW1rknZR+UztgUcRaQk4gY19eXmT089U2YlV16d8=";
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 = {
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 = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ fab ];
48 };
49}