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}:
24
25buildPythonPackage rec {
26 pname = "notebook";
27 version = "5.4.0";
28
29 src = fetchPypi {
30 inherit pname version;
31 sha256 = "dd431fad9bdd25aa9ff8265da096ef770475e21bf1d327982611a7de5cd904ca";
32 };
33
34 LC_ALL = "en_US.utf8";
35
36 buildInputs = [ nose glibcLocales ]
37 ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
38
39 propagatedBuildInputs = [
40 jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
41 jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
42 ];
43
44 # disable warning_filters
45 preCheck = lib.optionalString (!isPy3k) ''
46 echo "" > setup.cfg
47 cat setup.cfg
48 '';
49 checkPhase = ''
50 runHook preCheck
51 mkdir tmp
52 HOME=tmp nosetests -v ${if (stdenv.isDarwin) then ''
53 --exclude test_delete \
54 --exclude test_checkpoints_follow_file
55 ''
56 else ""}
57 '';
58
59 meta = {
60 description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
61 homepage = http://jupyter.org/;
62 license = lib.licenses.bsd3;
63 maintainers = with lib.maintainers; [ fridh globin ];
64 };
65}