<commit_before>{ fetchurl, stdenv, flex, bison, gettext, ncurses, libusb, freetype, qemu
, EFIsupport ? false }:

let
    prefix = "grub${if EFIsupport then "-efi" else ""}";
    version = "1.99rc1";
    unifont_bdf = fetchurl {
      url = "http://unifoundry.com/unifont-5.1.20080820.bdf.gz";
      sha256 = "0s0qfff6n6282q28nwwblp5x295zd6n71kl43xj40vgvdqxv0fxx";
    };
in

stdenv.mkDerivation rec {
  name = "${prefix}-${version}";

  src = fetchurl {
    url = "ftp://alpha.gnu.org/gnu/grub/grub-1.99~rc1.tar.gz";
    sha256 = "0llxycgrs5h9n2mlgmkkg1mr2fv1rzmlw4mqb3v9hcaydkx3wczh";
    name = "${name}.tar.gz";
  };

  buildInputs = [ flex bison ncurses libusb freetype gettext ]
    ++ stdenv.lib.optional doCheck qemu;

  preConfigure =
    '' for i in "tests/util/"*.in
       do
         sed -i "$i" -e's|/bin/bash|/bin/sh|g'
       done

       # Apparently, the QEMU executable is no longer called
       # `qemu-system-i386', even on i386.
       #
       # In addition, use `-nodefaults' to avoid errors like:
       #
       #  chardev: opening backend "stdio" failed
       #  qemu: could not open serial device 'stdio': Invalid argument
       #
       # See <http://www.mail-archive.com/qemu-devel@nongnu.org/msg22775.html>.
       sed -i "tests/util/grub-shell.in" \
           -e's/qemu-system-i386/qemu-system-x86_64 -nodefaults/g'<commit_msg>Bump grub 1.9x to 1.99~rc2<commit_after>{ fetchurl, stdenv, flex, bison, gettext, ncurses, libusb, freetype, qemu
, EFIsupport ? false }:

let
    prefix = "grub${if EFIsupport then "-efi" else ""}";
    version = "1.99rc2";
    unifont_bdf = fetchurl {
      url = "http://unifoundry.com/unifont-5.1.20080820.bdf.gz";
      sha256 = "0s0qfff6n6282q28nwwblp5x295zd6n71kl43xj40vgvdqxv0fxx";
    };
in

stdenv.mkDerivation rec {
  name = "${prefix}-${version}";

  src = fetchurl {
    url = "ftp://alpha.gnu.org/gnu/grub/grub-1.99~rc2.tar.gz";
    sha256 = "ea8f243c95851d58d34ac04910929395790e9b9383d6deb2bb6750435bc3e7bd";
    name = "${name}.tar.gz";
  };

  buildInputs = [ flex bison ncurses libusb freetype gettext ]
    ++ stdenv.lib.optional doCheck qemu;

  preConfigure =
    '' for i in "tests/util/"*.in
       do
         sed -i "$i" -e's|/bin/bash|/bin/sh|g'
       done

       # Apparently, the QEMU executable is no longer called
       # `qemu-system-i386', even on i386.
       #
       # In addition, use `-nodefaults' to avoid errors like:
       #
       #  chardev: opening backend "stdio" failed
       #  qemu: could not open serial device 'stdio': Invalid argument
       #
       # See <http://www.mail-archive.com/<EMAIL>/msg22775.html>.
       sed -i "tests/util/grub-shell.in" \
           -e's/qemu-system-i386/qemu-system-x86_64 -nodefaults/g'
{'fraction_non_alphanumeric': 0.1432225063938619, 'fraction_numerical': 0.0679576178297406, 'mean_word_length': 2.6458055925432755, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3491039', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1097, 'n_words': 207}