From 8e84172b2d298055af41ebca903794dce8f575d8 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Fri, 5 Jan 2018 20:32:04 -0500 Subject: [PATCH] opencv3: fix enableFfmpeg on darwin The VideoDecodeAcceleration framework and bzip2 library are needed when enableFfmpeg is set to true on darwin. --- pkgs/development/libraries/opencv/3.x.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index a9b3c85d3965..bcb3bde5ad7d 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -24,7 +24,7 @@ , enableTesseract ? false, tesseract, leptonica , enableDocs ? false, doxygen, graphviz-nox -, AVFoundation, Cocoa, QTKit +, AVFoundation, Cocoa, QTKit, VideoDecodeAcceleration, bzip2 }: let @@ -168,6 +168,8 @@ stdenv.mkDerivation rec { ++ lib.optionals enableEXR [ openexr ilmbase ] ++ lib.optional enableJPEG2K jasper ++ lib.optional enableFfmpeg ffmpeg + ++ lib.optionals (enableFfmpeg && stdenv.isDarwin) + [ VideoDecodeAcceleration bzip2 ] ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ]) ++ lib.optional enableEigen eigen ++ lib.optional enableOpenblas openblas diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e602c00e26c..a219d00abf26 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10295,7 +10295,7 @@ with pkgs; opencv3 = callPackage ../development/libraries/opencv/3.x.nix { enableCuda = config.cudaSupport or false; cudatoolkit = cudatoolkit8; - inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit; + inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit VideoDecodeAcceleration; }; # this ctl version is needed by openexr_viewers