python3Packages.pyopencl: fix build

Fix the recently broken build by adding `pybind11`
to the build. Also set $HOME to a temporary directory during the build
to avoid "Permission denied" errors in the build script.

This also unbreaks `sasview` and `pybitmessage`.

See also #56826
See also https://hydra.nixos.org/build/89037506
This commit is contained in:
Maximilian Bosch 2019-03-07 22:29:14 +01:00
parent 94c3ac2574
commit d2379192b5
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -11,6 +11,7 @@
, six , six
, opencl-headers , opencl-headers
, ocl-icd , ocl-icd
, pybind11
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -18,7 +19,7 @@ buildPythonPackage rec {
version = "2018.2.2"; version = "2018.2.2";
checkInputs = [ pytest ]; checkInputs = [ pytest ];
buildInputs = [ opencl-headers ocl-icd ]; buildInputs = [ opencl-headers ocl-icd pybind11 ];
propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ]; propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];
@ -32,6 +33,10 @@ buildPythonPackage rec {
substituteInPlace setup.py --replace "pytest>=2" "" substituteInPlace setup.py --replace "pytest>=2" ""
''; '';
preBuild = ''
export HOME=$(mktemp -d)
'';
# gcc: error: pygpu_language_opencl.cpp: No such file or directory # gcc: error: pygpu_language_opencl.cpp: No such file or directory
doCheck = false; doCheck = false;