treewide: remove cross assertions

sd-image-raspberrypi, sd-image-aarch64, and
sd-image-armv7l-multiplatform can all be cross compiled now.
This commit is contained in:
Matthew Bauer 2018-12-28 13:55:55 -06:00
parent 35af6e3605
commit 921a47bc92
5 changed files with 3 additions and 24 deletions

View File

@ -15,13 +15,6 @@ in
./sd-image.nix ./sd-image.nix
]; ];
assertions = lib.singleton {
assertion = pkgs.stdenv.hostPlatform.system == "aarch64-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " +
"it cannot be cross compiled";
};
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; boot.loader.generic-extlinux-compatible.enable = true;

View File

@ -15,13 +15,6 @@ in
./sd-image.nix ./sd-image.nix
]; ];
assertions = lib.singleton {
assertion = pkgs.stdenv.hostPlatform.system == "armv7l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-armv7l-multiplatform.nix can be only built natively on ARMv7; " +
"it cannot be cross compiled";
};
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; boot.loader.generic-extlinux-compatible.enable = true;

View File

@ -15,13 +15,6 @@ in
./sd-image.nix ./sd-image.nix
]; ];
assertions = lib.singleton {
assertion = pkgs.stdenv.hostPlatform.system == "armv6l-linux"
&& pkgs.stdenv.hostPlatform.system == pkgs.stdenv.buildPlatform.system;
message = "sd-image-raspberrypi.nix can be only built natively on ARMv6; " +
"it cannot be cross compiled";
};
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true; boot.loader.generic-extlinux-compatible.enable = true;

View File

@ -19,7 +19,7 @@ let
blCfg = config.boot.loader; blCfg = config.boot.loader;
timeoutStr = if blCfg.timeout == null then "-1" else toString blCfg.timeout; timeoutStr = if blCfg.timeout == null then "-1" else toString blCfg.timeout;
isAarch64 = pkgs.stdenv.isAarch64; isAarch64 = pkgs.stdenv.hostPlatform.isAarch64;
optional = pkgs.stdenv.lib.optionalString; optional = pkgs.stdenv.lib.optionalString;
configTxt = configTxt =
@ -97,7 +97,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = singleton { assertions = singleton {
assertion = !pkgs.stdenv.isAarch64 || cfg.version == 3; assertion = !pkgs.stdenv.hostPlatform.isAarch64 || cfg.version == 3;
message = "Only Raspberry Pi 3 supports aarch64."; message = "Only Raspberry Pi 3 supports aarch64.";
}; };

View File

@ -1,7 +1,7 @@
{ pkgs, version, configTxt }: { pkgs, version, configTxt }:
let let
isAarch64 = pkgs.stdenv.isAarch64; isAarch64 = pkgs.stdenv.hostPlatform.isAarch64;
uboot = uboot =
if version == 0 then if version == 0 then