2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
2021-05-28 09:39:13 +00:00
|
|
|
, stdenv
|
2021-03-23 19:22:30 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2023-01-20 10:41:00 +00:00
|
|
|
, hatch-jupyter-builder
|
|
|
|
, hatchling
|
2022-06-26 10:26:21 +00:00
|
|
|
, pandoc
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytest-console-scripts
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytest-jupyter
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytest-timeout
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytest-tornasync
|
2022-05-18 14:49:53 +00:00
|
|
|
, argon2-cffi
|
2021-03-23 19:22:30 +00:00
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, pyzmq
|
2022-05-18 14:49:53 +00:00
|
|
|
, ipykernel
|
2021-03-23 19:22:30 +00:00
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
2023-01-20 10:41:00 +00:00
|
|
|
, jupyter-core
|
2021-10-28 06:52:43 +00:00
|
|
|
, jupyter-client
|
2023-01-20 10:41:00 +00:00
|
|
|
, jupyter-events
|
|
|
|
, jupyter-server-terminals
|
2021-03-23 19:22:30 +00:00
|
|
|
, nbformat
|
|
|
|
, nbconvert
|
|
|
|
, send2trash
|
|
|
|
, terminado
|
2021-08-27 14:25:00 +00:00
|
|
|
, prometheus-client
|
2021-03-23 19:22:30 +00:00
|
|
|
, anyio
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2021-03-23 19:22:30 +00:00
|
|
|
, requests
|
2021-09-18 10:52:07 +00:00
|
|
|
, requests-unixsocket
|
2021-03-23 19:22:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-20 10:41:00 +00:00
|
|
|
pname = "jupyter-server";
|
|
|
|
version = "2.0.6";
|
|
|
|
format = "pyproject";
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2023-01-20 10:41:00 +00:00
|
|
|
pname = "jupyter_server";
|
|
|
|
inherit version;
|
|
|
|
hash= "sha256-jddZkukLfKVWeUoe1cylEmPGl6vG0N9WGvV0qhwKAz8=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatch-jupyter-builder
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
argon2-cffi
|
2021-03-23 19:22:30 +00:00
|
|
|
jinja2
|
|
|
|
tornado
|
|
|
|
pyzmq
|
|
|
|
ipython_genutils
|
|
|
|
traitlets
|
2023-01-20 10:41:00 +00:00
|
|
|
jupyter-core
|
2021-10-28 06:52:43 +00:00
|
|
|
jupyter-client
|
2023-01-20 10:41:00 +00:00
|
|
|
jupyter-events
|
|
|
|
jupyter-server-terminals
|
2021-03-23 19:22:30 +00:00
|
|
|
nbformat
|
|
|
|
nbconvert
|
|
|
|
send2trash
|
|
|
|
terminado
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2021-03-23 19:22:30 +00:00
|
|
|
anyio
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2021-09-18 10:52:07 +00:00
|
|
|
requests-unixsocket
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
ipykernel
|
2022-06-26 10:26:21 +00:00
|
|
|
pandoc
|
2021-03-23 19:22:30 +00:00
|
|
|
pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-console-scripts
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-jupyter
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-timeout
|
2021-03-23 19:22:30 +00:00
|
|
|
pytest-tornasync
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2021-09-18 10:52:07 +00:00
|
|
|
export PATH=$out/bin:$PATH
|
2021-03-23 19:22:30 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
disabledTests = [
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_cull_idle"
|
2021-05-28 09:39:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# attempts to use trashcan, build env doesn't allow this
|
|
|
|
"test_delete"
|
2022-07-14 12:49:19 +00:00
|
|
|
# test is presumable broken in sandbox
|
|
|
|
"test_authorized_requests"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/services/kernels/test_api.py"
|
|
|
|
"tests/services/sessions/test_api.py"
|
2022-10-21 18:38:19 +00:00
|
|
|
# nbconvert failed: `relax_add_props` kwargs of validate has been
|
|
|
|
# deprecated for security reasons, and will be removed soon.
|
|
|
|
"tests/nbconvert/test_handlers.py"
|
2022-06-26 10:26:21 +00:00
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
meta = with lib; {
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications";
|
2021-03-23 19:22:30 +00:00
|
|
|
homepage = "https://github.com/jupyter-server/jupyter_server";
|
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
maintainers = [ maintainers.elohmeier ];
|
|
|
|
};
|
|
|
|
}
|