diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index 263bfe490ba7..72e6376c6f72 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook +{ mkDerivation, config, lib, fetchurl, cmake, doxygen, extra-cmake-modules, wrapGAppsHook # For `digitaglinktree` , perl, sqlite @@ -52,6 +52,9 @@ , breeze-icons , oxygen + +, cudaSupport ? config.cudaSupport or false +, cudaPackages ? {} }: mkDerivation rec { @@ -63,7 +66,15 @@ mkDerivation rec { sha256 = "sha256-o/MPAbfRttWFgivNXr+N9p4P8CRWOnJGLr+AadvaIuE="; }; - nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ]; + nativeBuildInputs = [ + cmake + doxygen + extra-cmake-modules + kdoctools + wrapGAppsHook + ] ++ lib.optionals cudaSupport (with cudaPackages; [ + cuda_nvcc + ]); buildInputs = [ bison @@ -109,7 +120,9 @@ mkDerivation rec { marble oxygen threadweaver - ]; + ] ++ lib.optionals cudaSupport (with cudaPackages; [ + cuda_cudart + ]); cmakeFlags = [ "-DENABLE_MYSQLSUPPORT=1" diff --git a/pkgs/development/libraries/mlt/qt-5.nix b/pkgs/development/libraries/mlt/qt-5.nix index e993cfcf8ded..dce5f18c4fb6 100644 --- a/pkgs/development/libraries/mlt/qt-5.nix +++ b/pkgs/development/libraries/mlt/qt-5.nix @@ -1,4 +1,5 @@ -{ lib +{ config +, lib , fetchFromGitHub , cmake , SDL @@ -23,6 +24,8 @@ , rubberband , mkDerivation , which +, cudaSupport ? config.cudaSupport or false +, cudaPackages ? {} }: mkDerivation rec { @@ -55,9 +58,17 @@ mkDerivation rec { ladspa-sdk ladspaPlugins rubberband - ]; + ] ++ lib.optionals cudaSupport (with cudaPackages; [ + cuda_cudart + ]); - nativeBuildInputs = [ cmake which pkg-config ]; + nativeBuildInputs = [ + cmake + which + pkg-config + ] ++ lib.optionals cudaSupport (with cudaPackages; [ + cuda_nvcc + ]); outputs = [ "out" "dev" ];