summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyopencl
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pyopencl')
-rw-r--r--pkgs/development/python-modules/pyopencl/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix
index b1e81140a906..d983e2bc14cc 100644
--- a/pkgs/development/python-modules/pyopencl/default.nix
+++ b/pkgs/development/python-modules/pyopencl/default.nix
@@ -1,4 +1,5 @@
{ lib
+, stdenv
, fetchPypi
, buildPythonPackage
, Mako
@@ -12,14 +13,18 @@
, opencl-headers
, ocl-icd
, pybind11
+, mesa_drivers
}:
-buildPythonPackage rec {
+let
+ os-specific-buildInputs =
+ if stdenv.isDarwin then [ mesa_drivers.dev ] else [ ocl-icd ];
+in buildPythonPackage rec {
pname = "pyopencl";
version = "2021.1.4";
checkInputs = [ pytest ];
- buildInputs = [ opencl-headers ocl-icd pybind11 ];
+ buildInputs = [ opencl-headers pybind11 ] ++ os-specific-buildInputs;
propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];