summary refs log tree commit diff
path: root/pkgs/applications/video/clipgrab/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/clipgrab/default.nix')
-rw-r--r--pkgs/applications/video/clipgrab/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/applications/video/clipgrab/default.nix b/pkgs/applications/video/clipgrab/default.nix
index 287557d6f53..2bd30c9e529 100644
--- a/pkgs/applications/video/clipgrab/default.nix
+++ b/pkgs/applications/video/clipgrab/default.nix
@@ -1,6 +1,7 @@
 { lib, fetchurl, makeDesktopItem, ffmpeg
 , qmake, qttools, mkDerivation
 , qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtwebchannel, qtwebengine
+, yt-dlp
 }:
 
 mkDerivation rec {
@@ -16,7 +17,15 @@ mkDerivation rec {
   buildInputs = [ ffmpeg qtbase qtdeclarative qtlocation qtquickcontrols2 qtwebchannel qtwebengine ];
   nativeBuildInputs = [ qmake qttools ];
 
-  postPatch = lib.optionalString (ffmpeg != null) ''
+  patches = [
+    ./yt-dlp-path.patch
+  ];
+
+  postPatch = ''
+  substituteInPlace youtube_dl.cpp \
+    --replace 'QString YoutubeDl::path = QString();' \
+              'QString YoutubeDl::path = QString("${yt-dlp}/bin/yt-dlp");'
+  '' + lib.optionalString (ffmpeg != null) ''
   substituteInPlace converter_ffmpeg.cpp \
     --replace '"ffmpeg"' '"${ffmpeg.bin}/bin/ffmpeg"' \
     --replace '"ffmpeg ' '"${ffmpeg.bin}/bin/ffmpeg '