From d8934feba1399d220550b81dceeb6da35149cf02 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 19 Apr 2019 14:51:25 -0400 Subject: kernel-headers: infer ARCH from config triple This makes us less reliant on the systems/examples.nix. You should be able to cross compile with just your triple: $ nix build --arg crossSystem '{ config = "armv6l-unknown-linux-gnueabi"; }' stdenv --- pkgs/os-specific/linux/kernel-headers/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/os-specific') diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index c00fc1761d5..ea4e041d43a 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -12,7 +12,7 @@ let inherit sha256; }; - ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or (throw "missing kernelArch"); + ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. -- cgit 1.4.1 From 4224b034cc9cf415517f5779c7a6fc5fda2ff635 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 20 Apr 2019 16:39:12 -0400 Subject: 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(-) (limited to 'pkgs/os-specific') 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 -- cgit 1.4.1