depot/third_party/nixpkgs/pkgs/development/python-modules/pycrdt/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

59 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
libiconv,
rustPlatform,
anyio,
objsize,
pydantic,
pytestCheckHook,
trio,
y-py,
}:
buildPythonPackage rec {
pname = "pycrdt";
version = "0.9.6";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyter-server";
repo = "pycrdt";
rev = "refs/tags/v${version}";
hash = "sha256-1BGJ6I8ODLyEv566w+vQOsPEqN8nQlZHXTWv0tH0cR0=";
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
pythonImportsCheck = [ "pycrdt" ];
nativeCheckInputs = [
anyio
objsize
pydantic
pytestCheckHook
trio
y-py
];
meta = with lib; {
description = "CRDTs based on Yrs";
homepage = "https://github.com/jupyter-server/pycrdt";
changelog = "https://github.com/jupyter-server/pycrdt/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = teams.jupyter.members;
};
}