2008-01-03 17:56:03 +01:00
|
|
|
{stdenv, fetchurl, autoconf, automake}:
|
2005-07-18 11:18:07 +02:00
|
|
|
|
2007-01-22 20:57:12 +01:00
|
|
|
if stdenv.system == "x86_64-linux" then
|
|
|
|
abort "Grub doesn't build on x86_64-linux. You should use the build for i686-linux instead."
|
|
|
|
else
|
|
|
|
|
2005-07-18 11:18:07 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "grub-0.97";
|
2008-01-03 17:56:03 +01: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;
|
2005-07-18 11:18:07 +02:00
|
|
|
md5 = "cd3f3eb54446be6003156158d51f4884";
|
|
|
|
};
|
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
|
|
|
|
# failures on systems with more than 2 GiB RAM.
|
|
|
|
gentooPatches = fetchurl {
|
|
|
|
url = mirror://gentoo/distfiles/grub-0.97-patches-1.4.tar.bz2;
|
|
|
|
sha256 = "1nki5q1b61ahxcmnw6mq7b8ghcysri4lj7q6dx8iqixrvrpxj399";
|
|
|
|
};
|
2008-01-03 17:56:03 +01:00
|
|
|
|
|
|
|
# Autoconf/automake required for the splashimage patch.
|
|
|
|
buildInputs = [autoconf automake];
|
|
|
|
|
|
|
|
preConfigure = ''
|
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-01-03 17:56:03 +01:00
|
|
|
autoreconf
|
|
|
|
'';
|
2005-07-18 11:18:07 +02:00
|
|
|
}
|