diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-20 15:11:29 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-30 17:20:32 -0400 |
commit | 2c2f1e37d4374ea61caefd9389927ea03df4ce31 (patch) | |
tree | 1c0dff3f6483825a9143741bdddca44f35bb4224 /nixos/modules/installer | |
parent | 94f71d800db2ef7afb9fc8dad9e9aa503bfa2941 (diff) | |
download | nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.gz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.bz2 nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.lz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.xz nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.zst nixlib-2c2f1e37d4374ea61caefd9389927ea03df4ce31.zip |
reewide: Purge all uses `stdenv.system` and top-level `system`
It is deprecated and will be removed after 18.09.
Diffstat (limited to 'nixos/modules/installer')
6 files changed, 10 insertions, 7 deletions
diff --git a/nixos/modules/installer/cd-dvd/installation-cd-base.nix b/nixos/modules/installer/cd-dvd/installation-cd-base.nix index 1453e8082b0d..24070a786945 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-base.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-base.nix @@ -16,7 +16,7 @@ with lib; ]; # ISO naming. - isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.iso"; + isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; isoImage.volumeID = substring 0 11 "NIXOS_ISO"; diff --git a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix index bd6cf029967c..86e19f3da562 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "aarch64-linux"; + 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"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix index 0c89eb533359..695c79ca1707 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv7l-linux"; + 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"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix index 78ea3f1a205c..e395b265d15e 100644 --- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix +++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix @@ -16,7 +16,8 @@ in ]; assertions = lib.singleton { - assertion = pkgs.stdenv.system == "armv6l-linux"; + 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"; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 2371be9d89a1..b6e1d11c2b54 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -22,7 +22,7 @@ in { options.sdImage = { imageName = mkOption { - default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.system}.img"; + default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img"; description = '' Name of the generated image file. ''; @@ -102,7 +102,7 @@ in mkdir -p $out/nix-support $out/sd-image export img=$out/sd-image/${config.sdImage.imageName} - echo "${pkgs.stdenv.system}" > $out/nix-support/system + echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system echo "file sd-image $img" >> $out/nix-support/hydra-build-products # Create the image file sized to fit /boot and /, plus 20M of slack diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index ea640173c6dd..303d9fce3f9a 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -25,7 +25,7 @@ with lib; # !!! Hack - attributes expected by other modules. environment.systemPackages = [ pkgs.grub2_efi ] - ++ (if pkgs.stdenv.system == "aarch64-linux" + ++ (if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then [] else [ pkgs.grub2 pkgs.syslinux ]); |