diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index c3f46d8e31ef..0263ef3096dd 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -13,6 +13,7 @@ , gflags , protobuf , config +, ocl-icd , enableJPEG ? true , libjpeg @@ -313,6 +314,8 @@ stdenv.mkDerivation { ] ++ lib.optionals stdenv.isDarwin [ "-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so" ] ++ lib.optionals enablePython [ "-DOPENCV_SKIP_PYTHON_LOADER=ON" ];