74 lines
1.5 KiB
Nix
74 lines
1.5 KiB
Nix
{ 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";
|
|
version = "5.7.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "b85e4de3d54cf4f14fe1d0515a980ccb49ddd4cdd21250cc0d4fb6374d50b1a7";
|
|
};
|
|
|
|
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 ""}
|
|
'';
|
|
|
|
meta = {
|
|
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
|
|
homepage = http://jupyter.org/;
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ fridh globin ];
|
|
};
|
|
}
|