From 9a238c98ddc3577fc2dae21a3841c46dd5c558f9 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 1 May 2024 12:02:52 +0000 Subject: mpvScripts: Replace `substituteInPlace`'s deprecated parameter --- pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix') diff --git a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix index 10fe3d0cdce03..6deab112d3cb5 100644 --- a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix +++ b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix @@ -15,9 +15,9 @@ buildNpmPackage rec { }; 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: '${nodejs}/bin/node'" # 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 ''; -- cgit 1.4.1 From e6cf49e0298723f3aef7ca631627229ceb2378b4 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 1 May 2024 11:47:26 +0000 Subject: mpvScripts: Replace manual path construction with `lib` functions --- pkgs/applications/video/mpv/scripts/convert.nix | 8 ++++---- pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix | 2 +- pkgs/applications/video/mpv/scripts/mpvacious.nix | 8 ++++---- pkgs/applications/video/mpv/scripts/sponsorblock.nix | 2 +- pkgs/applications/video/mpv/scripts/thumbfast.nix | 2 +- pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix') diff --git a/pkgs/applications/video/mpv/scripts/convert.nix b/pkgs/applications/video/mpv/scripts/convert.nix index cd0e0f99a8403..2505be15da544 100644 --- a/pkgs/applications/video/mpv/scripts/convert.nix +++ b/pkgs/applications/video/mpv/scripts/convert.nix @@ -23,13 +23,13 @@ buildLua { postPatch = '' substituteInPlace convert_script.lua \ --replace-fail 'mkvpropedit_exe = "mkvpropedit"' \ - 'mkvpropedit_exe = "${mkvtoolnix-cli}/bin/mkvpropedit"' \ + 'mkvpropedit_exe = "${lib.getExe' mkvtoolnix-cli "mkvpropedit"}"' \ --replace-fail 'mkvmerge_exe = "mkvmerge"' \ - 'mkvmerge_exe = "${mkvtoolnix-cli}/bin/mkvmerge"' \ + 'mkvmerge_exe = "${lib.getExe' mkvtoolnix-cli "mkvmerge"}"' \ --replace-fail 'yad_exe = "yad"' \ - 'yad_exe = "${yad}/bin/yad"' \ + 'yad_exe = "${lib.getExe yad}"' \ --replace-fail 'notify_send_exe = "notify-send"' \ - 'notify_send_exe = "${libnotify}/bin/notify-send"' \ + 'notify_send_exe = "${lib.getExe libnotify}"' \ ''; scriptPath = "convert_script.lua"; diff --git a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix index 1b9cdd4e6b42c..ae943eabaaec1 100644 --- a/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix +++ b/pkgs/applications/video/mpv/scripts/mpv-playlistmanager.nix @@ -15,7 +15,7 @@ buildLua rec { postPatch = '' substituteInPlace playlistmanager.lua \ --replace-fail 'youtube_dl_executable = "youtube-dl",' \ - 'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"', + 'youtube_dl_executable = "${lib.getExe yt-dlp}"', ''; meta = with lib; { diff --git a/pkgs/applications/video/mpv/scripts/mpvacious.nix b/pkgs/applications/video/mpv/scripts/mpvacious.nix index 8e85683b58b07..abbe2ba747dbb 100644 --- a/pkgs/applications/video/mpv/scripts/mpvacious.nix +++ b/pkgs/applications/video/mpv/scripts/mpvacious.nix @@ -23,11 +23,11 @@ buildLua rec { postPatch = '' substituteInPlace utils/forvo.lua \ - --replace-fail "'curl" "'${curl}/bin/curl" + --replace-fail "'curl" "'${lib.getExe curl}" substituteInPlace platform/nix.lua \ - --replace-fail "'curl" "'${curl}/bin/curl" \ - --replace-fail "'wl-copy" "'${wl-clipboard}/bin/wl-copy" \ - --replace-fail "'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/sponsorblock.nix b/pkgs/applications/video/mpv/scripts/sponsorblock.nix index d8757143926f4..6caa10045c484 100644 --- a/pkgs/applications/video/mpv/scripts/sponsorblock.nix +++ b/pkgs/applications/video/mpv/scripts/sponsorblock.nix @@ -28,7 +28,7 @@ buildLua { postPatch = '' substituteInPlace sponsorblock.lua \ - --replace-fail "python3" "${python3}/bin/python3" \ + --replace-fail "python3" "${lib.getExe python3}" \ --replace-fail 'mp.find_config_file("scripts")' "\"$out/share/mpv/scripts\"" ''; diff --git a/pkgs/applications/video/mpv/scripts/thumbfast.nix b/pkgs/applications/video/mpv/scripts/thumbfast.nix index e30c62774b759..f5595f637b080 100644 --- a/pkgs/applications/video/mpv/scripts/thumbfast.nix +++ b/pkgs/applications/video/mpv/scripts/thumbfast.nix @@ -13,7 +13,7 @@ buildLua { 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/webtorrent-mpv-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix index 6deab112d3cb5..08967c3f28451 100644 --- a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix +++ b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix @@ -15,7 +15,7 @@ buildNpmPackage rec { }; postPatch = '' - substituteInPlace src/webtorrent.ts --replace-fail "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-fail '"bin": "build/bin.mjs",' "" rm -rf src/bin.ts -- cgit 1.4.1