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:47:16 -06:00
parent 6c3df22c5a
commit d3b59f864a
3 changed files with 13 additions and 13 deletions
+3 -8
View File
@@ -7,18 +7,13 @@
, autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45
, ninja, meson, python3Packages, glibcLocales
, patchelf
, musl-getent ? null
, getent
}:
assert stdenv.isLinux;
let
pythonLxmlEnv = python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]);
getent-bin =
if stdenv.hostPlatform.libc == "glibc" then stdenv.cc.libc.bin
else if stdenv.hostPlatform.isMusl then "${musl-getent}"
else throw "unsupported abi for systemd";
getent = "${getent-bin}/bin/getent";
in
@@ -40,7 +35,7 @@ in
ninja meson
coreutils # meson calls date, stat etc.
pythonLxmlEnv glibcLocales
patchelf getent-bin
patchelf getent
];
buildInputs =
[ linuxHeaders libcap kmod xz pam acl
@@ -114,7 +109,7 @@ in
for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/core/shutdown.c src/nspawn/nspawn.c src/shared/generator.c; do
test -e $i
substituteInPlace $i \
--replace /usr/bin/getent ${getent} \
--replace /usr/bin/getent ${getent}/bin/getent \
--replace /sbin/swapon ${utillinux.bin}/sbin/swapon \
--replace /sbin/swapoff ${utillinux.bin}/sbin/swapoff \
--replace /sbin/fsck ${utillinux.bin}/sbin/fsck \