summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/X11/xdg-utils
diff options
context:
space:
mode:
authorVolth <volth@webmaster.ms>2017-06-05 23:37:35 +0000
committerVolth <volth@webmaster.ms>2017-06-05 23:37:53 +0000
commitd2f453bc0d88579c7730f678253aee2b0da3984f (patch)
tree52251bf7a07b84da42d103845bb613fb731ed842 /pkgs/tools/X11/xdg-utils
parent42b3b7ab355275e0066f6704e1e74fefd087ce0b (diff)
fix #25511
Diffstat (limited to 'pkgs/tools/X11/xdg-utils')
-rw-r--r--pkgs/tools/X11/xdg-utils/default.nix19
1 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix
index 16e339b41c27..a1d3a059a830 100644
--- a/pkgs/tools/X11/xdg-utils/default.nix
+++ b/pkgs/tools/X11/xdg-utils/default.nix
@@ -29,15 +29,16 @@ stdenv.mkDerivation rec {
postInstall = stdenv.lib.optionalString mimiSupport ''
cp ${mimisrc}/xdg-open $out/bin/xdg-open
- ''
- + ''
- for tool in "${coreutils}/bin/cut" "${gnused}/bin/sed" \
- "${gnugrep}"/bin/{e,}grep "${file}/bin/file" \
- ${stdenv.lib.optionalString mimiSupport
- '' "${gawk}/bin/awk" "${coreutils}/bin/sort" ''} ;
- do
- sed "s# $(basename "$tool") # $tool #g" -i "$out"/bin/*
- done
+ '' + ''
+ sed '2s#.#\
+ cut() { ${coreutils}/bin/cut "$@"; }\
+ sed() { ${gnused}/bin/sed "$@"; }\
+ grep() { ${gnugrep}/bin/grep "$@"; }\
+ egrep() { ${gnugrep}/bin/egrep "$@"; }\
+ file() { ${file}/bin/file "$@"; }\
+ awk() { ${gawk}/bin/awk "$@"; }\
+ sort() { ${coreutils}/bin/sort "$@"; }\
+ &#' -i "$out"/bin/*
substituteInPlace $out/bin/xdg-open \
--replace "/usr/bin/printf" "${coreutils}/bin/printf"