diff --git a/pkgs/tools/misc/grub/default.nix b/pkgs/tools/misc/grub/default.nix index ab7951e8e5e..9a1ee4319df 100644 --- a/pkgs/tools/misc/grub/default.nix +++ b/pkgs/tools/misc/grub/default.nix @@ -1,5 +1,9 @@ {stdenv, fetchurl}: +if stdenv.system == "x86_64-linux" then + abort "Grub doesn't build on x86_64-linux. You should use the build for i686-linux instead." +else + stdenv.mkDerivation { name = "grub-0.97"; src = fetchurl { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 805b6d8ef16..84becd19e5e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -369,9 +369,13 @@ rec { inherit fetchurl stdenv; }; - grub = import ../tools/misc/grub { - inherit fetchurl stdenv; - }; + grub = + if system == "x86_64-linux" then + (import ./all-packages.nix {system = "i686-linux";}).grub + else + import ../tools/misc/grub { + inherit fetchurl stdenv; + }; grubWrapper = import ../tools/misc/grub-wrapper { inherit stdenv grub diffutils gnused gnugrep coreutils;