2016-01-18 00:04:40 +01:00
|
|
|
{stdenv, fetchurl, autoreconfHook, texinfo, buggyBiosCDSupport ? true}:
|
2005-07-18 11:18:07 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-01-19 22:08:33 +01:00
|
|
|
name = "grub-0.97-patch-1.12";
|
2013-04-06 01:00:50 +02:00
|
|
|
|
2005-07-18 11:18:07 +02:00
|
|
|
src = fetchurl {
|
2007-08-24 14:32:36 +02:00
|
|
|
url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
|
2014-10-12 16:13:21 +02:00
|
|
|
sha256 = "02r6b52r0nsp6ryqfiqchnl7r1d9smm80sqx24494gmx5p8ia7af";
|
2005-07-18 11:18:07 +02:00
|
|
|
};
|
2008-01-16 14:26:57 +01: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 12:40:17 +02:00
|
|
|
# failures on systems with more than 2 GiB RAM, and for booting from
|
2009-01-12 13:39:16 +01:00
|
|
|
# ext3 filesystems with 256-byte inodes as well as ext4 filesystems.
|
2008-01-16 14:26:57 +01:00
|
|
|
gentooPatches = fetchurl {
|
2012-01-19 22:08:33 +01:00
|
|
|
url = mirror://gentoo/distfiles/grub-0.97-patches-1.12.tar.bz2;
|
|
|
|
sha256 = "15xc5349hkzl03lbn2cadrmvjrf3s8sn147vv2142cwys9sdzkl0";
|
2008-01-16 14:26:57 +01:00
|
|
|
};
|
2008-01-03 17:56:03 +01:00
|
|
|
|
2008-09-18 11:43:31 +02: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 21:06:48 +02:00
|
|
|
|
|
|
|
# Provide support for the "savedefault --once" command in the Grub
|
|
|
|
# shell. KDE uses this to allow rebooting into a non-default
|
|
|
|
# entry.
|
|
|
|
(fetchurl {
|
2013-04-06 01:00:50 +02:00
|
|
|
url = "https://raw.github.com/andatche/centos-grub/master/SOURCES/grub-0.97-once.patch";
|
2009-09-21 21:06:48 +02:00
|
|
|
sha256 = "1g5qfn8lvl32h4pggdf7dmjqjpi42jblknzakb5h909fi5i1qyw8";
|
|
|
|
})
|
2013-04-06 01:00:50 +02:00
|
|
|
|
2009-07-13 18:57:33 +02:00
|
|
|
] ++ (stdenv.lib.optional buggyBiosCDSupport ./buggybios.patch);
|
2008-09-18 11:43:31 +02:00
|
|
|
|
2016-01-18 00:04:40 +01:00
|
|
|
# autoreconfHook required for the splashimage patch.
|
|
|
|
buildInputs = [ autoreconfHook texinfo ];
|
2008-01-03 17:56:03 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
2016-02-24 23:54:34 +01:00
|
|
|
|
2008-09-18 11:43:31 +02:00
|
|
|
prePatch = ''
|
2008-01-16 14:26:57 +01:00
|
|
|
unpackFile $gentooPatches
|
2008-02-04 15:35:15 +01:00
|
|
|
rm patch/400_all_grub-0.97-reiser4-20050808-gentoo.patch
|
2008-01-16 14:26:57 +01:00
|
|
|
for i in patch/*.patch; do
|
|
|
|
echo "applying patch $i"
|
|
|
|
patch -p1 < $i || patch -p0 < $i
|
|
|
|
done
|
2008-09-18 11:43:31 +02:00
|
|
|
'';
|
|
|
|
|
2015-02-09 04:28:42 +01:00
|
|
|
passthru.grubTarget = "";
|
|
|
|
|
2015-03-20 16:52:02 +01:00
|
|
|
meta = {
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
2005-07-18 11:18:07 +02:00
|
|
|
}
|