forked from mirrors/nixpkgs
Merge pull request #26414 from volth/issue-25511
xdg_utils: fix #25511 (broken sed magic)
This commit is contained in:
commit
661ec1950d
|
@ -29,15 +29,16 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
postInstall = stdenv.lib.optionalString mimiSupport ''
|
postInstall = stdenv.lib.optionalString mimiSupport ''
|
||||||
cp ${mimisrc}/xdg-open $out/bin/xdg-open
|
cp ${mimisrc}/xdg-open $out/bin/xdg-open
|
||||||
''
|
'' + ''
|
||||||
+ ''
|
sed '2s#.#\
|
||||||
for tool in "${coreutils}/bin/cut" "${gnused}/bin/sed" \
|
cut() { ${coreutils}/bin/cut "$@"; }\
|
||||||
"${gnugrep}"/bin/{e,}grep "${file}/bin/file" \
|
sed() { ${gnused}/bin/sed "$@"; }\
|
||||||
${stdenv.lib.optionalString mimiSupport
|
grep() { ${gnugrep}/bin/grep "$@"; }\
|
||||||
'' "${gawk}/bin/awk" "${coreutils}/bin/sort" ''} ;
|
egrep() { ${gnugrep}/bin/egrep "$@"; }\
|
||||||
do
|
file() { ${file}/bin/file "$@"; }\
|
||||||
sed "s# $(basename "$tool") # $tool #g" -i "$out"/bin/*
|
awk() { ${gawk}/bin/awk "$@"; }\
|
||||||
done
|
sort() { ${coreutils}/bin/sort "$@"; }\
|
||||||
|
&#' -i "$out"/bin/*
|
||||||
|
|
||||||
substituteInPlace $out/bin/xdg-open \
|
substituteInPlace $out/bin/xdg-open \
|
||||||
--replace "/usr/bin/printf" "${coreutils}/bin/printf"
|
--replace "/usr/bin/printf" "${coreutils}/bin/printf"
|
||||||
|
|
Loading…
Reference in a new issue