fish: fix hidden dependency on ${glibc}/bin/getent on Linux

This commit is contained in:
Nathan Zadoks 2016-02-28 22:26:42 +01:00
parent da1f465b94
commit 010271d47a

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, ncurses, nettools, python, which, groff, gettext, man_db,
bc, libiconv, coreutils, gnused, kbd, utillinux }:
bc, libiconv, coreutils, gnused, kbd, utillinux, glibc }:
stdenv.mkDerivation rec {
name = "fish-${version}";
@ -46,6 +46,10 @@ stdenv.mkDerivation rec {
'' + stdenv.lib.optionalString stdenv.isLinux ''
substituteInPlace "$out/share/fish/functions/__fish_print_help.fish" \
--replace "| ul" "| ${utillinux}/bin/ul"
for cur in $out/share/fish/functions/*.fish; do
substituteInPlace "$cur" --replace "/usr/bin/getent" "${glibc}/bin/getent"
done
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
sed -i "s|(hostname\||(${nettools}/bin/hostname\||" "$out/share/fish/functions/fish_prompt.fish"
sed -i "s|Popen(\['manpath'|Popen(\['${man_db}/bin/manpath'|" "$out/share/fish/tools/create_manpage_completions.py"