From b5526585c2de2e66c9111a5484dee65806acbcf5 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 11 Jul 2022 18:23:52 -0500 Subject: treewide: inject xdg-open into wrappers as $PATH suffix The xdg-open utility is only ever a runtime dependency and its dependents only expect that it accept a URI as a command line argument and do something with it that the user would expect. For such as a trivial relationship it should be possible for users to override xdg-open with something else in their PATH. --- pkgs/applications/video/pipe-viewer/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/video') diff --git a/pkgs/applications/video/pipe-viewer/default.nix b/pkgs/applications/video/pipe-viewer/default.nix index 1ef08870c86aa..53ffa9bcdc4ca 100644 --- a/pkgs/applications/video/pipe-viewer/default.nix +++ b/pkgs/applications/video/pipe-viewer/default.nix @@ -72,8 +72,10 @@ buildPerlModule rec { wrapProgram "$out/bin/pipe-viewer" \ --prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}" '' + lib.optionalString withGtk3 '' + # make xdg-open overrideable at runtime wrapProgram "$out/bin/gtk-pipe-viewer" ''${gappsWrapperArgs[@]} \ - --prefix PATH : "${lib.makeBinPath [ ffmpeg wget xdg-utils youtube-dl yt-dlp ]}" + --prefix PATH : "${lib.makeBinPath [ ffmpeg wget youtube-dl yt-dlp ]}" \ + --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" ''; meta = with lib; { -- cgit 1.4.1