parent
e6157451c1
commit
3317c71c5c
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake
|
{ stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake
|
||||||
, gettext, ncurses, libusb, freetype, qemu, devicemapper
|
, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont
|
||||||
, zfs ? null
|
, zfs ? null
|
||||||
, efiSupport ? false
|
, efiSupport ? false
|
||||||
, zfsSupport ? true
|
, zfsSupport ? true
|
||||||
@ -30,18 +30,7 @@ let
|
|||||||
canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
|
canEfi = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) efiSystemsBuild);
|
||||||
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
|
inPCSystems = any (system: stdenv.system == system) (mapAttrsToList (name: _: name) pcSystems);
|
||||||
|
|
||||||
version = "2.x-2015-11-16";
|
version = "2.02";
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
|
|
||||||
in (
|
in (
|
||||||
|
|
||||||
@ -52,13 +41,12 @@ assert !(efiSupport && xenSupport);
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "grub-${version}";
|
name = "grub-${version}";
|
||||||
|
|
||||||
src = fetchFromSavannah {
|
src = fetchurl {
|
||||||
repo = "grub";
|
url = "mirror://gnu/grub/${name}.tar.xz";
|
||||||
rev = "50d6f38febe80d4d3088dae1ee639b341787ab71";
|
sha256 = "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1";
|
||||||
sha256 = "1pyn2qa8hwiabhgnzj86y4b69y4a37dh5n0j4csmm7xmgc13vvww";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autogen flex bison python autoconf automake ];
|
nativeBuildInputs = [ bison flex python ];
|
||||||
buildInputs = [ ncurses libusb freetype gettext devicemapper ]
|
buildInputs = [ ncurses libusb freetype gettext devicemapper ]
|
||||||
++ optional doCheck qemu
|
++ optional doCheck qemu
|
||||||
++ optional zfsSupport zfs;
|
++ optional zfsSupport zfs;
|
||||||
@ -68,6 +56,10 @@ stdenv.mkDerivation rec {
|
|||||||
# Work around a bug in the generated flex lexer (upstream flex bug?)
|
# Work around a bug in the generated flex lexer (upstream flex bug?)
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace ./configure --replace '/usr/share/fonts/unifont' '${unifont}/share/fonts'
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure =
|
preConfigure =
|
||||||
'' for i in "tests/util/"*.in
|
'' for i in "tests/util/"*.in
|
||||||
do
|
do
|
||||||
@ -89,16 +81,6 @@ stdenv.mkDerivation rec {
|
|||||||
unset CPP # setting CPP intereferes with dependency calculation
|
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 ];
|
patches = [ ./fix-bash-completion.patch ];
|
||||||
|
|
||||||
configureFlags = optional zfsSupport "--enable-libzfs"
|
configureFlags = optional zfsSupport "--enable-libzfs"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user