summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyopencl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pyopencl/default.nix')
-rw-r--r--pkgs/development/python-modules/pyopencl/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix
index 2aaabe0760f..624dca05e1e 100644
--- a/pkgs/development/python-modules/pyopencl/default.nix
+++ b/pkgs/development/python-modules/pyopencl/default.nix
@@ -11,6 +11,7 @@
 , six
 , opencl-headers
 , ocl-icd
+, pybind11
 }:
 
 buildPythonPackage rec {
@@ -18,7 +19,7 @@ buildPythonPackage rec {
   version = "2018.2.3";
 
   checkInputs = [ pytest ];
-  buildInputs = [ opencl-headers ocl-icd ];
+  buildInputs = [ opencl-headers ocl-icd pybind11 ];
 
   propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];
 
@@ -32,6 +33,10 @@ buildPythonPackage rec {
     substituteInPlace setup.py --replace "pytest>=2" ""
   '';
 
+  preBuild = ''
+    export HOME=$(mktemp -d)
+  '';
+
   # gcc: error: pygpu_language_opencl.cpp: No such file or directory
   doCheck = false;