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
This commit is contained in:
Matthew Bauer
2019-04-19 14:51:25 -04:00
parent 97a3c7f5a3
commit d8934feba1
2 changed files with 8 additions and 1 deletions

View File

@@ -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.