29 os-specific-buildInputs =
30 if stdenv.hostPlatform.isDarwin then [ darwin.apple_sdk.frameworks.OpenCL ] else [ ocl-icd ];
32 buildPythonPackage rec {
37 src = fetchFromGitHub {
40 rev = "refs/tags/v${version}";
41 fetchSubmodules = true;
42 hash = "sha256-HE7dARgKnZxqjAXX4iI1ml0N2BalyTo+ZAzjC2ThEN8=";
53 dontUseCmakeConfigure = true;
58 ] ++ os-specific-buildInputs;
66 nativeCheckInputs = [ pytestCheckHook ];
69 export HOME=$(mktemp -d)
71 # https://github.com/NixOS/nixpkgs/issues/255262
75 # https://github.com/inducer/pyopencl/issues/784 Note that these failing
76 # tests are all the tests that are available.
79 pythonImportsCheck = [
84 "pyopencl.elementwise"
89 description = "Python wrapper for OpenCL";
90 homepage = "https://github.com/pyopencl/pyopencl";
91 changelog = "https://github.com/inducer/pyopencl/releases/tag/v${version}";
92 license = lib.licenses.mit;
93 maintainers = with lib.maintainers; [ GaetanLepage ];
94 # ld: symbol(s) not found for architecture arm64
95 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;