From 07f036972a0ed9d4fef1277226c94528133a1f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kemetm=C3=BCller?= Date: Mon, 4 Mar 2019 22:32:03 +0100 Subject: [PATCH 1/2] pybind11: Fix build --- pkgs/development/libraries/pybind11/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/pybind11/default.nix b/pkgs/development/libraries/pybind11/default.nix index 0a8972d4876d6..b77a77e36255c 100644 --- a/pkgs/development/libraries/pybind11/default.nix +++ b/pkgs/development/libraries/pybind11/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - checkInputs = with python.pkgs; [ catch eigen pytest numpy scipy ]; + checkInputs = with python.pkgs; [ catch eigen pytest_3 numpy scipy ]; # Disable test_cmake_build test, as it fails in sandbox # https://github.com/pybind/pybind11/issues/1355 From 886cb95433b8ce1686d3280d749b217f5f201ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kemetm=C3=BCller?= Date: Mon, 4 Mar 2019 21:48:58 +0100 Subject: [PATCH 2/2] pythonPackages.pyopencl: Fix build --- .../development/python-modules/pyopencl/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index 2aaabe0760f31..44849b44384f0 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -1,4 +1,5 @@ { stdenv +, python , fetchPypi , buildPythonPackage , Mako @@ -11,6 +12,7 @@ , six , opencl-headers , ocl-icd +, pybind11 }: buildPythonPackage rec { @@ -18,7 +20,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 ]; @@ -27,11 +29,14 @@ buildPythonPackage rec { sha256 = "ebefe9505cad970dfb4c8024630ef5a546c68d22943dbb3e5677943a6d006ac6"; }; - # py.test is not needed during runtime, so remove it from `install_requires` - postPatch = '' - substituteInPlace setup.py --replace "pytest>=2" "" + preBuild = '' + export HOME=$(pwd) ''; + NIX_CFLAGS_COMPILE = [ + "-I${pybind11}/include/${python.libPrefix}/" + ]; + # gcc: error: pygpu_language_opencl.cpp: No such file or directory doCheck = false;