diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index c84740ebcdc9..1d48d12a22b7 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -25,6 +25,8 @@ , enableEXR ? !stdenv.isDarwin , openexr , ilmbase +, enableJPEG2000 ? true +, openjpeg , enableEigen ? true , eigen , enableOpenblas ? true @@ -255,6 +257,7 @@ stdenv.mkDerivation { ++ lib.optional enableTIFF libtiff ++ lib.optional enableWebP libwebp ++ lib.optionals enableEXR [ openexr ilmbase ] + ++ lib.optional enableJPEG2000 openjpeg ++ lib.optional enableFfmpeg ffmpeg ++ lib.optionals (enableFfmpeg && stdenv.isDarwin) [ VideoDecodeAcceleration bzip2 ] @@ -302,6 +305,8 @@ stdenv.mkDerivation { (opencvFlag "JPEG" enableJPEG) (opencvFlag "PNG" enablePNG) (opencvFlag "OPENEXR" enableEXR) + (opencvFlag "OPENJPEG" enableJPEG2000) + "-DWITH_JASPER=OFF" # OpenCV falls back to a vendored copy of Jasper when OpenJPEG is disabled (opencvFlag "CUDA" enableCuda) (opencvFlag "CUBLAS" enableCuda) (opencvFlag "TBB" enableTbb)