1{ stdenv 2, lib 3, buildPythonPackage 4, fetchPypi 5, nose 6, nose_warnings_filters 7, glibcLocales 8, isPy3k 9, mock 10, jinja2 11, tornado 12, ipython_genutils 13, traitlets 14, jupyter_core 15, jupyter_client 16, nbformat 17, nbconvert 18, ipykernel 19, terminado 20, requests 21, send2trash 22, pexpect 23, prometheus_client 24}: 25 26buildPythonPackage rec { 27 pname = "notebook"; 28 version = "5.6.0"; 29 30 src = fetchPypi { 31 inherit pname version; 32 sha256 = "e2c8e931cc19db4f8c63e6a396efbc13a228b2cb5b2919df011b946f28239a08"; 33 }; 34 35 LC_ALL = "en_US.utf8"; 36 37 checkInputs = [ nose glibcLocales ] 38 ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]); 39 40 propagatedBuildInputs = [ 41 jinja2 tornado ipython_genutils traitlets jupyter_core send2trash 42 jupyter_client nbformat nbconvert ipykernel terminado requests pexpect 43 prometheus_client 44 ]; 45 46 # disable warning_filters 47 preCheck = lib.optionalString (!isPy3k) '' 48 echo "" > setup.cfg 49 ''; 50 51 postPatch = '' 52 # Remove selenium tests 53 rm -rf notebook/tests/selenium 54 55 ''; 56 57 checkPhase = '' 58 runHook preCheck 59 mkdir tmp 60 HOME=tmp nosetests -v ${if (stdenv.isDarwin) then '' 61 --exclude test_delete \ 62 --exclude test_checkpoints_follow_file 63 '' 64 else ""} 65 ''; 66 67 meta = { 68 description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing"; 69 homepage = http://jupyter.org/; 70 license = lib.licenses.bsd3; 71 maintainers = with lib.maintainers; [ fridh globin ]; 72 }; 73}