2018-03-19 01:02:14 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2017-04-18 11:54:43 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, nose
|
2017-10-23 13:40:02 +02:00
|
|
|
, nose_warnings_filters
|
2017-04-18 11:54:43 +02:00
|
|
|
, glibcLocales
|
2017-10-23 13:40:02 +02:00
|
|
|
, isPy3k
|
2017-04-18 11:54:43 +02:00
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
|
|
|
, jupyter_core
|
|
|
|
, jupyter_client
|
|
|
|
, nbformat
|
|
|
|
, nbconvert
|
|
|
|
, ipykernel
|
|
|
|
, terminado
|
2017-05-07 12:55:45 +02:00
|
|
|
, requests
|
2018-01-16 22:08:03 +01:00
|
|
|
, send2trash
|
2017-04-18 11:54:43 +02:00
|
|
|
, pexpect
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2018-03-22 04:40:54 +01:00
|
|
|
version = "5.4.1";
|
2017-04-18 11:54:43 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-03-22 04:40:54 +01:00
|
|
|
sha256 = "01l6yp78sp27vns4cxh8ybr7x0pixxn97cp0i3w6s0lv1v8l6qbx";
|
2017-04-18 11:54:43 +02:00
|
|
|
};
|
|
|
|
|
2017-10-23 13:40:02 +02:00
|
|
|
LC_ALL = "en_US.utf8";
|
2017-04-18 11:54:43 +02:00
|
|
|
|
2018-03-22 10:41:10 +01:00
|
|
|
checkInputs = [ nose glibcLocales ]
|
2017-10-23 13:40:02 +02:00
|
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
2017-04-18 11:54:43 +02:00
|
|
|
|
2017-10-23 13:40:02 +02:00
|
|
|
propagatedBuildInputs = [
|
2018-01-16 22:08:03 +01:00
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
|
2017-10-23 13:40:02 +02:00
|
|
|
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
|
|
|
|
];
|
2017-04-18 11:54:43 +02:00
|
|
|
|
2017-10-23 13:40:02 +02:00
|
|
|
# disable warning_filters
|
|
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
2018-03-22 13:48:09 +01:00
|
|
|
echo "" > setup.cfg
|
2017-10-23 13:40:02 +02:00
|
|
|
'';
|
2018-03-22 10:41:10 +01:00
|
|
|
|
2017-04-18 11:54:43 +02:00
|
|
|
checkPhase = ''
|
2017-10-23 13:40:02 +02:00
|
|
|
runHook preCheck
|
|
|
|
mkdir tmp
|
2018-03-19 01:02:14 +01:00
|
|
|
HOME=tmp nosetests -v ${if (stdenv.isDarwin) then ''
|
|
|
|
--exclude test_delete \
|
|
|
|
--exclude test_checkpoints_follow_file
|
|
|
|
''
|
|
|
|
else ""}
|
2017-04-18 11:54:43 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
|
|
|
homepage = http://jupyter.org/;
|
|
|
|
license = lib.licenses.bsd3;
|
2017-10-23 13:40:02 +02:00
|
|
|
maintainers = with lib.maintainers; [ fridh globin ];
|
2017-04-18 11:54:43 +02:00
|
|
|
};
|
2017-10-23 13:40:02 +02:00
|
|
|
}
|