Files
nixpkgs/pkgs/development/python-modules/pycrdt/default.nix
T
Peder Bergebakken Sundt ebc2389134 treewide: remove refs/tags/ from github release meta.changelog urls
diff of `jq <packages.json 'to_entries[]|"\(.key) \(.value.meta.changelog)"' -r`:

https://gist.github.com/pbsds/49b2e2ae5c9b967a0972bbc3c2597c12
2024-08-29 22:45:00 -04:00

63 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
libiconv,
rustPlatform,
anyio,
objsize,
pydantic,
pytestCheckHook,
trio,
y-py,
nix-update-script,
}:
buildPythonPackage rec {
pname = "pycrdt";
version = "0.9.8";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyter-server";
repo = "pycrdt";
rev = "refs/tags/v${version}";
hash = "sha256-W93rLSDcCB9jrxC/Z88ToCkcfMGnCTGjBkVRNk3lLaI=";
};
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
];
passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
meta = with lib; {
description = "CRDTs based on Yrs";
homepage = "https://github.com/jupyter-server/pycrdt";
changelog = "https://github.com/jupyter-server/pycrdt/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
license = licenses.mit;
maintainers = teams.jupyter.members;
};
}