Navigation Menu

Skip to content

Commit

Permalink
treewide: remove cross assertions
Browse files Browse the repository at this point in the history
sd-image-raspberrypi, sd-image-aarch64, and
sd-image-armv7l-multiplatform can all be cross compiled now.
  • Loading branch information
matthewbauer committed Jan 3, 2019
1 parent 35af6e3 commit 921a47b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 24 deletions.
7 changes: 0 additions & 7 deletions nixos/modules/installer/cd-dvd/sd-image-aarch64.nix
Expand Up @@ -15,13 +15,6 @@ in
./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.generic-extlinux-compatible.enable = true;

Expand Down
Expand Up @@ -15,13 +15,6 @@ in
./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.generic-extlinux-compatible.enable = true;

Expand Down
7 changes: 0 additions & 7 deletions nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
Expand Up @@ -15,13 +15,6 @@ in
./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.generic-extlinux-compatible.enable = true;

Expand Down
4 changes: 2 additions & 2 deletions nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix
Expand Up @@ -19,7 +19,7 @@ let
blCfg = config.boot.loader;
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;

configTxt =
Expand Down Expand Up @@ -97,7 +97,7 @@ in

config = mkIf cfg.enable {
assertions = singleton {
assertion = !pkgs.stdenv.isAarch64 || cfg.version == 3;
assertion = !pkgs.stdenv.hostPlatform.isAarch64 || cfg.version == 3;
message = "Only Raspberry Pi 3 supports aarch64.";
};

Expand Down
@@ -1,7 +1,7 @@
{ pkgs, version, configTxt }:

let
isAarch64 = pkgs.stdenv.isAarch64;
isAarch64 = pkgs.stdenv.hostPlatform.isAarch64;

uboot =
if version == 0 then
Expand Down

0 comments on commit 921a47b

Please sign in to comment.