anchor.diff:      install -D -m0644 gptsync/gptsync_${HOSTARCH}.efi $out/share/refind/tools_${HOSTARCH}/gptsync_${HOSTARCH}.efi
   
       # helper scripts
  -    install -D -m0755 install.sh $out/bin/refind-install
  -    install -D -m0755 mkrlconf.sh $out/bin/refind-mkrlconf
  -    install -D -m0755 mvrefind.sh $out/bin/refind-mvrefind
  +    install -D -m0755 refind-install $out/bin/refind-install
  +    install -D -m0755 mkrlconf $out/bin/refind-mkrlconf
  +    install -D -m0755 mvrefind $out/bin/refind-mvrefind
       install -D -m0755 fonts/mkfont.sh $out/bin/refind-mkfont
   
       # sample config files
  
positive.code: { stdenv, fetchurl
  , unzip, gnu-efi, efibootmgr, dosfstools, imagemagick }:
  
  assert (stdenv.system == "x86_64-linux" ||stdenv.system == "i686-linux");
  
  
negative.code:   srcName = "refind-src-${meta.version}";
  
    src = fetchurl {
      url = "mirror://sourceforge/project/refind/${meta.version}/${srcName}.tar.gz";
      sha256 = "1r2qp29mz08lx36i7x52i2598773bxvfhwryd954ssq2baifjav5";
    };
  
    patches = [
      (fetchpatch {
        url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=831258;filename=002-efiprot.patch;msg=10";
        sha256 = "17h03h5mgkpamcj9jcq8h6x2admpknysrbdwccg7yxirlc52fc2s";
        name = "002-efiprot.patch";
      })
    ];
  
    buildInputs = [ gnu-efi efibootmgr dosfstools imagemagick ];
  
    HOSTARCH =
      if stdenv.system == "x86_64-linux" then "x64"
      else if stdenv.system == "i686-linux" then "ia32"
      else "null";
  
    postPatch = ''
      sed -e 's|-DEFI_FUNCTION_WRAPPER|-DEFI_FUNCTION_WRAPPER -maccumulate-outgoing-args|g' -i Make.common
      sed -e 's|-DEFIX64|-DEFIX64 -maccumulate-outgoing-args|g' -i Make.common
      sed -e 's|-m64|-maccumulate-outgoing-args -m64|g' -i filesystems/Make.gnuefi
  