2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libiconv,
|
|
|
|
cargo,
|
|
|
|
rustPlatform,
|
|
|
|
rustc,
|
|
|
|
objsize,
|
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
|
|
|
y-py,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycrdt";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.8.24";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupyter-server";
|
|
|
|
repo = "pycrdt";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-3j5OhjeVE42n4EEOOMUGlQGdnQ/xia0KD543uCMFpCo=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustPlatform.maturinBuildHook
|
|
|
|
rustc
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "pycrdt" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
objsize
|
|
|
|
pydantic
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestCheckHook
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|