grub2: 2.x-2015-11-16 -> 2.02

Fixes #24451.
wip/yesman
Franz Pletz 7 years ago
parent e6157451c1
commit 3317c71c5c
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
  1. 38
      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"

Loading…
Cancel
Save