1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/pkgs/tools/misc/grub/default.nix
Eelco Dolstra 6021bcf0dc * Updated the GRUB 0.97 patchset from Gentoo to 1.10.
svn path=/nixpkgs/trunk/; revision=23715
2010-09-10 12:21:43 +00:00

52 lines
1.6 KiB
Nix

{stdenv, fetchurl, autoconf, automake, buggyBiosCDSupport ? true}:
stdenv.mkDerivation {
name = "grub-0.97-patch-1.10";
src = fetchurl {
url = ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz;
md5 = "cd3f3eb54446be6003156158d51f4884";
};
# Lots of patches from Gentoo, in particular splash screen support
# (not the fancy SUSE gfxmenu stuff though). Also a fix for boot
# failures on systems with more than 2 GiB RAM, and for booting from
# ext3 filesystems with 256-byte inodes as well as ext4 filesystems.
gentooPatches = fetchurl {
url = mirror://gentoo/distfiles/grub-0.97-patches-1.10.tar.bz2;
sha256 = "015hkmb2jd6jfzkfr13cdh16frvva04rwr4yahzyw5xhl634d1h9";
};
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
# 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";
})
] ++ (stdenv.lib.optional buggyBiosCDSupport ./buggybios.patch);
# Autoconf/automake required for the splashimage patch.
buildInputs = [autoconf automake];
prePatch = ''
unpackFile $gentooPatches
rm patch/400_all_grub-0.97-reiser4-20050808-gentoo.patch
for i in patch/*.patch; do
echo "applying patch $i"
patch -p1 < $i || patch -p0 < $i
done
'';
preConfigure = ''
autoreconf
'';
}