at 25.11-pre 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # nativeBuildInputs 7 rustPlatform, 8 9 # tests 10 anyio, 11 objsize, 12 pydantic, 13 pytestCheckHook, 14 trio, 15 y-py, 16 17 nix-update-script, 18}: 19 20buildPythonPackage rec { 21 pname = "pycrdt"; 22 version = "0.12.15"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "jupyter-server"; 27 repo = "pycrdt"; 28 tag = version; 29 hash = "sha256-+DRHOX4X2ez+G/nHYnXfANNzdPU7QDbq6lBWBwLJoP4="; 30 }; 31 32 postPatch = '' 33 cp ${./Cargo.lock} Cargo.lock 34 ''; 35 36 cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; }; 37 38 nativeBuildInputs = [ 39 rustPlatform.cargoSetupHook 40 rustPlatform.maturinBuildHook 41 ]; 42 43 dependencies = [ anyio ]; 44 45 pythonImportsCheck = [ "pycrdt" ]; 46 47 nativeCheckInputs = [ 48 anyio 49 objsize 50 pydantic 51 pytestCheckHook 52 trio 53 y-py 54 ]; 55 56 pytestFlagsArray = [ 57 "-W" 58 "ignore::pytest.PytestUnknownMarkWarning" # requires unpackaged pytest-mypy-testing 59 ]; 60 61 passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; }; 62 63 meta = { 64 description = "CRDTs based on Yrs"; 65 homepage = "https://github.com/jupyter-server/pycrdt"; 66 changelog = "https://github.com/jupyter-server/pycrdt/blob/${version}/CHANGELOG.md"; 67 license = lib.licenses.mit; 68 teams = [ lib.teams.jupyter ]; 69 }; 70}