fish: on musl use musl-getent
This commit is contained in:
parent
d4a2e336b4
commit
172af30d8a
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, fetchurl, coreutils, utillinux,
|
{ stdenv, fetchurl, coreutils, utillinux,
|
||||||
nettools, kbd, bc, which, gnused, gnugrep,
|
nettools, kbd, bc, which, gnused, gnugrep,
|
||||||
groff, man-db, glibc, libiconv, pcre2,
|
groff, man-db, glibc, musl-getent, libiconv, pcre2,
|
||||||
gettext, ncurses, python3
|
gettext, ncurses, python3
|
||||||
|
|
||||||
, writeText
|
, writeText
|
||||||
|
@ -12,6 +12,9 @@
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
getent = if stdenv.hostPlatform.isMusl
|
||||||
|
then "${musl-getent}/bin/getent"
|
||||||
|
else "${glibc.bin}/bin/getent";
|
||||||
etcConfigAppendixText = ''
|
etcConfigAppendixText = ''
|
||||||
############### ↓ Nix hook for sourcing /etc/fish/config.fish ↓ ###############
|
############### ↓ Nix hook for sourcing /etc/fish/config.fish ↓ ###############
|
||||||
# #
|
# #
|
||||||
|
@ -142,7 +145,7 @@ let
|
||||||
sed -e "s| ul| ${utillinux}/bin/ul|" \
|
sed -e "s| ul| ${utillinux}/bin/ul|" \
|
||||||
-i "$out/share/fish/functions/__fish_print_help.fish"
|
-i "$out/share/fish/functions/__fish_print_help.fish"
|
||||||
for cur in $out/share/fish/functions/*.fish; do
|
for cur in $out/share/fish/functions/*.fish; do
|
||||||
sed -e "s|/usr/bin/getent|${glibc.bin}/bin/getent|" \
|
sed -e "s|/usr/bin/getent|${getent}|" \
|
||||||
-i "$cur"
|
-i "$cur"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue