From 4224b034cc9cf415517f5779c7a6fc5fda2ff635 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 20 Apr 2019 16:39:12 -0400 Subject: [PATCH] systemd: use lib.getBin for utillinux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/os-specific/linux/systemd/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index d54972c055b..bc071d21ce4 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -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