Unverified Commit 879ff6c9 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

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

parents b950bd29 c57e205c
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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