about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/bombono/default.nix4
-rw-r--r--pkgs/applications/video/byzanz/default.nix4
-rw-r--r--pkgs/applications/video/devede/default.nix4
-rw-r--r--pkgs/applications/video/dvdstyler/default.nix4
-rw-r--r--pkgs/applications/video/entangle/default.nix4
-rw-r--r--pkgs/applications/video/flowblade/default.nix4
-rw-r--r--pkgs/applications/video/gnome-mplayer/default.nix4
-rw-r--r--pkgs/applications/video/gnomecast/default.nix4
-rw-r--r--pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix4
-rw-r--r--pkgs/applications/video/handbrake/default.nix4
-rw-r--r--pkgs/applications/video/hypnotix/default.nix4
-rw-r--r--pkgs/applications/video/imagination/default.nix4
-rw-r--r--pkgs/applications/video/jellyfin-mpv-shim/default.nix4
-rw-r--r--pkgs/applications/video/kazam/default.nix4
-rw-r--r--pkgs/applications/video/media-downloader/default.nix4
-rw-r--r--pkgs/applications/video/mpv/scripts/buildLua.nix147
-rw-r--r--pkgs/applications/video/mpv/scripts/chapterskip.nix24
-rw-r--r--pkgs/applications/video/mpv/scripts/convert.nix33
-rw-r--r--pkgs/applications/video/mpv/scripts/cutter.nix14
-rw-r--r--pkgs/applications/video/mpv/scripts/default.nix218
-rw-r--r--pkgs/applications/video/mpv/scripts/dynamic-crop.nix9
-rw-r--r--pkgs/applications/video/mpv/scripts/inhibit-gnome.nix19
-rw-r--r--pkgs/applications/video/mpv/scripts/memo.nix11
-rw-r--r--pkgs/applications/video/mpv/scripts/modernx-zydezu.nix11
-rw-r--r--pkgs/applications/video/mpv/scripts/modernx.nix11
-rw-r--r--pkgs/applications/video/mpv/scripts/mpris.nix21
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix16
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-notify-send.nix19
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix11
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix14
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-webm.nix11
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv.nix41
-rw-r--r--pkgs/applications/video/mpv/scripts/mpvacious.nix27
-rw-r--r--pkgs/applications/video/mpv/scripts/occivink.nix68
-rw-r--r--pkgs/applications/video/mpv/scripts/quack.nix18
-rw-r--r--pkgs/applications/video/mpv/scripts/quality-menu.nix15
-rw-r--r--pkgs/applications/video/mpv/scripts/reload.nix18
-rw-r--r--pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix22
-rw-r--r--pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix12
-rw-r--r--pkgs/applications/video/mpv/scripts/sponsorblock.nix17
-rw-r--r--pkgs/applications/video/mpv/scripts/thumbfast.nix15
-rw-r--r--pkgs/applications/video/mpv/scripts/thumbnail.nix10
-rw-r--r--pkgs/applications/video/mpv/scripts/uosc.nix17
-rw-r--r--pkgs/applications/video/mpv/scripts/videoclip.nix33
-rw-r--r--pkgs/applications/video/mpv/scripts/visualizer.nix4
-rw-r--r--pkgs/applications/video/mpv/scripts/vr-reversal.nix14
-rw-r--r--pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix17
-rw-r--r--pkgs/applications/video/mpv/scripts/youtube-upnext.nix10
-rw-r--r--pkgs/applications/video/obs-studio/default.nix4
-rw-r--r--pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix4
-rw-r--r--pkgs/applications/video/openshot-qt/default.nix4
-rw-r--r--pkgs/applications/video/peek/default.nix4
-rw-r--r--pkgs/applications/video/pipe-viewer/default.nix6
-rw-r--r--pkgs/applications/video/pitivi/default.nix4
-rw-r--r--pkgs/applications/video/plex-mpv-shim/default.nix4
-rw-r--r--pkgs/applications/video/recapp/default.nix4
-rw-r--r--pkgs/applications/video/rtabmap/default.nix4
-rw-r--r--pkgs/applications/video/screenkey/default.nix6
-rw-r--r--pkgs/applications/video/streamlink-twitch-gui/bin.nix4
-rw-r--r--pkgs/applications/video/subtitleeditor/default.nix4
-rw-r--r--pkgs/applications/video/tartube/default.nix4
-rw-r--r--pkgs/applications/video/timelens/default.nix4
-rw-r--r--pkgs/applications/video/xplayer/default.nix4
63 files changed, 615 insertions, 456 deletions
diff --git a/pkgs/applications/video/bombono/default.nix b/pkgs/applications/video/bombono/default.nix
index 8ad77a6680191..87545d5bceecb 100644
--- a/pkgs/applications/video/bombono/default.nix
+++ b/pkgs/applications/video/bombono/default.nix
@@ -15,7 +15,7 @@
 , libdvdread
 , libxmlxx
 , mjpegtools
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 let
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
       --replace "lib_mbase_env['CPPDEFINES']" "list(lib_mbase_env['CPPDEFINES'])"
   '';
 
-  nativeBuildInputs = [ wrapGAppsHook scons pkg-config gettext ];
+  nativeBuildInputs = [ wrapGAppsHook3 scons pkg-config gettext ];
 
   buildInputs = [
     boost
diff --git a/pkgs/applications/video/byzanz/default.nix b/pkgs/applications/video/byzanz/default.nix
index e3a97197d1049..bc88c24814678 100644
--- a/pkgs/applications/video/byzanz/default.nix
+++ b/pkgs/applications/video/byzanz/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv
 , fetchgit
-, wrapGAppsHook
+, wrapGAppsHook3
 , cairo
 , glib
 , gnome
@@ -51,7 +51,7 @@ stdenv.mkDerivation {
     gst-plugins-good
     gst-plugins-ugly
     gst-libav
-    wrapGAppsHook
+    wrapGAppsHook3
   ]);
 
   meta = with lib; {
diff --git a/pkgs/applications/video/devede/default.nix b/pkgs/applications/video/devede/default.nix
index 22689e27d6e9a..f17638d42e3b7 100644
--- a/pkgs/applications/video/devede/default.nix
+++ b/pkgs/applications/video/devede/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchFromGitLab, python3Packages, ffmpeg, mplayer, vcdimager, cdrkit, dvdauthor
-, gtk3, gettext, wrapGAppsHook, gdk-pixbuf, gobject-introspection }:
+, gtk3, gettext, wrapGAppsHook3, gdk-pixbuf, gobject-introspection }:
 
 let
   inherit (python3Packages) dbus-python buildPythonApplication pygobject3 urllib3 setuptools;
@@ -16,7 +16,7 @@ in buildPythonApplication rec {
   };
 
   nativeBuildInputs = [
-    gettext wrapGAppsHook
+    gettext wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/dvdstyler/default.nix b/pkgs/applications/video/dvdstyler/default.nix
index 18018f88d0256..e25bdf877a844 100644
--- a/pkgs/applications/video/dvdstyler/default.nix
+++ b/pkgs/applications/video/dvdstyler/default.nix
@@ -16,7 +16,7 @@
 , libexif
 , libjpeg
 , pkg-config
-, wrapGAppsHook
+, wrapGAppsHook3
 , wxGTK32
 , wxSVG
 , xine-ui
@@ -53,7 +53,7 @@ in stdenv.mkDerivation rec {
     gettext
     gobject-introspection
     pkg-config
-    wrapGAppsHook
+    wrapGAppsHook3
     xmlto
     zip
   ];
diff --git a/pkgs/applications/video/entangle/default.nix b/pkgs/applications/video/entangle/default.nix
index cfab93dbcd71a..c06513a0fc0c4 100644
--- a/pkgs/applications/video/entangle/default.nix
+++ b/pkgs/applications/video/entangle/default.nix
@@ -9,7 +9,7 @@
 , perl
 , python3
 , pkgconf
-, wrapGAppsHook
+, wrapGAppsHook3
 , at-spi2-core
 , dbus
 , elfutils
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
     perl # for pod2man and build scripts
     python3 # for build scripts
     pkgconf
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/flowblade/default.nix b/pkgs/applications/video/flowblade/default.nix
index 937f5865d4043..fff387881ccad 100644
--- a/pkgs/applications/video/flowblade/default.nix
+++ b/pkgs/applications/video/flowblade/default.nix
@@ -1,6 +1,6 @@
 { lib, fetchFromGitHub, stdenv
 , ffmpeg, frei0r, sox, gtk3, python3, ladspaPlugins
-, gobject-introspection, makeWrapper, wrapGAppsHook
+, gobject-introspection, makeWrapper, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation rec {
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     (python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow libusb1 ]))
   ];
 
-  nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook ];
+  nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook3 ];
 
   installPhase = ''
     runHook preInstall
diff --git a/pkgs/applications/video/gnome-mplayer/default.nix b/pkgs/applications/video/gnome-mplayer/default.nix
index 09ed7efaf0c0b..436f31ac5a01d 100644
--- a/pkgs/applications/video/gnome-mplayer/default.nix
+++ b/pkgs/applications/video/gnome-mplayer/default.nix
@@ -1,5 +1,5 @@
 {lib, stdenv, substituteAll, fetchFromGitHub, pkg-config, gettext, glib, gtk3, gmtk, dbus, dbus-glib
-, libnotify, libpulseaudio, mplayer, wrapGAppsHook }:
+, libnotify, libpulseaudio, mplayer, wrapGAppsHook3 }:
 
 stdenv.mkDerivation rec {
   pname = "gnome-mplayer";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     sha256 = "0qvy9fllvg1mad6y1j79iaqa6khs0q2cb0z62yfg4srbr07fi8xr";
   };
 
