systemd: use lib.getBin for utillinux

it’s almost always a better idea to use getBin instead of .bin.
Otherwise, we could get an evaluation error if utillinux is missing
the bin otuput.
This commit is contained in:
Matthew Bauer 2019-04-20 16:39:12 -04:00
parent d8934feba1
commit 4224b034cc
1 changed files with 4 additions and 4 deletions

View File

@ -129,12 +129,12 @@ in stdenv.mkDerivation rec {
test -e $i
substituteInPlace $i \
--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 \
--replace /sbin/swapon ${lib.getBin utillinux}/sbin/swapon \
--replace /sbin/swapoff ${lib.getBin utillinux}/sbin/swapoff \
--replace /sbin/fsck ${lib.getBin utillinux}/sbin/fsck \
--replace /bin/echo ${coreutils}/bin/echo \
--replace /bin/cat ${coreutils}/bin/cat \
--replace /sbin/sulogin ${utillinux.bin}/sbin/sulogin \
--replace /sbin/sulogin ${lib.getBin utillinux}/sbin/sulogin \
--replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck \
--replace /bin/plymouth /run/current-system/sw/bin/plymouth # To avoid dependency
done