define top-level attrs for getent, getconf

Note that currently getent is explicitly taken from "glibc.bin",
regardless of build configuration which this preserves for now.
(on non-musl anyway)
This commit is contained in:
Will Dietz
2018-02-13 11:38:14 -06:00
parent 6c3df22c5a
commit d3b59f864a
3 changed files with 13 additions and 13 deletions

View File

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