anchor.diff:    ];
   
     postPatch = ''
  +    grep -q '/usr/share/fonts/truetype' configure
       sed -i 's,/usr/share/fonts/truetype,${dejavu-fonts}/share/fonts/truetype,g' configure
  -    sed -i 's, -Werror,,' grub-core/Makefile.in
     '';
   
     configureFlags = [
  -    "--target=${target}"
  -    "--with-platform=${platform}"
       "--program-prefix="
       "--program-suffix="
  -    "--disable-werror"
  +    "--target=${target}"
  +  ] ++ optionals (platform != "efi") [
  +    "--enable-efiemu"
  +  ] ++ [
  +    "--enable-cache-stats"
  +    "--enable-boot-time"
       "--enable-grub-mkfont"
       "--enable-grub-themes"
       "--enable-grub-mount"
  +    "--enable-device-mapper"
       "--enable-liblzma"
       "--enable-libzfs"
  +    "--disable-werror"
  +    "--with-platform=${platform}"
     ];
   
     postFixup = optionalString ("efi" == platform) ''
  
positive.code:     platform
      target;
  
    version = "2.02";
  in
  stdenv.mkDerivation rec {
    name = "grub-${version}-${type}";
  
    src = fetchurl {
      url = "mirror://gnu/grub/grub-${version}.tar.xz";
      hashOutput = false;
      sha256 = "810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f";
    };
  
    nativeBuildInputs = [
      autogen
      bison
      flex
      makeWrapper
    ];
  
    buildInputs = [
      freetype
      fuse_2
      gettext
      libusb_1
      lvm2
      ncurses
      xz
      zfs
    ];
  
negative.code:     any
      mapAttrsToList
      optionals
      optionalString
      replaceStrings;
  
    typeMap = {
      "bios-i386" = {
  