summary refs log tree commit diff
path: root/pkgs/tools/misc/grub
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-08-12 00:54:28 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-08-14 07:57:15 +0200
commit3317c71c5c629939e434288390c1d26506160d13 (patch)
tree6c9a6010b92cdc42d26f34ba583f3cb035298a08 /pkgs/tools/misc/grub
parente6157451c18f884b37c14a69f585900c0107dccf (diff)
downloadnixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar.gz
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar.bz2
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar.lz
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar.xz
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.tar.zst
nixpkgs-3317c71c5c629939e434288390c1d26506160d13.zip
grub2: 2.x-2015-11-16 -> 2.02
Fixes #24451.
Diffstat (limited to 'pkgs/tools/misc/grub')
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix38
1 files changed, 10 insertions, 28 deletions
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index 634022e88e0..5b9130bbe0e 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake
-, gettext, ncurses, libusb, freetype, qemu, devicemapper
+, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont
 , zfs ? null
 , efiSupport ? false
 , zfsSupport ? true
@@ -30,18 +30,7 @@ let
   canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
   inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
 
-  version = "2.x-2015-11-16";
-
-  unifont_bdf = fetchurl {
-    url = "http://unifoundry.com/unifont-5.1.20080820.bdf.gz";
-    sha256 = "0s0qfff6n6282q28nwwblp5x295zd6n71kl43xj40vgvdqxv0fxx";
-  };
-
-  po_src = fetchurl {
-    name = "grub-2.02-beta2.tar.gz";
-    url = "http://alpha.gnu.org/gnu/grub/grub-2.02~beta2.tar.gz";
-    sha256 = "1lr9h3xcx0wwrnkxdnkfjwy08j7g7mdlmmbdip2db4zfgi69h0rm";
-  };
+  version = "2.02";
 
 in (
 
@@ -52,13 +41,12 @@ assert !(efiSupport && xenSupport);
 stdenv.mkDerivation rec {
   name = "grub-${version}";
 
-  src = fetchFromSavannah {
-    repo = "grub";
-    rev = "50d6f38febe80d4d3088dae1ee639b341787ab71";
-    sha256 = "1pyn2qa8hwiabhgnzj86y4b69y4a37dh5n0j4csmm7xmgc13vvww";
+  src = fetchurl {
+    url = "mirror://gnu/grub/${name}.tar.xz";
+    sha256 = "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1";
   };
 
-  nativeBuildInputs = [ autogen flex bison python autoconf automake ];
+  nativeBuildInputs = [ bison flex python ];
   buildInputs = [ ncurses libusb freetype gettext devicemapper ]
     ++ optional doCheck qemu
     ++ optional zfsSupport zfs;
@@ -68,6 +56,10 @@ stdenv.mkDerivation rec {
   # Work around a bug in the generated flex lexer (upstream flex bug?)
   NIX_CFLAGS_COMPILE = "-Wno-error";
 
+  postPatch = ''
+    substituteInPlace ./configure --replace '/usr/share/fonts/unifont' '${unifont}/share/fonts'
+  '';
+
   preConfigure =
     '' for i in "tests/util/"*.in
        do
@@ -89,16 +81,6 @@ stdenv.mkDerivation rec {
       unset CPP # setting CPP intereferes with dependency calculation
     '';
 
-  prePatch =
-    '' tar zxf ${po_src} grub-2.02~beta2/po
-       rm -rf po
-       mv grub-2.02~beta2/po po
-       sh autogen.sh
-       gunzip < "${unifont_bdf}" > "unifont.bdf"
-       sed -i "configure" \
-           -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g"
-    '';
-
   patches = [ ./fix-bash-completion.patch ];
 
   configureFlags = optional zfsSupport "--enable-libzfs"