mpv: append yt-dlp to PATH instead of prepending it (#456448)

This commit is contained in:
Sandro
2025-11-12 12:14:25 +00:00
committed by GitHub
+12 -3
View File
@@ -33,13 +33,16 @@ let
[
mpv.luaEnv
]
++ lib.optionals youtubeSupport [
yt-dlp
]
++ lib.optionals mpv.vapoursynthSupport [
mpv.vapoursynth.python3
]
);
# With some tools, we want to prioritize tools that are in PATH. For example, users may want
# to quickly expose a newer version of yt-dlp through the nix shell because it needs to be
# kept up-to-date for it to work.
fallbackBinPath = lib.makeBinPath (lib.optionals youtubeSupport [ yt-dlp ]);
# All arguments besides the input and output binaries (${mpv}/bin/mpv and
# $out/bin/mpv). These are used by the darwin specific makeWrapper call
# used to wrap $out/Applications/mpv.app/Contents/MacOS/mpv as well.
@@ -68,6 +71,12 @@ let
":"
binPath
]
++ lib.optionals (fallbackBinPath != "") [
"--suffix"
"PATH"
":"
fallbackBinPath
]
++ (lib.lists.flatten (
map
# For every script in the `scripts` argument, add the necessary flags to the wrapper