2017-04-18 09:54:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, nose
|
2017-10-23 11:40:02 +00:00
|
|
|
, nose_warnings_filters
|
2017-04-18 09:54:43 +00:00
|
|
|
, glibcLocales
|
2017-10-23 11:40:02 +00:00
|
|
|
, isPy3k
|
2017-04-18 09:54:43 +00:00
|
|
|
, mock
|
|
|
|
, jinja2
|
|
|
|
, tornado
|
|
|
|
, ipython_genutils
|
|
|
|
, traitlets
|
|
|
|
, jupyter_core
|
|
|
|
, jupyter_client
|
|
|
|
, nbformat
|
|
|
|
, nbconvert
|
|
|
|
, ipykernel
|
|
|
|
, terminado
|
2017-05-07 10:55:45 +00:00
|
|
|
, requests
|
2017-04-18 09:54:43 +00:00
|
|
|
, pexpect
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notebook";
|
2017-10-23 11:40:02 +00:00
|
|
|
version = "5.2.0";
|
2017-04-18 09:54:43 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-10-23 11:40:02 +00:00
|
|
|
sha256 = "1sh3jkkmjzv17c3r8ii3kfhpxi6dkjk846b2lfy71g9qwqdcvbvz";
|
2017-04-18 09:54:43 +00:00
|
|
|
};
|
|
|
|
|
2017-10-23 11:40:02 +00:00
|
|
|
LC_ALL = "en_US.utf8";
|
2017-04-18 09:54:43 +00:00
|
|
|
|
2017-10-23 11:40:02 +00:00
|
|
|
buildInputs = [ nose glibcLocales ]
|
|
|
|
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
|
2017-04-18 09:54:43 +00:00
|
|
|
|
2017-10-23 11:40:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2 tornado ipython_genutils traitlets jupyter_core
|
|
|
|
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
|
|
|
|
];
|
2017-04-18 09:54:43 +00:00
|
|
|
|
2017-10-23 11:40:02 +00:00
|
|
|
# disable warning_filters
|
|
|
|
preCheck = lib.optionalString (!isPy3k) ''
|
|
|
|
echo "" > setup.cfg
|
|
|
|
cat setup.cfg
|
|
|
|
'';
|
2017-04-18 09:54:43 +00:00
|
|
|
checkPhase = ''
|
2017-10-23 11:40:02 +00:00
|
|
|
runHook preCheck
|
|
|
|
mkdir tmp
|
|
|
|
HOME=tmp nosetests -v
|
2017-04-18 09:54:43 +00: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 11:40:02 +00:00
|
|
|
maintainers = with lib.maintainers; [ fridh globin ];
|
2017-04-18 09:54:43 +00:00
|
|
|
};
|
2017-10-23 11:40:02 +00:00
|
|
|
}
|