-  nativeBuildInputs = [ pkg-config gettext wrapGAppsHook ];
+  nativeBuildInputs = [ pkg-config gettext wrapGAppsHook3 ];
   buildInputs = [ glib gtk3 gmtk dbus dbus-glib libnotify libpulseaudio ];
 
   patches = [
diff --git a/pkgs/applications/video/gnomecast/default.nix b/pkgs/applications/video/gnomecast/default.nix
index 9d0bfa9e966e3..cb6e4a80510a3 100644
--- a/pkgs/applications/video/gnomecast/default.nix
+++ b/pkgs/applications/video/gnomecast/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, python3Packages, fetchFromGitHub, gtk3, gobject-introspection, ffmpeg, wrapGAppsHook }:
+{ stdenv, lib, python3Packages, fetchFromGitHub, gtk3, gobject-introspection, ffmpeg, wrapGAppsHook3 }:
 
 with python3Packages;
 buildPythonApplication rec {
@@ -12,7 +12,7 @@ buildPythonApplication rec {
     sha256 = "sha256-CJpbBuRzEjWb8hsh3HMW4bZA7nyDAwjrERCS5uGdwn8=";
   };
 
-  nativeBuildInputs = [ wrapGAppsHook ];
+  nativeBuildInputs = [ wrapGAppsHook3 ];
   propagatedBuildInputs = [
     pychromecast
     bottle
diff --git a/pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix b/pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix
index 86bfebad3860b..678881faec444 100644
--- a/pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix
+++ b/pkgs/applications/video/gpu-screen-recorder/gpu-screen-recorder-gtk.nix
@@ -8,7 +8,7 @@
 , libdrm
 , gpu-screen-recorder
 , libglvnd
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation {
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [
     pkg-config
     makeWrapper
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index da7170ca5f381..f3f6dacd4a540 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -73,7 +73,7 @@
 , desktop-file-utils
 , meson
 , ninja
-, wrapGAppsHook
+, wrapGAppsHook3
 , intltool
 , glib
 , gtk3
@@ -220,7 +220,7 @@ let
       pkg-config
       python3
     ]
-    ++ optionals useGtk [ desktop-file-utils intltool meson ninja wrapGAppsHook ];
+    ++ optionals useGtk [ desktop-file-utils intltool meson ninja wrapGAppsHook3 ];
 
     buildInputs = [
       a52dec
diff --git a/pkgs/applications/video/hypnotix/default.nix b/pkgs/applications/video/hypnotix/default.nix
index 5c2e4812501c8..a3b1e25de48c0 100644
--- a/pkgs/applications/video/hypnotix/default.nix
+++ b/pkgs/applications/video/hypnotix/default.nix
@@ -8,7 +8,7 @@
 , gobject-introspection
 , mpv
 , python3
-, wrapGAppsHook
+, wrapGAppsHook3
 , yt-dlp
 }:
 
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     gettext
     gobject-introspection
     python3.pkgs.wrapPython
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   dontWrapGApps = true;
diff --git a/pkgs/applications/video/imagination/default.nix b/pkgs/applications/video/imagination/default.nix
index 8d1d6ac305f9e..6dd9793b8b977 100644
--- a/pkgs/applications/video/imagination/default.nix
+++ b/pkgs/applications/video/imagination/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, autoreconfHook, docbook_xsl, ffmpeg-full, glib, gtk3
-, intltool, libxslt, pkg-config, sox, wrapGAppsHook }:
+, intltool, libxslt, pkg-config, sox, wrapGAppsHook3 }:
 
 stdenv.mkDerivation rec {
   pname = "imagination";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     intltool
     libxslt
     pkg-config
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [ ffmpeg-full glib gtk3 sox ];
diff --git a/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/pkgs/applications/video/jellyfin-mpv-shim/default.nix
index dad9a52402495..70f28ab72077c 100644
--- a/pkgs/applications/video/jellyfin-mpv-shim/default.nix
+++ b/pkgs/applications/video/jellyfin-mpv-shim/default.nix
@@ -13,7 +13,7 @@
 , python-mpv-jsonipc
 , pywebview
 , tkinter
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 buildPythonApplication rec {
@@ -27,7 +27,7 @@ buildPythonApplication rec {
 
   nativeBuildInputs = [
     copyDesktopItems
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/kazam/default.nix b/pkgs/applications/video/kazam/default.nix
index 8ca3b813663f4..cf392a143d7dc 100644
--- a/pkgs/applications/video/kazam/default.nix
+++ b/pkgs/applications/video/kazam/default.nix
@@ -3,7 +3,7 @@
 , substituteAll
 , python3Packages
 , gst_all_1
-, wrapGAppsHook
+, wrapGAppsHook3
 , gobject-introspection
 , gtk3
 , libwnck
@@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec {
     sha256 = "1jk6khwgdv3nmagdgp5ivz3156pl0ljhf7b6i4b52w1h5ywsg9ah";
   };
 
-  nativeBuildInputs = [ gobject-introspection python3Packages.distutils-extra intltool wrapGAppsHook ];
+  nativeBuildInputs = [ gobject-introspection python3Packages.distutils-extra intltool wrapGAppsHook3 ];
   buildInputs = [
     gst_all_1.gstreamer
     gst_all_1.gst-plugins-base
diff --git a/pkgs/applications/video/media-downloader/default.nix b/pkgs/applications/video/media-downloader/default.nix
index 761243d897ba0..e11b1b1b5bb25 100644
--- a/pkgs/applications/video/media-downloader/default.nix
+++ b/pkgs/applications/video/media-downloader/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "media-downloader";
-  version = "4.5.0";
+  version = "4.6.0";
 
   src = fetchFromGitHub {
     owner = "mhogomchungu";
     repo = "media-downloader";
     rev = finalAttrs.version;
-    hash = "sha256-n+eQjjjdZhvXFSw5D/UQhyBMSZstfI/JixiEVhmQwXs=";
+    hash = "sha256-sl82ZnRqFE3z+EGM+m5rAy4MMrbgkY4PZgyc94x7XUI=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/video/mpv/scripts/buildLua.nix b/pkgs/applications/video/mpv/scripts/buildLua.nix
index 8db7d4b1aa3c9..2e25ee55b28a0 100644
--- a/pkgs/applications/video/mpv/scripts/buildLua.nix
+++ b/pkgs/applications/video/mpv/scripts/buildLua.nix
@@ -1,5 +1,4 @@
-{ lib
-, stdenvNoCC }:
+{ lib, stdenvNoCC }:
 
 let
   # Escape strings for embedding in shell scripts
@@ -10,74 +9,90 @@ let
   scriptsDir = "$out/share/mpv/scripts";
 
   # similar to `lib.extends`, but with inverted precedence and recursive update
-  extendedBy = args: orig: self:
-    let super = args self;
-    in lib.recursiveUpdate (orig super) super
-  ;
+  extendedBy =
+    args: orig: self:
+    let
+      super = args self;
+    in
+    lib.recursiveUpdate (orig super) super;
 in
 
-lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy
-  (if lib.isFunction args then args else (_: args)) (
-  { pname
-  , extraScripts ? []
-  , ... }@args:
-  let
-    strippedName = with builtins;
-      let groups = match "mpv[-_](.*)" pname; in
-      if groups != null
-      then head groups
-      else pname
-    ;
-    # either passthru.scriptName, inferred from scriptPath, or from pname
-    scriptName = (args.passthru or {}).scriptName or (
-      if args ? scriptPath
-      then fileName args.scriptPath
-      else "${strippedName}.lua"
-    );
-    scriptPath = args.scriptPath or "./${scriptName}";
-  in {
-    dontBuild = true;
-    preferLocalBuild = true;
+lib.makeOverridable (
+  args:
+  stdenvNoCC.mkDerivation (
+    extendedBy (if lib.isFunction args then args else (_: args)) (
+      {
+        pname,
+        extraScripts ? [ ],
+        ...
+      }@args:
+      let
+        strippedName =
+          with builtins;
+          let
+            groups = match "mpv[-_](.*)" pname;
+          in
+          if groups != null then head groups else pname;
+        # either passthru.scriptName, inferred from scriptPath, or from pname
+        scriptName =
+          (args.passthru or { }).scriptName
+            or (if args ? scriptPath then fileName args.scriptPath else "${strippedName}.lua");
+        scriptPath = args.scriptPath or "./${scriptName}";
+      in
+      {
+        dontBuild = true;
+        preferLocalBuild = true;
 
-    # Prevent `patch` from emitting `.orig` files (that end up in the output)
-    patchFlags = [ "--no-backup-if-mismatch" "-p1" ];
+        # Prevent `patch` from emitting `.orig` files (that end up in the output)
+        patchFlags = [
+          "--no-backup-if-mismatch"
+          "-p1"
+        ];
 
-    outputHashMode = "recursive";
-    installPhase = ''
-      runHook preInstall
+        outputHashMode = "recursive";
+        installPhase = ''
+          runHook preInstall
 
-      if [ -d "${scriptPath}" ]; then
-        [ -f "${scriptPath}/main.lua" ] || {
-          echo "Script directory '${scriptPath}' does not contain 'main.lua'" >&2
-          exit 1
-        }
-        [ ${with builtins; toString (length extraScripts)} -eq 0 ] || {
-          echo "mpvScripts.buildLua does not support 'extraScripts'" \
-               "when 'scriptPath' is a directory" >&2
-          exit 1
-        }
-        mkdir -p "${scriptsDir}"
-        cp -a "${scriptPath}" "${scriptsDir}/${scriptName}"
-      else
-        install -m644 -Dt "${scriptsDir}" ${escaped scriptPath}
-        ${lib.optionalString (extraScripts != []) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''}
-      fi
+          if [ -d "${scriptPath}" ]; then
+            [ -f "${scriptPath}/main.lua" ] || {
+              echo "Script directory '${scriptPath}' does not contain 'main.lua'" >&2
+              exit 1
+            }
+            [ ${with builtins; toString (length extraScripts)} -eq 0 ] || {
+              echo "mpvScripts.buildLua does not support 'extraScripts'" \
+                   "when 'scriptPath' is a directory" >&2
+              exit 1
+            }
+            mkdir -p "${scriptsDir}"
+            cp -a "${scriptPath}" "${scriptsDir}/${scriptName}"
+          else
+            install -m644 -Dt "${scriptsDir}" ${escaped scriptPath}
+            ${
+              lib.optionalString (extraScripts != [ ]) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''
+            }
+          fi
 
-      runHook postInstall
-    '';
+          runHook postInstall
+        '';
 
-    passthru = { inherit scriptName; };
-    meta = {
-      platforms = lib.platforms.all;
-    } // (
-      let pos =
-        if (args.meta or {}) ? description then
-          builtins.unsafeGetAttrPos "description" args.meta
-        else
-          builtins.unsafeGetAttrPos "pname" args;
-      in lib.optionalAttrs
-        (pos != null)
-        { position = "${pos.file}:${toString pos.line}"; }
-    );
-  })
-))
+        passthru = {
+          inherit scriptName;
+        };
+        meta =
+          {
+            platforms = lib.platforms.all;
+          }
+          // (
+            let
+              pos =
+                if (args.meta or { }) ? description then
+                  builtins.unsafeGetAttrPos "description" args.meta
+                else
+                  builtins.unsafeGetAttrPos "pname" args;
+            in
+            lib.optionalAttrs (pos != null) { position = "${pos.file}:${toString pos.line}"; }
+          );
+      }
+    )
+  )
+)
diff --git a/pkgs/applications/video/mpv/scripts/chapterskip.nix b/pkgs/applications/video/mpv/scripts/chapterskip.nix
index 6c6fc4ba51fee..b1b993df3692a 100644
--- a/pkgs/applications/video/mpv/scripts/chapterskip.nix
+++ b/pkgs/applications/video/mpv/scripts/chapterskip.nix
@@ -1,7 +1,9 @@
-{ lib
-, fetchFromGitHub
-, unstableGitUpdater
-, buildLua }:
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
+}:
 
 buildLua {
   pname = "chapterskip";
@@ -9,20 +11,20 @@ buildLua {
   version = "0-unstable-2022-09-08";
   src = fetchFromGitHub {
     owner = "po5";
-    repo  = "chapterskip";
-    rev   = "b26825316e3329882206ae78dc903ebc4613f039";
-    hash  = "sha256-OTrLQE3rYvPQamEX23D6HttNjx3vafWdTMxTiWpDy90=";
+    repo = "chapterskip";
+    rev = "b26825316e3329882206ae78dc903ebc4613f039";
+    hash = "sha256-OTrLQE3rYvPQamEX23D6HttNjx3vafWdTMxTiWpDy90=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = {
     description = "Automatically skips chapters based on title";
     longDescription = ''
-    MPV script that skips chapters based on their title, categorized using regexes.
-    The set of skipped categories can be configured globally, or by an auto-profile.
+      MPV script that skips chapters based on their title, categorized using regexes.
+      The set of skipped categories can be configured globally, or by an auto-profile.
     '';
     homepage = "https://github.com/po5/chapterskip";
-    license = lib.licenses.unfree;  # https://github.com/po5/chapterskip/issues/10
+    license = lib.licenses.unfree; # https://github.com/po5/chapterskip/issues/10
     maintainers = with lib.maintainers; [ nicoo ];
   };
 }
diff --git a/pkgs/applications/video/mpv/scripts/convert.nix b/pkgs/applications/video/mpv/scripts/convert.nix
index d1fdc9c801bb7..1df83df46d8c4 100644
--- a/pkgs/applications/video/mpv/scripts/convert.nix
+++ b/pkgs/applications/video/mpv/scripts/convert.nix
@@ -1,11 +1,12 @@
-{ lib
-, fetchgit
-, unstableGitUpdater
+{
+  lib,
+  fetchgit,
+  unstableGitUpdater,
 
-, buildLua
-, libnotify
-, mkvtoolnix-cli
-, yad
+  buildLua,
+  libnotify,
+  mkvtoolnix-cli,
+  yad,
 }:
 
 buildLua {
@@ -16,20 +17,20 @@ buildLua {
     rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d";
     sha256 = "13m7l4sy2r8jv2sfrb3vvqvnim4a9ilnv28q5drlg09v298z3mck";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   patches = [ ./convert.patch ];
 
   postPatch = ''
     substituteInPlace convert_script.lua \
-      --replace 'mkvpropedit_exe = "mkvpropedit"' \
-                'mkvpropedit_exe = "${mkvtoolnix-cli}/bin/mkvpropedit"' \
-      --replace 'mkvmerge_exe = "mkvmerge"' \
-                'mkvmerge_exe = "${mkvtoolnix-cli}/bin/mkvmerge"' \
-      --replace 'yad_exe = "yad"' \
-                'yad_exe = "${yad}/bin/yad"' \
-      --replace 'notify_send_exe = "notify-send"' \
-                'notify_send_exe = "${libnotify}/bin/notify-send"' \
+      --replace-fail 'mkvpropedit_exe = "mkvpropedit"' \
+                'mkvpropedit_exe = "${lib.getExe' mkvtoolnix-cli "mkvpropedit"}"' \
+      --replace-fail 'mkvmerge_exe = "mkvmerge"' \
+                'mkvmerge_exe = "${lib.getExe' mkvtoolnix-cli "mkvmerge"}"' \
+      --replace-fail 'yad_exe = "yad"' \
+                'yad_exe = "${lib.getExe yad}"' \
+      --replace-fail 'notify_send_exe = "notify-send"' \
+                'notify_send_exe = "${lib.getExe libnotify}"' \
   '';
 
   scriptPath = "convert_script.lua";
diff --git a/pkgs/applications/video/mpv/scripts/cutter.nix b/pkgs/applications/video/mpv/scripts/cutter.nix
index ac2f518a9b5ab..b051c08a85470 100644
--- a/pkgs/applications/video/mpv/scripts/cutter.nix
+++ b/pkgs/applications/video/mpv/scripts/cutter.nix
@@ -1,4 +1,10 @@
-{ lib, buildLua, fetchFromGitHub, makeWrapper, unstableGitUpdater }:
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  makeWrapper,
+  unstableGitUpdater,
+}:
 
 buildLua {
   pname = "video-cutter";
@@ -10,19 +16,19 @@ buildLua {
     rev = "01a0396c075d5f8bbd1de5b571e6231f8899ab65";
     sha256 = "sha256-veoRFzUCRH8TrvR7x+WWoycpDyxqrJZ/bnp61dVc0pE=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   nativeBuildInputs = [ makeWrapper ];
 
   postPatch = ''
     substituteInPlace cutter.lua \
-      --replace '~/.config/mpv/scripts/c_concat.sh' '${placeholder "out"}/share/mpv/scripts/c_concat.sh'
+      --replace-fail '~/.config/mpv/scripts/c_concat.sh' '${placeholder "out"}/share/mpv/scripts/c_concat.sh'
 
     # needs to be ran separately so that we can replace everything, and not every single mention explicitly
     # original script places them in the scripts folder, just spawning unnecessary errors
     # i know that hardcoding .config and especially the .mpv directory isn't best practice, but I didn't want to deviate too much from upstream
     substituteInPlace cutter.lua \
-      --replace '~/.config/mpv/scripts' "''${XDG_CONFIG_HOME:-~/.config}/mpv/cutter"
+      --replace-fail '~/.config/mpv/scripts' "''${XDG_CONFIG_HOME:-~/.config}/mpv/cutter"
   '';
 
   passthru.scriptName = "cutter.lua";
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix
index ce5188c09d294..2241e9f5efac9 100644
--- a/pkgs/applications/video/mpv/scripts/default.nix
+++ b/pkgs/applications/video/mpv/scripts/default.nix
@@ -1,111 +1,145 @@
-{ lib
-, config
-, newScope
-, runCommand
+{
+  lib,
+  config,
+  newScope,
+  runCommand,
 }:
 
 let
-  unionOfDisjoints = lib.fold lib.attrsets.unionOfDisjoint {};
+  unionOfDisjoints = lib.fold lib.attrsets.unionOfDisjoint { };
 
-  addTests = name: drv:
-    if ! lib.isDerivation drv then
+  addTests =
+    name: drv:
+    if !lib.isDerivation drv then
       drv
-    else let
-      inherit (drv) scriptName;
-      scriptPath = "share/mpv/scripts/${scriptName}";
-      fullScriptPath = "${drv}/${scriptPath}";
-    in drv.overrideAttrs (old: { passthru = (old.passthru or {}) // { tests = unionOfDisjoints [
-      (old.passthru.tests or {})
+    else
+      let
+        inherit (drv) scriptName;
+        scriptPath = "share/mpv/scripts/${scriptName}";
+        fullScriptPath = "${drv}/${scriptPath}";
+      in
+      drv.overrideAttrs (old: {
+        passthru = (old.passthru or { }) // {
+          tests = unionOfDisjoints [
+            (old.passthru.tests or { })
 
-      {
-        scriptName-is-valid = runCommand "mpvScripts.${name}.passthru.tests.scriptName-is-valid" {
-          meta.maintainers = with lib.maintainers; [ nicoo ];
-          preferLocalBuild = true;
-        } ''
-          if [ -e "${fullScriptPath}" ]; then
-            touch $out
-          else
-            echo "mpvScripts.\"${name}\" does not contain a script named \"${scriptName}\"" >&2
-            exit 1
-          fi
-        '';
-      }
+            {
+              scriptName-is-valid =
+                runCommand "mpvScripts.${name}.passthru.tests.scriptName-is-valid"
+                  {
+                    meta.maintainers = with lib.maintainers; [ nicoo ];
+                    preferLocalBuild = true;
+                  }
+                  ''
+                    if [ -e "${fullScriptPath}" ]; then
+                      touch $out
+                    else
+                      echo "mpvScripts.\"${name}\" does not contain a script named \"${scriptName}\"" >&2
+                      exit 1
+                    fi
+                  '';
+            }
 
-      # can't check whether `fullScriptPath` is a directory, in pure-evaluation mode
-      (with lib; optionalAttrs (! any (s: hasSuffix s drv.passthru.scriptName) [ ".js" ".lua" ".so" ]) {
-        single-main-in-script-dir = runCommand "mpvScripts.${name}.passthru.tests.single-main-in-script-dir" {
-          meta.maintainers = with lib.maintainers; [ nicoo ];
-          preferLocalBuild = true;
-        } ''
-          die() {
-            echo "$@" >&2
-            exit 1
-          }
+            # can't check whether `fullScriptPath` is a directory, in pure-evaluation mode
+            (
+              with lib;
+              optionalAttrs
+                (
+                  !any (s: hasSuffix s drv.passthru.scriptName) [
+                    ".js"
+                    ".lua"
+                    ".so"
+                  ]
+                )
+                {
+                  single-main-in-script-dir =
+                    runCommand "mpvScripts.${name}.passthru.tests.single-main-in-script-dir"
+                      {
+                        meta.maintainers = with lib.maintainers; [ nicoo ];
+                        preferLocalBuild = true;
+                      }
+                      ''
+                        die() {
+                          echo "$@" >&2
+                          exit 1
+                        }
 
-          cd "${drv}/${scriptPath}"  # so the glob expands to filenames only
-          mains=( main.* )
-          if [ "''${#mains[*]}" -eq 1 ]; then
-            touch $out
-          elif [ "''${#mains[*]}" -eq 0 ]; then
-            die "'${scriptPath}' contains no 'main.*' file"
-          else
-            die "'${scriptPath}' contains multiple 'main.*' files:" "''${mains[*]}"
-          fi
-        '';
-      })
-    ]; }; });
+                        cd "${drv}/${scriptPath}"  # so the glob expands to filenames only
+                        mains=( main.* )
+                        if [ "''${#mains[*]}" -eq 1 ]; then
+                          touch $out
+                        elif [ "''${#mains[*]}" -eq 0 ]; then
+                          die "'${scriptPath}' contains no 'main.*' file"
+                        else
+                          die "'${scriptPath}' contains multiple 'main.*' files:" "''${mains[*]}"
+                        fi
+                      '';
+                }
+            )
+          ];
+        };
+      });
 
-  scope = self: let
-    inherit (self) callPackage;
-  in lib.mapAttrs addTests {
-    inherit (callPackage ./mpv.nix { })
-      acompressor autocrop autodeint autoload;
-    inherit (callPackage ./occivink.nix { })
-      blacklistExtensions seekTo;
+  scope =
+    self:
+    let
+      inherit (self) callPackage;
+    in
+    lib.mapAttrs addTests {
+      inherit (callPackage ./mpv.nix { })
+        acompressor
+        autocrop
+        autodeint
+        autoload
+        ;
+      inherit (callPackage ./occivink.nix { }) blacklistExtensions seekTo;
 
-    buildLua = callPackage ./buildLua.nix { };
-    chapterskip = callPackage ./chapterskip.nix { };
-    convert = callPackage ./convert.nix { };
-    cutter = callPackage ./cutter.nix { };
-    dynamic-crop = callPackage ./dynamic-crop.nix { };
-    inhibit-gnome = callPackage ./inhibit-gnome.nix { };
-    memo = callPackage ./memo.nix { };
-    manga-reader = callPackage ./manga-reader.nix { };
-    modernx = callPackage ./modernx.nix { };
-    modernx-zydezu = callPackage ./modernx-zydezu.nix { };
-    mpris = callPackage ./mpris.nix { };
-    mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
-    mpv-notify-send = callPackage ./mpv-notify-send.nix { };
-    mpv-osc-modern = callPackage ./mpv-osc-modern.nix { };
-    mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
-    mpv-slicing = callPackage ./mpv-slicing.nix { };
-    mpv-webm = callPackage ./mpv-webm.nix { };
-    mpvacious = callPackage ./mpvacious.nix { };
-    quack = callPackage ./quack.nix { };
-    quality-menu = callPackage ./quality-menu.nix { };
-    reload = callPackage ./reload.nix { };
-    simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
-    sponsorblock = callPackage ./sponsorblock.nix { };
-    sponsorblock-minimal = callPackage ./sponsorblock-minimal.nix { };
-    thumbfast = callPackage ./thumbfast.nix { };
-    thumbnail = callPackage ./thumbnail.nix { };
-    uosc = callPackage ./uosc.nix { };
-    videoclip = callPackage ./videoclip.nix { };
-    visualizer = callPackage ./visualizer.nix { };
-    vr-reversal = callPackage ./vr-reversal.nix { };
-    webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
-    youtube-upnext = callPackage ./youtube-upnext.nix { };
-  };
+      buildLua = callPackage ./buildLua.nix { };
+      chapterskip = callPackage ./chapterskip.nix { };
+      convert = callPackage ./convert.nix { };
+      cutter = callPackage ./cutter.nix { };
+      dynamic-crop = callPackage ./dynamic-crop.nix { };
+      inhibit-gnome = callPackage ./inhibit-gnome.nix { };
+      memo = callPackage ./memo.nix { };
+      manga-reader = callPackage ./manga-reader.nix { };
+      modernx = callPackage ./modernx.nix { };
+      modernx-zydezu = callPackage ./modernx-zydezu.nix { };
+      mpris = callPackage ./mpris.nix { };
+      mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
+      mpv-notify-send = callPackage ./mpv-notify-send.nix { };
+      mpv-osc-modern = callPackage ./mpv-osc-modern.nix { };
+      mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
+      mpv-slicing = callPackage ./mpv-slicing.nix { };
+      mpv-webm = callPackage ./mpv-webm.nix { };
+      mpvacious = callPackage ./mpvacious.nix { };
+      quack = callPackage ./quack.nix { };
+      quality-menu = callPackage ./quality-menu.nix { };
+      reload = callPackage ./reload.nix { };
+      simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
+      sponsorblock = callPackage ./sponsorblock.nix { };
+      sponsorblock-minimal = callPackage ./sponsorblock-minimal.nix { };
+      thumbfast = callPackage ./thumbfast.nix { };
+      thumbnail = callPackage ./thumbnail.nix { };
+      uosc = callPackage ./uosc.nix { };
+      videoclip = callPackage ./videoclip.nix { };
+      visualizer = callPackage ./visualizer.nix { };
+      vr-reversal = callPackage ./vr-reversal.nix { };
+      webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { };
+      youtube-upnext = callPackage ./youtube-upnext.nix { };
+    };
 
   aliases = {
     youtube-quality = throw "'youtube-quality' is no longer maintained, use 'quality-menu' instead"; # added 2023-07-14
   };
 in
 
-with lib; pipe scope [
+with lib;
+pipe scope [
   (makeScope newScope)
-  (self:
-    assert builtins.intersectAttrs self aliases == {};
-    self // optionalAttrs config.allowAliases aliases)
+  (
+    self:
+    assert builtins.intersectAttrs self aliases == { };
+    self // optionalAttrs config.allowAliases aliases
+  )
   recurseIntoAttrs
 ]
diff --git a/pkgs/applications/video/mpv/scripts/dynamic-crop.nix b/pkgs/applications/video/mpv/scripts/dynamic-crop.nix
index f2cd7dc070166..4388e2d137b48 100644
--- a/pkgs/applications/video/mpv/scripts/dynamic-crop.nix
+++ b/pkgs/applications/video/mpv/scripts/dynamic-crop.nix
@@ -1,7 +1,8 @@
-{ lib
-, fetchFromGitHub
-, unstableGitUpdater
-, buildLua
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
 }:
 buildLua {
   pname = "dynamic-crop";
diff --git a/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix b/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix
index 618c74adea930..02a54a2cf4751 100644
--- a/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix
+++ b/pkgs/applications/video/mpv/scripts/inhibit-gnome.nix
@@ -1,4 +1,12 @@
-{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, dbus, mpv-unwrapped }:
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  gitUpdater,
+  pkg-config,
+  dbus,
+  mpv-unwrapped,
+}:
 
 stdenv.mkDerivation rec {
   pname = "mpv-inhibit-gnome";
@@ -10,13 +18,14 @@ stdenv.mkDerivation rec {
     rev = "v${version}";
     hash = "sha256-LSGg5gAQE2JpepBqhz6D6d3NlqYaU4bjvYf1F+oLphQ=";
   };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
-  };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   nativeBuildInputs = [ pkg-config ];
 
-  buildInputs = [ dbus mpv-unwrapped ];
+  buildInputs = [
+    dbus
+    mpv-unwrapped
+  ];
 
   passthru.scriptName = "mpv_inhibit_gnome.so";
 
diff --git a/pkgs/applications/video/mpv/scripts/memo.nix b/pkgs/applications/video/mpv/scripts/memo.nix
index 5361b796268e1..dea7adc85e976 100644
--- a/pkgs/applications/video/mpv/scripts/memo.nix
+++ b/pkgs/applications/video/mpv/scripts/memo.nix
@@ -1,7 +1,8 @@
-{ fetchFromGitHub
-, buildLua
-, lib
-, unstableGitUpdater
+{
+  fetchFromGitHub,
+  buildLua,
+  lib,
+  unstableGitUpdater,
 }:
 
 buildLua {
@@ -15,7 +16,7 @@ buildLua {
     hash = "sha256-m8ikXuw7PM4Btg8w7ufLneKA4fnYjMyfVJYueZILMw8=";
   };
 
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = with lib; {
     description = "A recent files menu for mpv";
diff --git a/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix b/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix
index 36b20fe11205c..1f53e6cb503ce 100644
--- a/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix
+++ b/pkgs/applications/video/mpv/scripts/modernx-zydezu.nix
@@ -1,8 +1,9 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, makeFontsConf
-, nix-update-script
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  makeFontsConf,
+  nix-update-script,
 }:
 buildLua (finalAttrs: {
   pname = "modernx-zydezu";
diff --git a/pkgs/applications/video/mpv/scripts/modernx.nix b/pkgs/applications/video/mpv/scripts/modernx.nix
index 340b169a0c03d..3e106d7415487 100644
--- a/pkgs/applications/video/mpv/scripts/modernx.nix
+++ b/pkgs/applications/video/mpv/scripts/modernx.nix
@@ -1,8 +1,9 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, makeFontsConf
-, nix-update-script
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  makeFontsConf,
+  nix-update-script,
 }:
 buildLua (finalAttrs: {
   pname = "modernx";
diff --git a/pkgs/applications/video/mpv/scripts/mpris.nix b/pkgs/applications/video/mpv/scripts/mpris.nix
index 338f0a8dd482f..fbb1a8f685838 100644
--- a/pkgs/applications/video/mpv/scripts/mpris.nix
+++ b/pkgs/applications/video/mpv/scripts/mpris.nix
@@ -1,4 +1,13 @@
-{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, glib, mpv-unwrapped, ffmpeg }:
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  gitUpdater,
+  pkg-config,
+  glib,
+  mpv-unwrapped,
+  ffmpeg,
+}:
 
 stdenv.mkDerivation rec {
   pname = "mpv-mpris";
@@ -10,14 +19,18 @@ stdenv.mkDerivation rec {
     rev = version;
     hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0=";
   };
-  passthru.updateScript = gitUpdater {};
+  passthru.updateScript = gitUpdater { };
 
   nativeBuildInputs = [ pkg-config ];
 
-  buildInputs = [ glib mpv-unwrapped ffmpeg ];
+  buildInputs = [
+    glib
+    mpv-unwrapped
+    ffmpeg
+  ];
 
   postPatch = ''
-    substituteInPlace Makefile --replace 'PKG_CONFIG =' 'PKG_CONFIG ?='
+    substituteInPlace Makefile --replace-fail 'PKG_CONFIG =' 'PKG_CONFIG ?='
   '';
 
   installFlags = [ "SCRIPTS_DIR=${placeholder "out"}/share/mpv/scripts" ];
diff --git a/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix b/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
index a15f54d01ef22..c0c62867c1ee2 100644
--- a/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
@@ -1,8 +1,9 @@
-{ lib
-, fetchFromGitHub
-, gitUpdater
-, nodePackages
-, stdenvNoCC
+{
+  lib,
+  fetchFromGitHub,
+  gitUpdater,
+  nodePackages,
+  stdenvNoCC,
 }:
 stdenvNoCC.mkDerivation (finalAttrs: {
   pname = "mpv-cheatsheet";
@@ -16,9 +17,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
   };
   passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
-  nativeBuildInputs = [
-    nodePackages.browserify
-  ];
+  nativeBuildInputs = [ nodePackages.browserify ];
 
   buildPhase = ''
     runHook preBuild
@@ -36,7 +35,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
     runHook postInstall
   '';
 
-
   passthru.scriptName = "cheatsheet.js";
 
   meta = with lib; {
diff --git a/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix b/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
index 04b03670b79f2..3e3a04499d08f 100644
--- a/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
@@ -1,9 +1,11 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, fetchpatch
-, unstableGitUpdater
-, libnotify }:
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  fetchpatch,
+  unstableGitUpdater,
+  libnotify,
+}:
 
 buildLua rec {
   pname = "mpv-notify-send";
@@ -25,7 +27,10 @@ buildLua rec {
   ];
 
   passthru.extraWrapperArgs = [
-    "--prefix" "PATH" ":" (lib.makeBinPath libnotify)
+    "--prefix"
+    "PATH"
+    ":"
+    (lib.makeBinPath libnotify)
   ];
 
   passthru.updateScript = unstableGitUpdater { };
diff --git a/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix b/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix
index ce32622d64d8f..0d2c292d702a0 100644
--- a/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv-osc-modern.nix
@@ -1,8 +1,9 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, makeFontsConf
-, nix-update-script
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  makeFontsConf,
+  nix-update-script,
 }:
 buildLua (finalAttrs: {
   pname = "mpv-osc-modern";
diff --git a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
index 44f09b8f21fe8..00e44d1f94474 100644
--- a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix
@@ -1,4 +1,10 @@
-{ lib, buildLua, fetchFromGitHub, unstableGitUpdater, yt-dlp }:
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  yt-dlp,
+}:
 
 buildLua rec {
   pname = "mpv-playlistmanager";
@@ -10,12 +16,12 @@ buildLua rec {
     rev = "1911dc053951169c98cfcfd9f44ef87d9122ca80";
     hash = "sha256-pcdOMhkivLF5B86aNuHrqj77DuYLAFGlwFwY7jxkDkE=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   postPatch = ''
     substituteInPlace playlistmanager.lua \
-      --replace 'youtube_dl_executable = "youtube-dl",' \
-      'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"',
+      --replace-fail 'youtube_dl_executable = "yt-dlp",' \
+      'youtube_dl_executable = "${lib.getExe yt-dlp}"',
   '';
 
   meta = with lib; {
diff --git a/pkgs/applications/video/mpv/scripts/mpv-webm.nix b/pkgs/applications/video/mpv/scripts/mpv-webm.nix
index efff9fa8ee169..051cc76883c4e 100644
--- a/pkgs/applications/video/mpv/scripts/mpv-webm.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv-webm.nix
@@ -1,8 +1,9 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, luaPackages
-, unstableGitUpdater
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  luaPackages,
+  unstableGitUpdater,
 }:
 
 buildLua {
diff --git a/pkgs/applications/video/mpv/scripts/mpv.nix b/pkgs/applications/video/mpv/scripts/mpv.nix
index 06e9ccb4d74a8..ddf22e5dd03cf 100644
--- a/pkgs/applications/video/mpv/scripts/mpv.nix
+++ b/pkgs/applications/video/mpv/scripts/mpv.nix
@@ -1,24 +1,31 @@
-{ lib
-, buildLua
-, mpv-unwrapped
+{
+  lib,
+  buildLua,
+  mpv-unwrapped,
 }:
 
-let mkBuiltin = name: args:
-  let srcPath = "TOOLS/lua/${name}.lua";
-  in buildLua (lib.attrsets.recursiveUpdate rec {
-    inherit (mpv-unwrapped) src version;
-    pname = "mpv-${name}";
+let
+  mkBuiltin =
+    name: args:
+    let
+      srcPath = "TOOLS/lua/${name}.lua";
+    in
+    buildLua (
+      lib.attrsets.recursiveUpdate rec {
+        inherit (mpv-unwrapped) src version;
+        pname = "mpv-${name}";
 
-    dontUnpack = true;
-    scriptPath = "${src}/${srcPath}";
+        dontUnpack = true;
+        scriptPath = "${src}/${srcPath}";
 
-    meta = with lib; {
-      inherit (mpv-unwrapped.meta) license;
-      homepage = "https://github.com/mpv-player/mpv/blob/v${version}/${srcPath}";
-    };
-  } args);
-
-in lib.mapAttrs (name: lib.makeOverridable (mkBuiltin name)) {
+        meta = with lib; {
+          inherit (mpv-unwrapped.meta) license;
+          homepage = "https://github.com/mpv-player/mpv/blob/v${version}/${srcPath}";
+        };
+      } args
+    );
+in
+lib.mapAttrs (name: lib.makeOverridable (mkBuiltin name)) {
   acompressor.meta = {
     description = "Script to toggle and control ffmpeg's dynamic range compression filter.";
     maintainers = with lib.maintainers; [ nicoo ];
diff --git a/pkgs/applications/video/mpv/scripts/mpvacious.nix b/pkgs/applications/video/mpv/scripts/mpvacious.nix
index adac4d1d60692..4269131f09045 100644
--- a/pkgs/applications/video/mpv/scripts/mpvacious.nix
+++ b/pkgs/applications/video/mpv/scripts/mpvacious.nix
@@ -1,10 +1,11 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, gitUpdater
-, curl
-, wl-clipboard
-, xclip
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  gitUpdater,
+  curl,
+  wl-clipboard,
+  xclip,
 }:
 
 buildLua rec {
@@ -17,17 +18,15 @@ buildLua rec {
     rev = "v${version}";
     sha256 = "sha256-VHMXW2AzgX88EDnNshxo9Gh8mpXzRoTAq+58HKasUdo=";
   };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
-  };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   postPatch = ''
     substituteInPlace utils/forvo.lua \
-      --replace "'curl" "'${curl}/bin/curl"
+      --replace-fail "'curl" "'${lib.getExe curl}"
     substituteInPlace platform/nix.lua \
-      --replace "'curl" "'${curl}/bin/curl" \
-      --replace "'wl-copy" "'${wl-clipboard}/bin/wl-copy" \
-      --replace "'xclip" "'${xclip}/bin/xclip"
+      --replace-fail "'curl" "'${lib.getExe curl}" \
+      --replace-fail "'wl-copy" "'${lib.getExe' wl-clipboard "wl-copy"}" \
+      --replace-fail "'xclip" "'${lib.getExe xclip}"
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/video/mpv/scripts/occivink.nix b/pkgs/applications/video/mpv/scripts/occivink.nix
index be3bdb07db8da..948a90c0d89b3 100644
--- a/pkgs/applications/video/mpv/scripts/occivink.nix
+++ b/pkgs/applications/video/mpv/scripts/occivink.nix
@@ -1,45 +1,49 @@
-{ lib
-, fetchFromGitHub
-, unstableGitUpdater
-, buildLua
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
 }:
 
 let
-  camelToKebab = let
-    inherit (lib.strings) match stringAsChars toLower;
-    isUpper = match "[A-Z]";
-  in stringAsChars (c: if isUpper c != null then "-${toLower c}" else c);
+  camelToKebab =
+    let
+      inherit (lib.strings) match stringAsChars toLower;
+      isUpper = match "[A-Z]";
+    in
+    stringAsChars (c: if isUpper c != null then "-${toLower c}" else c);
 
-  mkScript = name: args:
-    let self = rec {
-      pname = camelToKebab name;
-      version = "0-unstable-2024-01-11";
-      src = fetchFromGitHub {
-        owner = "occivink";
-        repo = "mpv-scripts";
-        rev = "d0390c8e802c2e888ff4a2e1d5e4fb040f855b89";
-        hash = "sha256-pc2aaO7lZaoYMEXv5M0WI7PtmqgkNbdtNiLZZwVzppM=";
-      };
-      passthru.updateScript = unstableGitUpdater {};
-
-      scriptPath = "scripts/${pname}.lua";
+  mkScript =
+    name: args:
+    let
+      self = rec {
+        pname = camelToKebab name;
+        version = "0-unstable-2024-01-11";
+        src = fetchFromGitHub {
+          owner = "occivink";
+          repo = "mpv-scripts";
+          rev = "d0390c8e802c2e888ff4a2e1d5e4fb040f855b89";
+          hash = "sha256-pc2aaO7lZaoYMEXv5M0WI7PtmqgkNbdtNiLZZwVzppM=";
+        };
+        passthru.updateScript = unstableGitUpdater { };
 
-      meta = with lib; {
-        homepage = "https://github.com/occivink/mpv-scripts";
-        license = licenses.unlicense;
-        maintainers = with maintainers; [ nicoo ];
-      };
+        scriptPath = "scripts/${pname}.lua";
 
-      # Sadly needed to make `common-updaters` work here
-      pos = builtins.unsafeGetAttrPos "version" self;
-    };
-    in buildLua (lib.attrsets.recursiveUpdate self args);
+        meta = with lib; {
+          homepage = "https://github.com/occivink/mpv-scripts";
+          license = licenses.unlicense;
+          maintainers = with maintainers; [ nicoo ];
+        };
 
+        # Sadly needed to make `common-updaters` work here
+        pos = builtins.unsafeGetAttrPos "version" self;
+      };
+    in
+    buildLua (lib.attrsets.recursiveUpdate self args);
 in
 lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
 
   # Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
   seekTo.meta.description = "Mpv script for seeking to a specific position";
-  blacklistExtensions.meta.description =
-    "Automatically remove playlist entries based on their extension.";
+  blacklistExtensions.meta.description = "Automatically remove playlist entries based on their extension.";
 }
diff --git a/pkgs/applications/video/mpv/scripts/quack.nix b/pkgs/applications/video/mpv/scripts/quack.nix
index 646a7a524d18f..a1b32f2911811 100644
--- a/pkgs/applications/video/mpv/scripts/quack.nix
+++ b/pkgs/applications/video/mpv/scripts/quack.nix
@@ -1,7 +1,9 @@
-{ lib
-, fetchFromGitHub
-, unstableGitUpdater
-, buildLua }:
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
+}:
 
 buildLua rec {
   pname = "mpv-quack";
@@ -9,11 +11,11 @@ buildLua rec {
   version = "0-unstable-2020-05-27";
   src = fetchFromGitHub {
     owner = "CounterPillow";
-    repo  = "mpv-quack";
-    rev   = "1c87f36f9726d462dd112188c04be54d85692cf3";
-    hash  = "sha256-dEnJbS8RJoAxpKINdoMHN4l7vpEdf7+C5JVWpK0VXMw=";
+    repo = "mpv-quack";
+    rev = "1c87f36f9726d462dd112188c04be54d85692cf3";
+    hash = "sha256-dEnJbS8RJoAxpKINdoMHN4l7vpEdf7+C5JVWpK0VXMw=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = {
     description = "Reduce audio volume after seeking";
diff --git a/pkgs/applications/video/mpv/scripts/quality-menu.nix b/pkgs/applications/video/mpv/scripts/quality-menu.nix
index c75e810687132..cbaa6c1c4da1d 100644
--- a/pkgs/applications/video/mpv/scripts/quality-menu.nix
+++ b/pkgs/applications/video/mpv/scripts/quality-menu.nix
@@ -1,8 +1,9 @@
-{ lib
-, buildLua
-, fetchFromGitHub
-, gitUpdater
-, oscSupport ? false
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  gitUpdater,
+  oscSupport ? false,
 }:
 
 buildLua rec {
@@ -15,9 +16,7 @@ buildLua rec {
     rev = "v${version}";
     hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns=";
   };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
-  };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   extraScripts = lib.optional oscSupport "quality-menu-osc.lua";
 
diff --git a/pkgs/applications/video/mpv/scripts/reload.nix b/pkgs/applications/video/mpv/scripts/reload.nix
index 426aabd7fe495..b9d9b4c43b05d 100644
--- a/pkgs/applications/video/mpv/scripts/reload.nix
+++ b/pkgs/applications/video/mpv/scripts/reload.nix
@@ -1,7 +1,9 @@
-{ lib
-, fetchFromGitHub
-, unstableGitUpdater
-, buildLua }:
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
+}:
 
 buildLua rec {
   pname = "mpv-reload";
@@ -9,11 +11,11 @@ buildLua rec {
   version = "0-unstable-2024-03-22";
   src = fetchFromGitHub {
     owner = "4e6";
-    repo  = pname;
-    rev   = "1a6a9383ba1774708fddbd976e7a9b72c3eec938";
-    hash  = "sha256-BshxCjec/UNGyiC0/g1Rai2NvG2qOIHXDDEUYwwdij0=";
+    repo = pname;
+    rev = "1a6a9383ba1774708fddbd976e7a9b72c3eec938";
+    hash = "sha256-BshxCjec/UNGyiC0/g1Rai2NvG2qOIHXDDEUYwwdij0=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = {
     description = "Manual & automatic reloading of videos";
diff --git a/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix b/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
index bf973c9206c71..b71b5d90e3b13 100644
--- a/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
+++ b/pkgs/applications/video/mpv/scripts/simple-mpv-webui.nix
@@ -1,6 +1,8 @@
-{ lib, buildLua
-, fetchFromGitHub
-, gitUpdater
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  gitUpdater,
 }:
 buildLua rec {
   pname = "simple-mpv-ui";
@@ -11,11 +13,12 @@ buildLua rec {
     repo = "simple-mpv-webui";
     rev = "v${version}";
     hash = "sha256-I8lwpo3Hfpy3UnPMmHEJCdArVQnNL245NkxsYVmnMF0=";
-    sparseCheckout = [ "main.lua" "webui-page" ];
-  };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
+    sparseCheckout = [
+      "main.lua"
+      "webui-page"
+    ];
   };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   scriptPath = ".";
   passthru.scriptName = "webui";
@@ -23,7 +26,10 @@ buildLua rec {
   meta = with lib; {
     description = "A web based user interface with controls for the mpv mediaplayer";
     homepage = "https://github.com/open-dynaMIX/simple-mpv-webui";
-    maintainers = with maintainers; [ cript0nauta zopieux ];
+    maintainers = with maintainers; [
+      cript0nauta
+      zopieux
+    ];
     longDescription = ''
       You can access the webui when accessing http://127.0.0.1:8080 or
       http://[::1]:8080 in your webbrowser. By default it listens on
diff --git a/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix b/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix
index 2557db8313d6d..be314ed8ca168 100644
--- a/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix
+++ b/pkgs/applications/video/mpv/scripts/sponsorblock-minimal.nix
@@ -1,4 +1,11 @@
-{ lib, buildLua, fetchFromGitea, unstableGitUpdater, curl, coreutils }:
+{
+  lib,
+  buildLua,
+  fetchFromGitea,
+  unstableGitUpdater,
+  curl,
+  coreutils,
+}:
 
 buildLua {
   pname = "mpv_sponsorblock_minimal";
@@ -21,8 +28,7 @@ buildLua {
   '';
 
   meta = with lib; {
-    description =
-      "A minimal script to skip sponsored segments of YouTube videos";
+    description = "A minimal script to skip sponsored segments of YouTube videos";
     homepage = "https://codeberg.org/jouni/mpv_sponsorblock_minimal";
     license = licenses.gpl3Only;
     platforms = platforms.all;
diff --git a/pkgs/applications/video/mpv/scripts/sponsorblock.nix b/pkgs/applications/video/mpv/scripts/sponsorblock.nix
index 56ac2575ecdea..16e8841abf5b6 100644
--- a/pkgs/applications/video/mpv/scripts/sponsorblock.nix
+++ b/pkgs/applications/video/mpv/scripts/sponsorblock.nix
@@ -1,4 +1,11 @@
-{ lib, buildLua, fetchFromGitHub, fetchpatch, python3, nix-update-script }:
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  fetchpatch,
+  python3,
+  nix-update-script,
+}:
 
 # Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.sponsorblock ]; }`
 buildLua {
@@ -28,15 +35,13 @@ buildLua {
 
   postPatch = ''
     substituteInPlace sponsorblock.lua \
-      --replace "python3" "${python3}/bin/python3" \
-      --replace 'mp.find_config_file("scripts")' "\"$out/share/mpv/scripts\""
+      --replace-fail "python3" "${lib.getExe python3}" \
+      --replace-fail 'mp.find_config_file("scripts")' "\"$out/share/mpv/scripts\""
   '';
 
   extraScripts = [ "sponsorblock_shared" ];
 
-  passthru.updateScript = nix-update-script {
-    extraArgs = [ "--version=branch" ];
-  };
+  passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
 
   meta = with lib; {
     description = "Script for mpv to skip sponsored segments of YouTube videos";
diff --git a/pkgs/applications/video/mpv/scripts/thumbfast.nix b/pkgs/applications/video/mpv/scripts/thumbfast.nix
index e30c62774b759..158e1f38b32b3 100644
--- a/pkgs/applications/video/mpv/scripts/thumbfast.nix
+++ b/pkgs/applications/video/mpv/scripts/thumbfast.nix
@@ -1,4 +1,10 @@
-{ lib, fetchFromGitHub, unstableGitUpdater, buildLua, mpv-unwrapped }:
+{
+  lib,
+  fetchFromGitHub,
+  unstableGitUpdater,
+  buildLua,
+  mpv-unwrapped,
+}:
 
 buildLua {
   pname = "mpv-thumbfast";
@@ -10,10 +16,13 @@ buildLua {
     rev = "03e93feee5a85bf7c65db953ada41b4826e9f905";
     hash = "sha256-5u5WBvWOEydJrnr/vilEgW4+fxkxM6wNjb9Fyyxx/1c=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   passthru.extraWrapperArgs = [
-    "--prefix" "PATH" ":" "${lib.getBin mpv-unwrapped}/bin"
+    "--prefix"
+    "PATH"
+    ":"
+    (lib.makeBinPath [ mpv-unwrapped ])
   ];
 
   meta = {
diff --git a/pkgs/applications/video/mpv/scripts/thumbnail.nix b/pkgs/applications/video/mpv/scripts/thumbnail.nix
index 40c4fa8776d84..a0fe388a5b5ae 100644
--- a/pkgs/applications/video/mpv/scripts/thumbnail.nix
+++ b/pkgs/applications/video/mpv/scripts/thumbnail.nix
@@ -1,4 +1,10 @@
-{ lib, buildLua, fetchFromGitHub, gitUpdater, python3 }:
+{
+  lib,
+  buildLua,
+  fetchFromGitHub,
+  gitUpdater,
+  python3,
+}:
 
 buildLua rec {
   pname = "mpv-thumbnail-script";
@@ -10,7 +16,7 @@ buildLua rec {
     rev = version;
     sha256 = "sha256-J24Rou7BTE7zoiPlBkWuO9dtYJiuzkuwB4FROuzXzag=";
   };
-  passthru.updateScript = gitUpdater {};
+  passthru.updateScript = gitUpdater { };
 
   nativeBuildInputs = [ python3 ];
   postPatch = "patchShebangs concat_files.py";
diff --git a/pkgs/applications/video/mpv/scripts/uosc.nix b/pkgs/applications/video/mpv/scripts/uosc.nix
index 61eb65f9bf9f3..f57bb4eb8160c 100644
--- a/pkgs/applications/video/mpv/scripts/uosc.nix
+++ b/pkgs/applications/video/mpv/scripts/uosc.nix
@@ -1,10 +1,11 @@
-{ lib
-, fetchFromGitHub
-, fetchpatch
-, gitUpdater
-, makeFontsConf
-, buildLua
-, buildGoModule
+{
+  lib,
+  fetchFromGitHub,
+  fetchpatch,
+  gitUpdater,
+  makeFontsConf,
+  buildLua,
+  buildGoModule,
 }:
 
 buildLua (finalAttrs: {
@@ -18,7 +19,7 @@ buildLua (finalAttrs: {
     rev = finalAttrs.version;
     hash = "sha256-0GPDna9uOuhFDhA9A1fbkoKkgSB76qiDzJVQ9gjGcWo=";
   };
-  passthru.updateScript = gitUpdater {};
+  passthru.updateScript = gitUpdater { };
 
   tools = buildGoModule {
     pname = "uosc-bin";
diff --git a/pkgs/applications/video/mpv/scripts/videoclip.nix b/pkgs/applications/video/mpv/scripts/videoclip.nix
index fff5b788b0286..6e22e1ae68d76 100644
--- a/pkgs/applications/video/mpv/scripts/videoclip.nix
+++ b/pkgs/applications/video/mpv/scripts/videoclip.nix
@@ -1,11 +1,12 @@
-{ lib
-, fetchFromGitHub
-, curl
-, xclip
-, wl-clipboard
-, stdenv
-, buildLua
-, unstableGitUpdater
+{
+  lib,
+  fetchFromGitHub,
+  curl,
+  xclip,
+  wl-clipboard,
+  stdenv,
+  buildLua,
+  unstableGitUpdater,
 }:
 buildLua {
   pname = "videoclip";
@@ -18,13 +19,15 @@ buildLua {
     hash = "sha256-Sg6LHU9OVmVx3cTs8Y0WL8wACb5BlVyeBRccoX+7BXY=";
   };
 
-  patchPhase = ''
-    substituteInPlace platform.lua \
-    --replace \'curl\' \'${lib.getExe curl}\' \
-  '' + lib.optionalString stdenv.isLinux ''
-    --replace xclip ${lib.getExe xclip} \
-    --replace wl-copy ${lib.getExe' wl-clipboard "wl-copy"}
-  '';
+  patchPhase =
+    ''
+      substituteInPlace platform.lua \
+      --replace \'curl\' \'${lib.getExe curl}\' \
+    ''
+    + lib.optionalString stdenv.isLinux ''
+      --replace xclip ${lib.getExe xclip} \
+      --replace wl-copy ${lib.getExe' wl-clipboard "wl-copy"}
+    '';
 
   scriptPath = ".";
   passthru.scriptName = "videoclip";
diff --git a/pkgs/applications/video/mpv/scripts/visualizer.nix b/pkgs/applications/video/mpv/scripts/visualizer.nix
index 332604286847a..0308e6477d79f 100644
--- a/pkgs/applications/video/mpv/scripts/visualizer.nix
+++ b/pkgs/applications/video/mpv/scripts/visualizer.nix
@@ -14,11 +14,11 @@ buildLua {
     rev = "b4246984ba6dc6820adef5c8bbf793af85c9ab8e";
     sha256 = "ZNUzw4OW7z+yGTxim7CCWJdWmihDFOQAQk3bC5Ijcbs=";
   };
-  passthru.updateScript = unstableGitUpdater {};
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = with lib; {
     description = "various audio visualization";
     homepage = "https://github.com/mfcc64/mpv-scripts";
-    maintainers = with maintainers; [kmein];
+    maintainers = with maintainers; [ kmein ];
   };
 }
diff --git a/pkgs/applications/video/mpv/scripts/vr-reversal.nix b/pkgs/applications/video/mpv/scripts/vr-reversal.nix
index 9a7b335a6591d..1e9dadcfa0736 100644
--- a/pkgs/applications/video/mpv/scripts/vr-reversal.nix
+++ b/pkgs/applications/video/mpv/scripts/vr-reversal.nix
@@ -1,4 +1,10 @@
-{ lib, stdenvNoCC, fetchFromGitHub, gitUpdater, ffmpeg }:
+{
+  lib,
+  stdenvNoCC,
+  fetchFromGitHub,
+  gitUpdater,
+  ffmpeg,
+}:
 
 stdenvNoCC.mkDerivation rec {
   pname = "vr-reversal";
@@ -10,15 +16,13 @@ stdenvNoCC.mkDerivation rec {
     rev = "v${version}";
     sha256 = "1wn2ngcvn7wcsl3kmj782x5q9130qw951lj6ilrkafp6q6zscpqr";
   };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
-  };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   dontBuild = true;
 
   # reset_rot is only available in ffmpeg 5.0, see 5bcc61ce87922ecccaaa0bd303a7e195929859a8
   postPatch = lib.optionalString (lib.versionOlder ffmpeg.version "5.0") ''
-    substituteInPlace 360plugin.lua --replace ":reset_rot=1:" ":"
+    substituteInPlace 360plugin.lua --replace-fail ":reset_rot=1:" ":"
   '';
 
   installPhase = ''
diff --git a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
index 10fe3d0cdce03..b423281a3ba38 100644
--- a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
+++ b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
@@ -1,4 +1,11 @@
-{ lib, buildNpmPackage, fetchFromGitHub, gitUpdater, nodejs, python3 }:
+{
+  lib,
+  buildNpmPackage,
+  fetchFromGitHub,
+  gitUpdater,
+  nodejs,
+  python3,
+}:
 
 buildNpmPackage rec {
   pname = "webtorrent-mpv-hook";
@@ -10,14 +17,12 @@ buildNpmPackage rec {
     rev = "v${version}";
     hash = "sha256-/dMtXcIyfAs++Zgz2CxRW0tkzn5QjS+WVGChlCyrU0U=";
   };
-  passthru.updateScript = gitUpdater {
-    rev-prefix = "v";
-  };
+  passthru.updateScript = gitUpdater { rev-prefix = "v"; };
 
   postPatch = ''
-    substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'"
+    substituteInPlace src/webtorrent.ts --replace-fail "node_path: 'node'" "node_path: '${lib.getExe nodejs}'"
     # This executable is just for telling non-Nix users how to install
-    substituteInPlace package.json --replace '"bin": "build/bin.mjs",' ""
+    substituteInPlace package.json --replace-fail '"bin": "build/bin.mjs",' ""
     rm -rf src/bin.ts
   '';
 
diff --git a/pkgs/applications/video/mpv/scripts/youtube-upnext.nix b/pkgs/applications/video/mpv/scripts/youtube-upnext.nix
index cdd7ea66a1763..098dd45a5f3c6 100644
--- a/pkgs/applications/video/mpv/scripts/youtube-upnext.nix
+++ b/pkgs/applications/video/mpv/scripts/youtube-upnext.nix
@@ -1,4 +1,10 @@
-{ buildLua, fetchFromGitHub, curl, unstableGitUpdater, lib }:
+{
+  buildLua,
+  fetchFromGitHub,
+  curl,
+  unstableGitUpdater,
+  lib,
+}:
 
 buildLua rec {
   pname = "youtube-upnext";
@@ -13,7 +19,7 @@ buildLua rec {
 
   postPatch = ''
     substituteInPlace youtube-upnext.lua \
-      --replace '"curl"' '"${lib.getExe curl}"'
+      --replace-fail '"curl"' '"${lib.getExe curl}"'
   '';
 
   passthru.updateScript = unstableGitUpdater { };
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index f278d832958ed..418d9adf8263b 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -24,7 +24,7 @@
 , libvlc
 , libGL
 , mbedtls
-, wrapGAppsHook
+, wrapGAppsHook3
 , scriptingSupport ? true
 , luajit
 , swig4
@@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: {
     addOpenGLRunpath
     cmake
     pkg-config
-    wrapGAppsHook
+    wrapGAppsHook3
     wrapQtAppsHook
   ]
   ++ optional scriptingSupport swig4;
diff --git a/pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix b/pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix
index fcf426bde635d..41b33b528a9fc 100644
--- a/pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix
+++ b/pkgs/applications/video/obs-studio/plugins/obs-webkitgtk.nix
@@ -8,7 +8,7 @@
 , cmake
 , pkg-config
 , ninja
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation rec {
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
     cmake
     pkg-config
     ninja
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   postPatch = ''
diff --git a/pkgs/applications/video/openshot-qt/default.nix b/pkgs/applications/video/openshot-qt/default.nix
index fdd96d1aa3ded..4a8208d8bbb6e 100644
--- a/pkgs/applications/video/openshot-qt/default.nix
+++ b/pkgs/applications/video/openshot-qt/default.nix
@@ -11,7 +11,7 @@
 , qtwayland
 , wayland
 , waylandSupport ? stdenv.isLinux
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 let
@@ -31,7 +31,7 @@ mkDerivationWith python3.pkgs.buildPythonApplication {
 
   nativeBuildInputs = [
     doxygen
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [
diff --git a/pkgs/applications/video/peek/default.nix b/pkgs/applications/video/peek/default.nix
index 105a86fbf4a7b..a2817d10edcaa 100644
--- a/pkgs/applications/video/peek/default.nix
+++ b/pkgs/applications/video/peek/default.nix
@@ -11,7 +11,7 @@
 , pkg-config
 , txt2man
 , vala
-, wrapGAppsHook
+, wrapGAppsHook3
 , gsettings-desktop-schemas
 , gtk3
 , glib
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
     txt2man
     python3
     vala
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [
diff --git a/pkgs/applications/video/pipe-viewer/default.nix b/pkgs/applications/video/pipe-viewer/default.nix
index 5d3256931f12e..3f7f89a7b30cd 100644
--- a/pkgs/applications/video/pipe-viewer/default.nix
+++ b/pkgs/applications/video/pipe-viewer/default.nix
@@ -3,7 +3,7 @@
 , perl
 , buildPerlModule
 , makeWrapper
-, wrapGAppsHook
+, wrapGAppsHook3
 , withGtk3 ? false
 , ffmpeg
 , mpv
@@ -48,10 +48,10 @@ buildPerlModule rec {
   };
 
   nativeBuildInputs = [ makeWrapper ]
-    ++ lib.optionals withGtk3 [ wrapGAppsHook ];
+    ++ lib.optionals withGtk3 [ wrapGAppsHook3 ];
 
   buildInputs = [ perlEnv ]
-    # Can't be in perlEnv for wrapGAppsHook to work correctly
+    # Can't be in perlEnv for wrapGAppsHook3 to work correctly
     ++ lib.optional withGtk3 Gtk3;
 
   # Not supported by buildPerlModule
diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix
index eb00353b83d1e..85ee9c0e7ef8d 100644
--- a/pkgs/applications/video/pitivi/default.nix
+++ b/pkgs/applications/video/pitivi/default.nix
@@ -4,7 +4,7 @@
 , gettext
 , itstool
 , python3
-, wrapGAppsHook
+, wrapGAppsHook3
 , gst_all_1
 , gtk3
 , gobject-introspection
@@ -44,7 +44,7 @@ python3.pkgs.buildPythonApplication rec {
     gettext
     itstool
     python3
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/plex-mpv-shim/default.nix b/pkgs/applications/video/plex-mpv-shim/default.nix
index 2e71c4668356e..7d862fb216d7b 100644
--- a/pkgs/applications/video/plex-mpv-shim/default.nix
+++ b/pkgs/applications/video/plex-mpv-shim/default.nix
@@ -1,5 +1,5 @@
 { lib, buildPythonApplication, fetchFromGitHub, fetchpatch, python, mpv, requests, python-mpv-jsonipc, pystray, tkinter
-, wrapGAppsHook, gobject-introspection, mpv-shim-default-shaders }:
+, wrapGAppsHook3, gobject-introspection, mpv-shim-default-shaders }:
 
 buildPythonApplication rec {
   pname = "plex-mpv-shim";
@@ -21,7 +21,7 @@ buildPythonApplication rec {
   ];
 
   nativeBuildInputs = [
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/recapp/default.nix b/pkgs/applications/video/recapp/default.nix
index c15a0680a9333..b6cb8c6377bba 100644
--- a/pkgs/applications/video/recapp/default.nix
+++ b/pkgs/applications/video/recapp/default.nix
@@ -14,7 +14,7 @@
 , ninja
 , pkg-config
 , slop
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 python3.pkgs.buildPythonApplication rec {
@@ -43,7 +43,7 @@ python3.pkgs.buildPythonApplication rec {
     meson
     ninja
     pkg-config
-    wrapGAppsHook
+    wrapGAppsHook3
     gobject-introspection
   ];
 
diff --git a/pkgs/applications/video/rtabmap/default.nix b/pkgs/applications/video/rtabmap/default.nix
index 1147d1ef1d949..b44389045187c 100644
--- a/pkgs/applications/video/rtabmap/default.nix
+++ b/pkgs/applications/video/rtabmap/default.nix
@@ -20,7 +20,7 @@
 , libGL
 , libGLU
 , vtkWithQt5
-, wrapGAppsHook
+, wrapGAppsHook3
 , liblapack
 , xorg
 }:
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
     hash = "sha256-HrIATYRuhFfTlO4oTRZo7CM30LFVyatZJON31Fe4HTQ=";
   };
 
-  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook wrapGAppsHook ];
+  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook wrapGAppsHook3 ];
   buildInputs = [
     ## Required
     opencv
diff --git a/pkgs/applications/video/screenkey/default.nix b/pkgs/applications/video/screenkey/default.nix
index 90cf5e7dcf247..301fc3e30f82c 100644
--- a/pkgs/applications/video/screenkey/default.nix
+++ b/pkgs/applications/video/screenkey/default.nix
@@ -1,6 +1,6 @@
 { lib
 , fetchFromGitLab
-, wrapGAppsHook
+, wrapGAppsHook3
 , xorg
 , gobject-introspection
 , gtk3
@@ -21,7 +21,7 @@ python3.pkgs.buildPythonApplication rec {
   };
 
   nativeBuildInputs = [
-    wrapGAppsHook
+    wrapGAppsHook3
     # for setup hook
     gobject-introspection
   ];
@@ -38,7 +38,7 @@ python3.pkgs.buildPythonApplication rec {
     dbus-python
   ];
 
-  # Prevent double wrapping because of wrapGAppsHook
+  # Prevent double wrapping because of wrapGAppsHook3
   dontWrapGApps = true;
 
   preFixup = ''
diff --git a/pkgs/applications/video/streamlink-twitch-gui/bin.nix b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
index 543b2b524708f..ac1490345c29c 100644
--- a/pkgs/applications/video/streamlink-twitch-gui/bin.nix
+++ b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
@@ -5,7 +5,7 @@
 , makeDesktopItem
 , makeWrapper
 , stdenv
-, wrapGAppsHook
+, wrapGAppsHook3
 , at-spi2-core
 , atk
 , alsa-lib
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
     libXScrnSaver
     libXtst
     makeWrapper
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [ streamlink ];
diff --git a/pkgs/applications/video/subtitleeditor/default.nix b/pkgs/applications/video/subtitleeditor/default.nix
index fd8e03963dca0..b440c187403e5 100644
--- a/pkgs/applications/video/subtitleeditor/default.nix
+++ b/pkgs/applications/video/subtitleeditor/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, intltool, file,
   desktop-file-utils, enchant, gtk3, gtkmm3, gst_all_1, hicolor-icon-theme,
-  libsigcxx, libxmlxx, xdg-utils, isocodes, wrapGAppsHook
+  libsigcxx, libxmlxx, xdg-utils, isocodes, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation rec {
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     pkg-config
     intltool
     file
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs =  [
diff --git a/pkgs/applications/video/tartube/default.nix b/pkgs/applications/video/tartube/default.nix
index 5b62399a04651..73f6946f6baaf 100644
--- a/pkgs/applications/video/tartube/default.nix
+++ b/pkgs/applications/video/tartube/default.nix
@@ -6,7 +6,7 @@
 , libnotify
 , pango
 , python3Packages
-, wrapGAppsHook
+, wrapGAppsHook3
 , youtube-dl
 , glib
 , ffmpeg
@@ -26,7 +26,7 @@ python3Packages.buildPythonApplication rec {
 
   nativeBuildInputs = [
     gobject-introspection
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   strictDeps = false;
diff --git a/pkgs/applications/video/timelens/default.nix b/pkgs/applications/video/timelens/default.nix
index bd38a4c2f76af..c5d2ff7c4c5ad 100644
--- a/pkgs/applications/video/timelens/default.nix
+++ b/pkgs/applications/video/timelens/default.nix
@@ -4,7 +4,7 @@
 , pkg-config
 , glib
 , gst_all_1
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [
     pkg-config
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildInputs = [
diff --git a/pkgs/applications/video/xplayer/default.nix b/pkgs/applications/video/xplayer/default.nix
index baa8fcb95be0b..929d9d2952c48 100644
--- a/pkgs/applications/video/xplayer/default.nix
+++ b/pkgs/applications/video/xplayer/default.nix
@@ -21,7 +21,7 @@
 , libxplayer-plparser
 , pkg-config
 , python3
-, wrapGAppsHook
+, wrapGAppsHook3
 , xapp
 , yelp-tools }:
 
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [
     autoreconfHook
-    wrapGAppsHook
+    wrapGAppsHook3
     autoconf-archive
     gettext
     gtk-doc