depot/third_party/nixpkgs/pkgs/development/python-modules/y-py/default.nix
Default email eaf6957cd3 Project import generated by Copybara.
GitOrigin-RevId: 4bb072f0a8b267613c127684e099a70e1f6ff106
2023-03-27 12:17:25 -07:00

48 lines
950 B
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, rustPlatform
, libiconv
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "y-py";
version = "0.6.0";
format = "pyproject";
src = fetchPypi {
pname = "y_py";
inherit version;
hash = "sha256-RoNhaffcKVffhRPP5LwgCRdbOkc+Ywr0IajnXuHEj5g=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-tpUDGBIHqXsKPsK+1h2sNuiV2I0pGVBokKh+hdFazRQ=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
rust.cargo
rust.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 ];
};
}