2009-07-14 18:23:53 +00:00
|
|
|
{stdenv, fetchurl, autoconf, automake, buggyBiosCDSupport ? true}:
|
2005-07-18 09:18:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-09-10 12:21:43 +00:00
|
|
|
name = "grub-0.97-patch-1.10";
|
2008-01-03 16:56:03 +00:00
|
|
|
|
2005-07-18 09:18:07 +00:00
|
|
|
src = fetchurl {
|
2007-08-24 12:32:36 +00:00
|
|
|
url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
|
2005-07-18 09:18:07 +00:00
|
|
|
md5 = "cd3f3eb54446be6003156158d51f4884";
|
|
|
|
};
|
2008-01-16 13:26:57 +00:00
|
|
|
|
|
|
|
# Lots of patches from Gentoo, in particular splash screen support
|
|
|
|
# (not the fancy SUSE gfxmenu stuff though). Also a fix for boot
|
2008-05-08 10:40:17 +00:00
|
|
|
# failures on systems with more than 2 GiB RAM, and for booting from
|
2009-01-12 12:39:16 +00:00
|
|
|
# ext3 filesystems with 256-byte inodes as well as ext4 filesystems.
|
2008-01-16 13:26:57 +00:00
|
|
|
gentooPatches = fetchurl {
|
2010-09-10 12:21:43 +00:00
|
|
|
url = mirror://gentoo/distfiles/grub-0.97-patches-1.10.tar.bz2;
|
|
|
|
sha256 = "015hkmb2jd6jfzkfr13cdh16frvva04rwr4yahzyw5xhl634d1h9";
|
2008-01-16 13:26:57 +00:00
|
|
|
};
|
2008-01-03 16:56:03 +00:00
|
|
|
|
2008-09-18 09:43:31 +00:00
|
|
|
patches = [
|
|
|
|
# Properly handle the case of symlinks such as
|
|
|
|
# /dev/disk/by-label/bla. The symlink resolution code in
|
|
|
|
# grub-install isn't smart enough.
|
|
|
|
./symlink.patch
|
2009-09-21 19:06:48 +00:00
|
|
|
|
|
|
|
# Provide support for the "savedefault --once" command in the Grub
|
|
|
|
# shell. KDE uses this to allow rebooting into a non-default
|
|
|
|
# entry.
|
|
|
|
(fetchurl {
|
|
|
|
url = http://cvs.mandriva.com/cgi-bin/viewvc.cgi/SPECS/grub/grub-0.97-once.patch?revision=1.3;
|
|
|
|
sha256 = "1g5qfn8lvl32h4pggdf7dmjqjpi42jblknzakb5h909fi5i1qyw8";
|
|
|
|
})
|
|
|
|
|
2009-07-13 16:57:33 +00:00
|
|
|
] ++ (stdenv.lib.optional buggyBiosCDSupport ./buggybios.patch);
|
2008-09-18 09:43:31 +00:00
|
|
|
|
2008-01-03 16:56:03 +00:00
|
|
|
# Autoconf/automake required for the splashimage patch.
|
|
|
|
buildInputs = [autoconf automake];
|
|
|
|
|
2008-09-18 09:43:31 +00:00
|
|
|
prePatch = ''
|
2008-01-16 13:26:57 +00:00
|
|
|
unpackFile $gentooPatches
|
2008-02-04 14:35:15 +00:00
|
|
|
rm patch/400_all_grub-0.97-reiser4-20050808-gentoo.patch
|
2008-01-16 13:26:57 +00:00
|
|
|
for i in patch/*.patch; do
|
|
|
|
echo "applying patch $i"
|
|
|
|
patch -p1 < $i || patch -p0 < $i
|
|
|
|
done
|
2008-09-18 09:43:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
2008-01-03 16:56:03 +00:00
|
|
|
autoreconf
|
|
|
|
'';
|
2005-07-18 09:18:07 +00:00
|
|
|
}
|