From 1966a0a4e1c1e07991406e3b90e3b088df252aea Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 10 Sep 2020 00:00:00 -0500 Subject: [PATCH] opencv: enable videoio on darwin --- pkgs/development/libraries/opencv/4.x.nix | 5 ++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index a2cd75093ce3..adeab6b44948 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -31,7 +31,7 @@ , enableDC1394 ? false, libdc1394 , enableDocs ? false, doxygen, graphviz-nox -, AVFoundation, Cocoa, VideoDecodeAcceleration, bzip2 +, AVFoundation, Cocoa, VideoDecodeAcceleration, CoreMedia, MediaToolbox, bzip2 }: assert blas.implementation == "openblas" && lapack.implementation == "openblas"; @@ -217,7 +217,7 @@ stdenv.mkDerivation { ++ lib.optionals enableTesseract [ tesseract leptonica ] ++ lib.optional enableTbb tbb ++ lib.optionals enableCuda [ cudatoolkit nvidia-optical-flow-sdk ] - ++ lib.optionals stdenv.isDarwin [ bzip2 AVFoundation Cocoa VideoDecodeAcceleration ] + ++ lib.optionals stdenv.isDarwin [ bzip2 AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox ] ++ lib.optionals enableDocs [ doxygen graphviz-nox ]; propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy; @@ -255,7 +255,6 @@ stdenv.mkDerivation { ] ++ lib.optionals stdenv.isDarwin [ "-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF" - "-DBUILD_opencv_videoio=OFF" ] ++ lib.optionals enablePython [ "-DOPENCV_SKIP_PYTHON_LOADER=ON" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 30889e14d570..0a4a112efba2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14567,7 +14567,7 @@ in }; opencv4 = callPackage ../development/libraries/opencv/4.x.nix { - inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration; + inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox; }; opencv = opencv4;