2018-03-19 00:02:14 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2017-04-18 10:54:43 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-08-17 03:11:12 +01:00
|
|
|
, argon2_cffi
|
2017-04-18 10:54:43 +01:00
|
|
|
, nose
|
2017-10-23 12:40:02 +01:00
|
|
|
, nose_warnings_filters
|
2017-04-18 10:54:43 +01:00
|
|
|
, glibcLocales
|
2017-10-23 12:40:02 +01:00
|
|
|
, isPy3k
|
2017-04-18 10:54:43 +01:00
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
2020-08-17 03:11:12 +01:00
|
|
|
, jupyter
|
2017-04-18 10:54:43 +01:00
|
|
|
, jupyter_core
|
|
|
|
, jupyter_client
|
|
|
|
, nbformat
|
|
|
|
, nbconvert
|
|
|
|
, ipykernel
|
|
|
|
, terminado
|
2017-05-07 11:55:45 +01:00
|
|
|
, requests
|
2018-01-16 21:08:03 +00:00
|
|
|
, send2trash
|
2017-04-18 10:54:43 +01:00
|
|
|
, pexpect
|
2018-07-28 15:43:01 +01:00
|
|
|
, prometheus_client
|
2020-08-17 03:11:12 +01:00
|
|
|
, pytestCheckHook
|
2017-04-18 10:54:43 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2020-09-22 19:04:19 +01:00
|
|
|
version = "6.1.4";
|
2019-10-17 16:30:58 +01:00
|
|
|
disabled = !isPy3k;
|
2017-04-18 10:54:43 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-22 19:04:19 +01:00
|
|
|
sha256 = "0cnyi4zd3byh7zixdj2q71axm31xgjiyfklh1c63c87acgwh2zb8";
|
2017-04-18 10:54:43 +01:00
|
|
|
};
|
|
|
|
|
2017-10-23 12:40:02 +01:00
|
|
|
LC_ALL = "en_US.utf8";
|
2017-04-18 10:54:43 +01:00
|
|
|
|
2020-08-17 03:11:12 +01:00
|
|
|
checkInputs = [ nose pytestCheckHook glibcLocales ]
|
2017-10-23 12:40:02 +01:00
|
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
2017-04-18 10:54:43 +01:00
|
|
|
|
2017-10-23 12:40:02 +01:00
|
|
|
propagatedBuildInputs = [
|
2018-01-16 21:08:03 +00:00
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
|
2017-10-23 12:40:02 +01:00
|
|
|
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
|
2020-08-17 03:11:12 +01:00
|
|
|
prometheus_client argon2_cffi
|
2017-10-23 12:40:02 +01:00
|
|
|
];
|
2017-04-18 10:54:43 +01:00
|
|
|
|
2017-10-23 12:40:02 +01:00
|
|
|
# disable warning_filters
|
|
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
2018-03-22 12:48:09 +00:00
|
|
|
echo "" > setup.cfg
|
2017-10-23 12:40:02 +01:00
|
|
|
'';
|
2018-03-22 09:41:10 +00:00
|
|
|
|
2018-06-22 11:46:13 +01:00
|
|
|
postPatch = ''
|
|
|
|
# Remove selenium tests
|
|
|
|
rm -rf notebook/tests/selenium
|
2020-08-17 03:11:12 +01:00
|
|
|
export HOME=$TMPDIR
|
2018-06-22 11:46:13 +01:00
|
|
|
'';
|
|
|
|
|
2020-08-17 03:11:12 +01: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-09-23 06:52:18 +01:00
|
|
|
] ++ lib.optional stdenv.isDarwin [
|
2020-09-22 19:04:19 +01:00
|
|
|
"test_delete"
|
2020-09-23 06:52:18 +01:00
|
|
|
"test_checkpoints_follow_file"
|
2020-08-17 03:11:12 +01:00
|
|
|
];
|
2017-04-18 10:54:43 +01:00
|
|
|
|
2019-09-14 20:20:54 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2017-04-18 10:54:43 +01:00
|
|
|
meta = {
|
|
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://jupyter.org/";
|
2017-04-18 10:54:43 +01:00
|
|
|
license = lib.licenses.bsd3;
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
2017-04-18 10:54:43 +01:00
|
|
|
};
|
2017-10-23 12:40:02 +01:00
|
|
|
}
|