diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-03-08 23:26:41 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-03-08 23:26:41 +0000 |
commit | 6e69b4dbd079a22ef19f17213a9c537fa4c45181 (patch) | |
tree | c1b8ead699fe4564abadfbeafe511477267e3044 /pkgs/tools/misc/grub/1.9x.nix | |
parent | 499b5ca40ab9d31e35a223c70fc7f17d4ce0a203 (diff) | |
download | nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar.gz nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar.bz2 nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar.lz nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar.xz nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.tar.zst nixpkgs-6e69b4dbd079a22ef19f17213a9c537fa4c45181.zip |
GNU GRUB 1.9 for UEFI.
Based on a patch by Shea Levy <shea@shealevy.com>. svn path=/nixpkgs/trunk/; revision=26216
Diffstat (limited to 'pkgs/tools/misc/grub/1.9x.nix')
-rw-r--r-- | pkgs/tools/misc/grub/1.9x.nix | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/tools/misc/grub/1.9x.nix b/pkgs/tools/misc/grub/1.9x.nix index 2fbbf4d2d9a..e917e620bb4 100644 --- a/pkgs/tools/misc/grub/1.9x.nix +++ b/pkgs/tools/misc/grub/1.9x.nix @@ -1,13 +1,17 @@ -{ fetchurl, stdenv, flex, bison, gettext, ncurses, libusb, freetype, qemu }: +{ fetchurl, stdenv, flex, bison, gettext, ncurses, libusb, freetype, qemu +, EFIsupport ? false }: -let unifont_bdf = fetchurl { +let + prefix = "grub${if EFIsupport then "-efi" else ""}"; + version = "1.99rc1"; + unifont_bdf = fetchurl { url = "http://unifoundry.com/unifont-5.1.20080820.bdf.gz"; sha256 = "0s0qfff6n6282q28nwwblp5x295zd6n71kl43xj40vgvdqxv0fxx"; }; in stdenv.mkDerivation rec { - name = "grub-1.99rc1"; + name = "${prefix}-${version}"; src = fetchurl { url = "ftp://alpha.gnu.org/gnu/grub/grub-1.99~rc1.tar.gz"; @@ -43,6 +47,14 @@ stdenv.mkDerivation rec { -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g" ''; + configureFlags = + let arch = if stdenv.system == "i686-linux" then "i386" + else if stdenv.system == "x86_64-linux" then "x86_64" + else abort "unsupported EFI firmware architecture"; + in + stdenv.lib.optionals EFIsupport + [ "--with-platform=efi" "--target=${arch}" "--program-prefix=" ]; + doCheck = false; meta = { |