1{ lib
2, buildPythonPackage
3, fetchPypi
4, hatch-jupyter-builder
5, hatchling
6, async-lru
7, packaging
8, tornado
9, ipykernel
10, jupyter-core
11, jupyter-lsp
12, jupyterlab-server
13, jupyter-server
14, notebook-shim
15, jinja2
16, tomli
17, pythonOlder
18, jupyter-packaging
19}:
20
21buildPythonPackage rec {
22 pname = "jupyterlab";
23 version = "4.0.6";
24 format = "pyproject";
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-bEOuWmof0v36/LNFQASVi95tp2Mxq7RM/8b55Daxm6E=";
31 };
32
33 nativeBuildInputs = [
34 hatch-jupyter-builder
35 hatchling
36 ];
37
38 propagatedBuildInputs = [
39 async-lru
40 packaging
41 tornado
42 ipykernel
43 jupyter-core
44 jupyter-lsp
45 jupyterlab-server
46 jupyter-server
47 notebook-shim
48 jinja2
49 ] ++ lib.optionals (pythonOlder "3.11") [
50 tomli
51 ];
52
53 makeWrapperArgs = [
54 "--set"
55 "JUPYTERLAB_DIR"
56 "$out/share/jupyter/lab"
57 ];
58
59 # Depends on npm
60 doCheck = false;
61
62 pythonImportsCheck = [
63 "jupyterlab"
64 ];
65
66 meta = with lib; {
67 changelog = "https://github.com/jupyterlab/jupyterlab/blob/v${version}/CHANGELOG.md";
68 description = "Jupyter lab environment notebook server extension";
69 license = licenses.bsd3;
70 homepage = "https://jupyter.org/";
71 maintainers = lib.teams.jupyter.members;
72 mainProgram = "jupyter-lab";
73 };
74}