2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-09-25 04:45:31 +00:00
|
|
|
, argon2_cffi
|
2020-04-24 23:36:52 +00:00
|
|
|
, nose
|
|
|
|
, nose_warnings_filters
|
|
|
|
, glibcLocales
|
|
|
|
, isPy3k
|
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
|
|
|
, jupyter_core
|
2021-10-28 06:52:43 +00:00
|
|
|
, jupyter-client
|
2020-04-24 23:36:52 +00:00
|
|
|
, nbformat
|
|
|
|
, 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";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "6.4.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "7bcdf79bd1cda534735bd9830d2cbedab4ee34d8fe1df6e7b946b3aab0902ba3";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = [ nose pytestCheckHook glibcLocales ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
|
2021-10-28 06:52:43 +00:00
|
|
|
jupyter-client nbformat nbconvert ipykernel terminado requests pexpect
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client argon2_cffi
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# disable warning_filters
|
|
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
|
|
|
echo "" > setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
2020-09-25 04:45:31 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
|
|
"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 ];
|
|
|
|
};
|
|
|
|
}
|