about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/jupyterlab/default.nix
blob: 433031d73065a2385bf3fa8d1f9f55b00913c8e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{ lib
, buildPythonPackage
, fetchPypi
, ipython
, packaging
, tornado
, jupyter-core
, jupyterlab_server
, jupyter-server
, jupyter-server-ydoc
, notebook
, jinja2
, tomli
, pythonOlder
, jupyter-packaging
, pythonRelaxDepsHook
, nbclassic
}:

buildPythonPackage rec {
  pname = "jupyterlab";
  version = "3.6.3";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Nz6c+4py7dKUvhTxZmJWOiIM7PD7Jt56qxr5optom4I=";
  };

  nativeBuildInputs = [
    jupyter-packaging
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "jupyter-ydoc"
    "jupyter-server-ydoc"
  ];

  propagatedBuildInputs = [
    ipython
    packaging
    tornado
    jupyter-core
    jupyterlab_server
    jupyter-server
    jupyter-server-ydoc
    nbclassic
    notebook
    jinja2
  ] ++ lib.optionals (pythonOlder "3.11") [
    tomli
  ];

  makeWrapperArgs = [
    "--set"
    "JUPYTERLAB_DIR"
    "$out/share/jupyter/lab"
  ];

  # Depends on npm
  doCheck = false;

  pythonImportsCheck = [
    "jupyterlab"
  ];

  meta = with lib; {
    changelog = "https://github.com/jupyterlab/jupyterlab/releases/tag/v${version}";
    description = "Jupyter lab environment notebook server extension";
    license = with licenses; [ bsd3 ];
    homepage = "https://jupyter.org/";
    maintainers = with maintainers; [ zimbatm ];
  };
}