{
  stdenv,
  fetchzip,
  mono,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "rfe-fwuploader";
  version = "latest";

  src = fetchzip {
    url = "https://j3.rf-explorer.com/download/sw/fw/RFExplorer_UploaderLinux.zip";
    hash = "sha256-eHDMQvL0L4JmEc+q4qeKV2i1EMXdE3G1JX2Jhuctg6o=";

    stripRoot = false;
  };

  buildInputs = [ mono ];

  installPhase = ''
    mkdir -p "$out/bin"
    cp $src/RFEUploaderLinux.exe $out/bin/.rfe-fwupdate-mono

    echo "#/usr/bin/env sh"
    echo "${mono}/bin/mono $out/bin/.rfe-fwupdate-mono" >> $out/bin/rfe-fwupdate
    chmod +x $out/bin/rfe-fwupdate
  '';

})
