about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-10-23 16:40:51 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-10-23 16:40:51 +0200
commit4a979b88718da624dae3b3a35bf9f8527fb22a7c (patch)
treee6c5bb71181bbce1b17380ceab64a8cc5218a6c2 /pkgs/development
parentaf491cbb7d691b487bb9058338329913eac7d331 (diff)
downloadnixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar.gz
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar.bz2
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar.lz
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar.xz
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.tar.zst
nixlib-4a979b88718da624dae3b3a35bf9f8527fb22a7c.zip
python2Packages.notebook: restore
as it is a dependency of sage.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/notebook/2.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/notebook/2.nix b/pkgs/development/python-modules/notebook/2.nix
new file mode 100644
index 000000000000..d081a5a92fbe
--- /dev/null
+++ b/pkgs/development/python-modules/notebook/2.nix
@@ -0,0 +1,76 @@
+{ 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.8";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "573e0ae650c5d76b18b6e564ba6d21bf321d00847de1d215b418acb64f056eb8";
+  };
+
+  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 ""}
+  '';
+
+  # Some of the tests use localhost networking.
+  __darwinAllowLocalNetworking = true;
+
+  meta = {
+    description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
+    homepage = https://jupyter.org/;
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ fridh ];
+  };
+}