diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index dfb67b6a12a7a..00c595d1d2daf 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -213,11 +213,11 @@ stdenv.mkDerivation { # tesseract & leptonica. ++ lib.optionals enableTesseract [ tesseract leptonica ] ++ lib.optional enableTbb tbb - ++ lib.optional enableCuda cudatoolkit ++ lib.optionals stdenv.isDarwin [ bzip2 AVFoundation Cocoa VideoDecodeAcceleration ] ++ lib.optionals enableDocs [ doxygen graphviz-nox ]; - propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy; + propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy + ++ lib.optional enableCuda cudatoolkit; nativeBuildInputs = [ cmake pkg-config unzip ]; diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 548b0df096bcf..10459d959b299 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -269,11 +269,11 @@ stdenv.mkDerivation { # tesseract & leptonica. ++ 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 CoreMedia MediaToolbox ] ++ lib.optionals enableDocs [ doxygen graphviz-nox ]; - propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy; + propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy + ++ lib.optionals enableCuda [ cudatoolkit nvidia-optical-flow-sdk ]; nativeBuildInputs = [ cmake pkg-config unzip ];