2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
2023-01-20 10:41:00 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-05-18 14:49:53 +00:00
|
|
|
, argon2-cffi
|
2020-04-24 23:36:52 +00:00
|
|
|
, glibcLocales
|
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
2023-01-20 10:41:00 +00:00
|
|
|
, jupyter-core
|
2021-10-28 06:52:43 +00:00
|
|
|
, jupyter-client
|
2020-04-24 23:36:52 +00:00
|
|
|
, nbformat
|
2023-01-20 10:41:00 +00:00
|
|
|
, nbclassic
|
2020-04-24 23:36:52 +00:00
|
|
|
, nbconvert
|
|
|
|
, ipykernel
|
|
|
|
, terminado
|
|
|
|
, requests
|
|
|
|
, send2trash
|
|
|
|
, pexpect
|
2021-08-27 14:25:00 +00:00
|
|
|
, prometheus-client
|
2020-09-25 04:45:31 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "6.5.2";
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-wYl+UxfiJfx4tFVJpqtLZo5MmW/QOgTpOP5eevK//9A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
checkInputs = [ pytestCheckHook glibcLocales ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter-core send2trash
|
|
|
|
jupyter-client nbformat nbclassic
|
|
|
|
nbconvert ipykernel terminado requests pexpect
|
2022-05-18 14:49:53 +00:00
|
|
|
prometheus-client argon2-cffi
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove selenium tests
|
|
|
|
rm -rf notebook/tests/selenium
|
2020-09-25 04:45:31 +00:00
|
|
|
export HOME=$TMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
disabledTests = [
|
|
|
|
# a "system_config" is generated, and fails many tests
|
|
|
|
"config"
|
|
|
|
"load_ordered"
|
|
|
|
# requires jupyter, but will cause circular imports
|
|
|
|
"test_run"
|
|
|
|
"TestInstallServerExtension"
|
|
|
|
"launch_socket"
|
|
|
|
"sock_server"
|
2020-12-07 07:45:13 +00:00
|
|
|
"test_list_formats" # tries to find python MIME type
|
2021-01-17 00:15:33 +00:00
|
|
|
"KernelCullingTest" # has a race condition failing on slower hardware
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2020-09-25 04:45:31 +00:00
|
|
|
"test_delete"
|
|
|
|
"test_checkpoints_follow_file"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
# requires local networking
|
|
|
|
"notebook/auth/tests/test_login.py"
|
|
|
|
"notebook/bundler/tests/test_bundler_api.py"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
|
|
|
homepage = "https://jupyter.org/";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
}
|