Commit 9a238c98 authored by nicoo's avatar nicoo
Browse files

mpvScripts: Replace `substituteInPlace`'s deprecated parameter

parent 51046f85
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -22,13 +22,13 @@ buildLua {

  postPatch = ''
    substituteInPlace convert_script.lua \
      --replace 'mkvpropedit_exe = "mkvpropedit"' \
      --replace-fail 'mkvpropedit_exe = "mkvpropedit"' \
                'mkvpropedit_exe = "${mkvtoolnix-cli}/bin/mkvpropedit"' \
      --replace 'mkvmerge_exe = "mkvmerge"' \
      --replace-fail 'mkvmerge_exe = "mkvmerge"' \
                'mkvmerge_exe = "${mkvtoolnix-cli}/bin/mkvmerge"' \
      --replace 'yad_exe = "yad"' \
      --replace-fail 'yad_exe = "yad"' \
                'yad_exe = "${yad}/bin/yad"' \
      --replace 'notify_send_exe = "notify-send"' \
      --replace-fail 'notify_send_exe = "notify-send"' \
                'notify_send_exe = "${libnotify}/bin/notify-send"' \
  '';

+2 −2
Original line number Diff line number Diff line
@@ -16,13 +16,13 @@ buildLua {

  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";
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
  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" ];
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ buildLua rec {

  postPatch = ''
    substituteInPlace playlistmanager.lua \
      --replace 'youtube_dl_executable = "youtube-dl",' \
      --replace-fail 'youtube_dl_executable = "youtube-dl",' \
      'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"',
  '';

+4 −4
Original line number Diff line number Diff line
@@ -23,11 +23,11 @@ buildLua rec {

  postPatch = ''
    substituteInPlace utils/forvo.lua \
      --replace "'curl" "'${curl}/bin/curl"
      --replace-fail "'curl" "'${curl}/bin/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" "'${curl}/bin/curl" \
      --replace-fail "'wl-copy" "'${wl-clipboard}/bin/wl-copy" \
      --replace-fail "'xclip" "'${xclip}/bin/xclip"
  '';

  installPhase = ''
Loading