depot/third_party/nixpkgs/pkgs/development/python-modules/y-py/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

49 lines
968 B
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
rustPlatform,
cargo,
rustc,
libiconv,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "y-py";
version = "0.6.2";
format = "pyproject";
src = fetchPypi {
pname = "y_py";
inherit version;
hash = "sha256-R1eoKlBAags6MzqgEiAZozG9bxbkn+1n3KQj+Siz/U0=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-RXwrDSPU0wiprsUJwoDzti14H/+bSwy4hK4tYhNVfYw=";
};
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
cargo
rustc
];
buildInputs = lib.optional stdenv.isDarwin libiconv;
pythonImportsCheck = [ "y_py" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Python bindings for Y-CRDT";
homepage = "https://github.com/y-crdt/ypy";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}