diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-19 14:51:25 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-19 14:53:48 -0400 |
commit | d8934feba1399d220550b81dceeb6da35149cf02 (patch) | |
tree | 19b3a7c12396f777311252a9ef83bcfdbde419e8 /lib/systems/default.nix | |
parent | 97a3c7f5a3a1d4dfd91dcf96664bc11a376bfd96 (diff) | |
download | nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar.gz nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar.bz2 nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar.lz nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar.xz nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.tar.zst nixpkgs-d8934feba1399d220550b81dceeb6da35149cf02.zip |
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
Diffstat (limited to 'lib/systems/default.nix')
-rw-r--r-- | lib/systems/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 8eeab67f7f3..b45a5fd8d2b 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -72,6 +72,13 @@ rec { release = null; }; + kernelArch = + if final.isAarch32 then "arm" + else if final.isAarch64 then "arm64" + else if final.isx86_32 then "x86" + else if final.isx86_64 then "ia64" + else final.parsed.cpu.name; + qemuArch = if final.isArm then "arm" else if final.isx86_64 then "x86_64" |