1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatch-jupyter-builder,
6 hatchling,
7 async-lru,
8 httpx,
9 packaging,
10 tornado,
11 ipykernel,
12 jupyter-core,
13 jupyter-lsp,
14 jupyterlab-server,
15 jupyter-server,
16 notebook-shim,
17 jinja2,
18 tomli,
19 pythonOlder,
20}:
21
22buildPythonPackage rec {
23 pname = "jupyterlab";
24 version = "4.2.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-NW6SBaaiq2icR8j+SRnbpsB243bQPya6rcBXSMJDXdU=";
32 };
33
34 nativeBuildInputs = [
35 hatch-jupyter-builder
36 hatchling
37 ];
38
39 propagatedBuildInputs = [
40 async-lru
41 httpx
42 packaging
43 tornado
44 ipykernel
45 jupyter-core
46 jupyter-lsp
47 jupyterlab-server
48 jupyter-server
49 notebook-shim
50 jinja2
51 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
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 = [ "jupyterlab" ];
63
64 meta = with lib; {
65 changelog = "https://github.com/jupyterlab/jupyterlab/blob/v${version}/CHANGELOG.md";
66 description = "Jupyter lab environment notebook server extension";
67 license = licenses.bsd3;
68 homepage = "https://jupyter.org/";
69 maintainers = lib.teams.jupyter.members;
70 mainProgram = "jupyter-lab";
71 };
72}