504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
63 lines
1.1 KiB
Nix
63 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, libiconv
|
|
, cargo
|
|
, rustPlatform
|
|
, rustc
|
|
, pydantic
|
|
, pytestCheckHook
|
|
, y-py
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pycrdt";
|
|
version = "0.8.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jupyter-server";
|
|
repo = "pycrdt";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-RY0ndkMW4a2KxkebkoSEAzCgdUyHujglHJCzkoFCJZA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cargo
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
rustc
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
libiconv
|
|
];
|
|
|
|
pythonImportsCheck = [ "pycrdt" ];
|
|
|
|
# requires pydantic>=2.5
|
|
doCheck = false;
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
y-py
|
|
pydantic
|
|
];
|
|
|
|
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;
|
|
};
|
|
}
|