about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bokeh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/bokeh')
-rw-r--r--pkgs/development/python-modules/bokeh/default.nix71
-rw-r--r--pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch15
2 files changed, 41 insertions, 45 deletions
diff --git a/pkgs/development/python-modules/bokeh/default.nix b/pkgs/development/python-modules/bokeh/default.nix
index 158a3d3188225..d53371221202e 100644
--- a/pkgs/development/python-modules/bokeh/default.nix
+++ b/pkgs/development/python-modules/bokeh/default.nix
@@ -1,74 +1,55 @@
-{ lib
-, buildPythonPackage
+{ buildPythonPackage
 , fetchPypi
+, futures
+, isPy3k
 , isPyPy
-, mock
-, pytest
-, flask
 , jinja2
-, markupsafe
-, werkzeug
-, itsdangerous
-, dateutil
-, requests
-, six
-, pygments
-, pystache
-, markdown
-, pyyaml
-, pyzmq
-, tornado
-, colorama
-, isPy3k
-, futures
-, websocket_client
+, lib
+, mock
 , numpy
-, pandas
-, greenlet
-, python
-, bkcharts
+, nodejs
 , pillow
+, pytest
+, python
+, python-dateutil
+, pyyaml
 , selenium
+, six
+, substituteAll
+, tornado
 }:
 
 buildPythonPackage rec {
   pname = "bokeh";
-  version = "1.0.4";
+  version = "1.3.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ceeb6a75afc1b2de00c2b8b6da121dec3fb77031326897b80d4375a70e96aebf";
+    sha256 = "0m27j29jpi977y95k272xc24qkl5bkniy046cil116hrbgnppng2";
   };
 
-  disabled = isPyPy;
+  patches = [
+    (substituteAll {
+      src = ./hardcode-nodejs-npmjs-paths.patch;
+      node_bin = "${nodejs}/bin/node";
+      npm_bin = "${nodejs}/bin/npm";
+    })
+  ];
 
-  # Some test that uses tornado fails
-#   doCheck = false;
+  disabled = isPyPy;
 
   checkInputs = [ mock pytest pillow selenium ];
 
   propagatedBuildInputs = [
     pillow
-    flask
     jinja2
-    markupsafe
-    werkzeug
-    itsdangerous
-    dateutil
-    requests
+    python-dateutil
     six
-    pygments
-    pystache
-    markdown
     pyyaml
-    pyzmq
     tornado
-    colorama
-    bkcharts
+    numpy
   ]
-  ++ lib.optionals ( !isPy3k ) [ futures ]
-  ++ lib.optionals ( !isPy3k && !isPyPy ) [ websocket_client ]
-  ++ lib.optionals ( !isPyPy ) [ numpy pandas greenlet ];
+  ++ lib.optionals ( !isPy3k ) [ futures ];
 
   checkPhase = ''
     ${python.interpreter} -m unittest discover -s bokeh/tests
diff --git a/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch
new file mode 100644
index 0000000000000..f8f33c0021f27
--- /dev/null
+++ b/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch
@@ -0,0 +1,15 @@
+diff --git a/bokeh/util/compiler.py b/bokeh/util/compiler.py
+index a752aad7d..8af05ff63 100644
+--- a/bokeh/util/compiler.py
++++ b/bokeh/util/compiler.py
+@@ -442,8 +442,8 @@ def _detect_nodejs():
+     raise RuntimeError('node.js v%s or higher is needed to allow compilation of custom models ' % version +
+                        '("conda install nodejs" or follow https://nodejs.org/en/download/)')
+ 
+-_nodejs = None
+-_npmjs = None
++_nodejs = "@node_bin@"
++_npmjs = "@npm_bin@"
+ 
+ def _nodejs_path():
+     global _nodejs