pyopencl: enable package build for macOS

This commit is contained in:
Ryan Orendorff 2020-10-06 21:50:03 -06:00 committed by Jonathan Ringer
parent 26325e1340
commit 03aa75f46d
2 changed files with 10 additions and 3 deletions

View file

@ -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 ];

View file

@ -5866,7 +5866,9 @@ in {
phonemizer = callPackage ../development/python-modules/phonemizer { };
pyopencl = callPackage ../development/python-modules/pyopencl { };
pyopencl = callPackage ../development/python-modules/pyopencl {
mesa_drivers = pkgs.mesa.drivers;
};
pyopengl = callPackage ../development/python-modules/pyopengl { };