anchor.diff:      install -d $out/share/refind/keys/
   
       # refind uefi app
  -    install -D -m0644 refind/refind_${HOSTARCH}.efi $out/share/refind/refind_${HOSTARCH}.efi
  +    install -D -m0644 refind/refind_${efiPlatform}.efi $out/share/refind/refind_${efiPlatform}.efi
   
       # uefi drivers
  -    install -D -m0644 drivers_${HOSTARCH}/*.efi $out/share/refind/drivers_${HOSTARCH}/
  +    install -D -m0644 drivers_${efiPlatform}/*.efi $out/share/refind/drivers_${efiPlatform}/
   
       # uefi apps
  -    install -D -m0644 gptsync/gptsync_${HOSTARCH}.efi $out/share/refind/tools_${HOSTARCH}/gptsync_${HOSTARCH}.efi
  +    install -D -m0644 gptsync/gptsync_${efiPlatform}.efi $out/share/refind/tools_${efiPlatform}/gptsync_${efiPlatform}.efi
   
       # helper scripts
  -    install -D -m0755 refind-install $out/bin/refind-install
  +    install -D -m0755 refind-install $out/share/refind/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
  
positive.code:     # keys
      install -D -m0644 keys/* $out/share/refind/keys/
  
      # fix sharp-bang paths
      patchShebangs $out/bin/refind-*
  
      # Post-install fixes
      sed -e "s|^ThisDir=.*|ThisDir=$out/share/refind/|g" -i $out/bin/refind-install
      sed -e "s|^RefindDir=.*|RefindDir=$out/share/refind/|g" -i $out/bin/refind-install
    '';
  
    meta = with stdenv.lib; {
      version = "0.10.3";
      description = "A graphical {,U}EFI boot manager";
      longDescription = ''
        rEFInd is a graphical boot manager for EFI- and UEFI-based
  
negative.code:     })
    ];
  
    buildInputs = [ gnu-efi ];
  
    hardeningDisable = [ "stackprotector" ];
  
    postPatch = ''
      sed -e 's|-DEFI_FUNCTION_WRAPPER|-DEFI_FUNCTION_WRAPPER -maccumulate-outgoing-args|g' -i Make.common
  