diff --git a/pkgs/development/python-modules/jupyter_server/default.nix b/pkgs/development/python-modules/jupyter_server/default.nix new file mode 100644 index 00000000000..a9f98781b4f --- /dev/null +++ b/pkgs/development/python-modules/jupyter_server/default.nix @@ -0,0 +1,75 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pytestCheckHook +, pytest-tornasync +, jinja2 +, tornado +, pyzmq +, ipython_genutils +, traitlets +, jupyter_core +, jupyter_client +, nbformat +, nbconvert +, send2trash +, terminado +, prometheus_client +, anyio +, requests +}: + +buildPythonPackage rec { + pname = "jupyter_server"; + version = "1.4.1"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-sBJvI39nlTPuxGJEz8ZtYeOh+OwPrS1HNS+hnT51Tkc="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "anyio>=2.0.2" "anyio" + ''; + + propagatedBuildInputs = [ + jinja2 + tornado + pyzmq + ipython_genutils + traitlets + jupyter_core + jupyter_client + nbformat + nbconvert + send2trash + terminado + prometheus_client + anyio + ]; + + checkInputs = [ + pytestCheckHook + pytest-tornasync + requests + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + pytestFlagsArray = [ "jupyter_server/tests/" ]; + + # disabled failing tests + disabledTests = [ "test_server_extension_list" "test_list_formats" "test_base_url" ]; + + meta = with lib; { + description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications."; + homepage = "https://github.com/jupyter-server/jupyter_server"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.elohmeier ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 56f5e5d0a2c..6650e4dbb69 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3544,6 +3544,8 @@ in { jupyter_core = callPackage ../development/python-modules/jupyter_core { }; + jupyter_server = callPackage ../development/python-modules/jupyter_server { }; + jupyterhub = callPackage ../development/python-modules/jupyterhub { }; jupyterhub-ldapauthenticator = callPackage ../development/python-modules/jupyterhub-ldapauthenticator { };