evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pycrdt / default.nix
bloba7704735a3cb82aa2705664a378cf33e48a30f8f
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
7   # buildInputs
8   libiconv,
10   # nativeBuildInputs
11   rustPlatform,
13   # tests
14   anyio,
15   objsize,
16   pydantic,
17   pytestCheckHook,
18   trio,
19   y-py,
21   nix-update-script,
24 buildPythonPackage rec {
25   pname = "pycrdt";
26   version = "0.10.6";
27   pyproject = true;
29   src = fetchFromGitHub {
30     owner = "jupyter-server";
31     repo = "pycrdt";
32     rev = "refs/tags/${version}";
33     hash = "sha256-TKSBTpOvAr1/HBn3HnwNdEwM1hgbvPdice8bcVhVmH0=";
34   };
36   postPatch = ''
37     cp ${./Cargo.lock} Cargo.lock
38   '';
40   cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
42   nativeBuildInputs = [
43     rustPlatform.cargoSetupHook
44     rustPlatform.maturinBuildHook
45   ];
47   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
49   dependencies = [ anyio ];
51   pythonImportsCheck = [ "pycrdt" ];
53   nativeCheckInputs = [
54     anyio
55     objsize
56     pydantic
57     pytestCheckHook
58     trio
59     y-py
60   ];
62   passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
64   meta = {
65     description = "CRDTs based on Yrs";
66     homepage = "https://github.com/jupyter-server/pycrdt";
67     changelog = "https://github.com/jupyter-server/pycrdt/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
68     license = lib.licenses.mit;
69     maintainers = lib.teams.jupyter.members;
70   };