diff options
author | Erik Arvstedt <erik.arvstedt@gmail.com> | 2020-08-16 23:04:18 +0200 |
---|---|---|
committer | Erik Arvstedt <erik.arvstedt@gmail.com> | 2020-08-17 13:03:54 +0200 |
commit | 68559e2820ece9eef44753441bd24b6de6947e56 (patch) | |
tree | f2124a6dad2df2567381b282b30c9466b27c5dc9 /pkgs/tools/X11 | |
parent | 397b14642b3ebcc75fdcdfbb2f6006b57f898123 (diff) | |
download | nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar.gz nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar.bz2 nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar.lz nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar.xz nixlib-68559e2820ece9eef44753441bd24b6de6947e56.tar.zst nixlib-68559e2820ece9eef44753441bd24b6de6947e56.zip |
xdg-utils: add missing dependencies
- Add coreutils to PATH, because the xdg scripts use other not yet provided coreutils like head. This makes the custom 'cut' and 'sort' functions obsolete. Remove double quotes around $out because $out contains no Bash field separators. - Replace all instances of 'which' with 'type -P'. The previous sed command only replaced instances with a leading space.
Diffstat (limited to 'pkgs/tools/X11')
-rw-r--r-- | pkgs/tools/X11/xdg-utils/default.nix | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkgs/tools/X11/xdg-utils/default.nix b/pkgs/tools/X11/xdg-utils/default.nix index ccea6a2233cc..85d87d9e36d6 100644 --- a/pkgs/tools/X11/xdg-utils/default.nix +++ b/pkgs/tools/X11/xdg-utils/default.nix @@ -36,17 +36,15 @@ stdenv.mkDerivation rec { cp ${mimisrc}/xdg-open $out/bin/xdg-open '' + '' 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 "$@"; }\ xset() { ${xset}/bin/xset "$@"; }\ perl() { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\ mimetype() { ${perlPackages.FileMimeInfo}/bin/mimetype "$@"; }\ - PATH=$PATH:'"$out"'/bin\ + PATH=$PATH:'$out'/bin:${coreutils}/bin\ &#' -i "$out"/bin/* substituteInPlace $out/bin/xdg-open \ @@ -58,7 +56,7 @@ stdenv.mkDerivation rec { substituteInPlace $out/bin/xdg-email \ --replace "/bin/echo" "${coreutils}/bin/echo" - sed 's# which # type -P #g' -i "$out"/bin/* + sed 's|\bwhich\b|type -P|g' -i "$out"/bin/* ''; meta = with stdenv.lib; { |