2019-10-23 16:40:51 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, nose
|
|
|
|
, nose_warnings_filters
|
|
|
|
, glibcLocales
|
|
|
|
, isPy3k
|
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
|
|
|
, jupyter_core
|
|
|
|
, jupyter_client
|
|
|
|
, nbformat
|
|
|
|
, nbconvert
|
|
|
|
, ipykernel
|
|
|
|
, terminado
|
|
|
|
, requests
|
|
|
|
, send2trash
|
|
|
|
, pexpect
|
|
|
|
, prometheus_client
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2020-08-29 13:41:50 +02:00
|
|
|
version = "5.7.10";
|
2019-10-23 16:40:51 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-29 13:41:50 +02:00
|
|
|
sha256 = "b10107e1438e7a564292aa32510e610c88844cae03c882fe5286b891792b5c11";
|
2019-10-23 16:40:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
LC_ALL = "en_US.utf8";
|
|
|
|
|
|
|
|
checkInputs = [ nose glibcLocales ]
|
|
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
|
|
|
|
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
|
|
|
|
prometheus_client
|
|
|
|
];
|
|
|
|
|
|
|
|
# disable warning_filters
|
|
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
|
|
|
echo "" > setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove selenium tests
|
|
|
|
rm -rf notebook/tests/selenium
|
|
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
mkdir tmp
|
|
|
|
HOME=tmp nosetests -v ${if (stdenv.isDarwin) then ''
|
|
|
|
--exclude test_delete \
|
|
|
|
--exclude test_checkpoints_follow_file
|
|
|
|
''
|
|
|
|
else ""}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://jupyter.org/";
|
2019-10-23 16:40:51 +02:00
|
|
|
license = lib.licenses.bsd3;
|
2020-06-05 18:43:38 +02:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2019-10-23 16:40:51 +02:00
|
|
|
};
|
|
|
|
}
|