1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatch-nodejs-version,
8 hatchling,
9
10 # dependencies
11 pycrdt,
12 pytestCheckHook,
13
14 # tests
15 websockets,
16 ypy-websocket,
17}:
18
19buildPythonPackage rec {
20 pname = "jupyter-ydoc";
21 version = "3.1.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "jupyter-server";
26 repo = "jupyter_ydoc";
27 tag = "v${version}";
28 hash = "sha256-AI/Ml1MgMFaclJxuHbZMXT8Cf531tzX0uaWPVg6SgMM=";
29 };
30
31 build-system = [
32 hatch-nodejs-version
33 hatchling
34 ];
35
36 dependencies = [ pycrdt ];
37
38 pythonImportsCheck = [ "jupyter_ydoc" ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 websockets
43 ypy-websocket
44 ];
45
46 # requires a Node.js environment
47 doCheck = false;
48
49 meta = {
50 changelog = "https://github.com/jupyter-server/jupyter_ydoc/blob/${src.tag}/CHANGELOG.md";
51 description = "Document structures for collaborative editing using Ypy";
52 homepage = "https://github.com/jupyter-server/jupyter_ydoc";
53 license = lib.licenses.bsd3;
54 teams = [ lib.teams.jupyter ];
55 };
56}