1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, hatch-jupyter-builder
6, hatch-nodejs-version
7, hatchling
8, pythonRelaxDepsHook
9, jupyter-events
10, jupyter-server
11, jupyter-server-fileid
12, jupyter-ydoc
13, jupyterlab
14, ypy-websocket
15, pytest-asyncio
16, pytest-jupyter
17, pytestCheckHook
18}:
19
20buildPythonPackage rec {
21 pname = "jupyter-collaboration";
22 version = "1.2.0";
23 format = "pyproject";
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchPypi {
28 pname = "jupyter_collaboration";
29 inherit version;
30 hash = "sha256-qhcCPAgHlBwt+Lt8NdDa+ZPhNNotCvNtz9WQx6OHvOc=";
31 };
32
33 postPatch = ''
34 sed -i "/^timeout/d" pyproject.toml
35 '';
36
37 nativeBuildInputs = [
38 hatch-jupyter-builder
39 hatch-nodejs-version
40 hatchling
41 jupyterlab
42 pythonRelaxDepsHook
43 ];
44
45 pythonRelaxDeps = [
46 "ypy-websocket"
47 ];
48
49 propagatedBuildInputs = [
50 jupyter-events
51 jupyter-server
52 jupyter-server-fileid
53 jupyter-ydoc
54 ypy-websocket
55 ];
56
57 nativeCheckInputs = [
58 pytest-asyncio
59 pytest-jupyter
60 pytestCheckHook
61 ];
62
63 pythonImportsCheck = [
64 "jupyter_collaboration"
65 ];
66
67 pytestFlagsArray = [
68 "-W" "ignore::DeprecationWarning"
69 ];
70
71 preCheck = ''
72 export HOME=$TEMP
73 '';
74
75 meta = with lib; {
76 description = "JupyterLab Extension enabling Real-Time Collaboration";
77 homepage = "https://github.com/jupyterlab/jupyter_collaboration";
78 changelog = "https://github.com/jupyterlab/jupyter_collaboration/blob/v${version}/CHANGELOG.md";
79 license = licenses.bsd3;
80 maintainers = teams.jupyter.members;
81 };
82}