1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, hatchling
5, jupyter-server
6, pytestCheckHook
7, pytest-tornasync
8}:
9
10buildPythonPackage rec {
11 pname = "notebook-shim";
12 version = "0.2.2";
13 format = "pyproject";
14
15 src = fetchFromGitHub {
16 owner = "jupyter";
17 repo = "notebook_shim";
18 rev = "refs/tags/v${version}";
19 hash = "sha256-/z4vXSBqeL2wSqJ0kFNgU0TSGUGByhxHNya8EO55+7s=";
20 };
21
22 nativeBuildInputs = [ hatchling ];
23 propagatedBuildInputs = [ jupyter-server ];
24
25 preCheck = ''
26 mv notebook_shim/conftest.py notebook_shim/tests
27 cd notebook_shim/tests
28 '';
29
30 # TODO: understand & possibly fix why tests fail. On github most testfiles
31 # have been comitted with msgs "wip" though.
32 doCheck = false;
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 pytest-tornasync
37 ];
38
39 pythonImportsCheck = [ "notebook_shim" ];
40
41 meta = with lib; {
42 description = "Switch frontends to Jupyter Server";
43 longDescription = ''
44 This project provides a way for JupyterLab and other frontends to switch
45 to Jupyter Server for their Python Web application backend.
46 '';
47 homepage = "https://github.com/jupyter/notebook_shim";
48 license = licenses.bsd3;
49 maintainers = with maintainers; [ friedelino ];
50 };
51}