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
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2021-03-23 19:22:30 +00:00
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, 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
|
|
|
|
, jupyter_core
|
2021-10-28 06:52:43 +00:00
|
|
|
, jupyter-client
|
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 {
|
|
|
|
pname = "jupyter_server";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.11.2";
|
2021-03-23 19:22:30 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "c1f32e0c1807ab2de37bf70af97a36b4436db0bc8af3124632b1f4441038bf95";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [ (fetchpatch
|
|
|
|
{ name = "Normalize-file-name-and-path.patch";
|
|
|
|
url = "https://github.com/jupyter-server/jupyter_server/pull/608/commits/345e26cdfd78651954b68708fa44119c2ac0dbd5.patch";
|
|
|
|
sha256 = "1kqz3dyh2w0h1g1fbvqa13q17hb6y32694rlaasyg213mq6g4k32";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
jupyter_core
|
2021-10-28 06:52:43 +00:00
|
|
|
jupyter-client
|
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
|
2021-03-23 19:22:30 +00:00
|
|
|
pytestCheckHook
|
|
|
|
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-09-18 10:52:07 +00:00
|
|
|
pytestFlagsArray = [ "jupyter_server" ];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
# disabled failing tests
|
2021-04-26 19:14:03 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_server_extension_list"
|
|
|
|
"test_list_formats"
|
|
|
|
"test_base_url"
|
|
|
|
"test_culling"
|
2021-05-28 09:39:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# attempts to use trashcan, build env doesn't allow this
|
|
|
|
"test_delete"
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2021-03-23 19:22:30 +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 ];
|
|
|
|
};
|
|
|
|
}
|