git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit4224b034cc9cf415517f5779c7a6fc5fda2ff635 authorMatthew Bauer <mjbauer95@gmail.com> dateSat 20 Apr 2019, 16:39 (8 years ago) parentd8934fe
1 file changed+4−4
pkgs/os-specific/linux/systemd/default.nix+4−4
pkgs/os-specific/linux/systemd/default.nix+4−4
@@ -129,12 +129,12 @@ in stdenv.mkDerivation rec {
129129 test -e $i
130130 substituteInPlace $i \
131131 --replace /usr/bin/getent ${getent}/bin/getent \
132− --replace /sbin/swapon ${utillinux.bin}/sbin/swapon \
133− --replace /sbin/swapoff ${utillinux.bin}/sbin/swapoff \
134− --replace /sbin/fsck ${utillinux.bin}/sbin/fsck \
132+ --replace /sbin/swapon ${lib.getBin utillinux}/sbin/swapon \
133+ --replace /sbin/swapoff ${lib.getBin utillinux}/sbin/swapoff \
134+ --replace /sbin/fsck ${lib.getBin utillinux}/sbin/fsck \
135135 --replace /bin/echo ${coreutils}/bin/echo \
136136 --replace /bin/cat ${coreutils}/bin/cat \
137− --replace /sbin/sulogin ${utillinux.bin}/sbin/sulogin \
137+ --replace /sbin/sulogin ${lib.getBin utillinux}/sbin/sulogin \
138138 --replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck \
139139 --replace /bin/plymouth /run/current-system/sw/bin/plymouth # To avoid dependency
140140 done