1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 jupyter-collaboration-ui,
11 jupyter-docprovider,
12 jupyter-server-ydoc,
13 jupyterlab,
14
15 # tests
16 dirty-equals,
17 httpx-ws,
18 pytest-jupyter,
19 pytest-timeout,
20 pytestCheckHook,
21 writableTmpDirAsHomeHook,
22}:
23
24buildPythonPackage rec {
25 pname = "jupyter-collaboration";
26 version = "4.0.2";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "jupyterlab";
31 repo = "jupyter-collaboration";
32 tag = "v${version}";
33 hash = "sha256-BCvTtrlP45YC9G/m/e8Nvbls7AugIaQzO2Gect1EmGE=";
34 };
35
36 sourceRoot = "${src.name}/projects/jupyter-collaboration";
37
38 build-system = [ hatchling ];
39
40 dependencies = [
41 jupyter-collaboration-ui
42 jupyter-docprovider
43 jupyter-server-ydoc
44 jupyterlab
45 ];
46
47 pythonImportsCheck = [ "jupyter_collaboration" ];
48
49 nativeCheckInputs = [
50 dirty-equals
51 httpx-ws
52 pytest-jupyter
53 pytest-timeout
54 pytestCheckHook
55 writableTmpDirAsHomeHook
56 ];
57
58 pytestFlagsArray = [
59 # pytest.PytestCacheWarning: could not create cache path /build/source/.pytest_cache/v/cache/nodeids: [Errno 13] Permission denied: '/build/source/pytest-cache-files-plraagdr'
60 "-p"
61 "no:cacheprovider"
62 "$src/tests"
63 ];
64
65 __darwinAllowLocalNetworking = true;
66
67 meta = {
68 description = "JupyterLab Extension enabling Real-Time Collaboration";
69 homepage = "https://github.com/jupyterlab/jupyter_collaboration";
70 changelog = "https://github.com/jupyterlab/jupyter_collaboration/blob/v${version}/CHANGELOG.md";
71 license = lib.licenses.bsd3;
72 teams = [ lib.teams.jupyter ];
73 };
74}