about summary refs log tree commit diff
path: root/pkgs/tools/misc/grub/2.0x.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-20 15:11:29 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-30 17:20:32 -0400
commit2c2f1e37d4374ea61caefd9389927ea03df4ce31 (patch)
tree1c0dff3f6483825a9143741bdddca44f35bb4224 /pkgs/tools/misc/grub/2.0x.nix
parent94f71d800db2ef7afb9fc8dad9e9aa503bfa2941 (diff)
reewide: Purge all uses `stdenv.system` and top-level `system`
It is deprecated and will be removed after 18.09.
Diffstat (limited to 'pkgs/tools/misc/grub/2.0x.nix')
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index 63511782f00b6..481a07ef491b5 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -28,8 +28,8 @@ let
     "aarch64-linux".target = "arm64";
   };
 
-  canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
-  inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
+  canEfi = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
+  inPCSystems = any (system: stdenv.hostPlatform.system == system) (mapAttrsToList (name: _: name) pcSystems);
 
   version = "2.02";
 
@@ -86,14 +86,14 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
     ++ optional zfsSupport "--enable-libzfs"
-    ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
-    ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
+    ++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}" "--program-prefix=" ]
+    ++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.hostPlatform.system}.target}"];
 
   # save target that grub is compiled for
   grubTarget = if efiSupport
-               then "${efiSystemsInstall.${stdenv.system}.target}-efi"
+               then "${efiSystemsInstall.${stdenv.hostPlatform.system}.target}-efi"
                else if inPCSystems
-                    then "${pcSystems.${stdenv.system}.target}-pc"
+                    then "${pcSystems.${stdenv.hostPlatform.system}.target}-pc"
                     else "";
 
   doCheck = false;