Commit b571e6d9 authored by SirBerg's avatar SirBerg
Browse files

volanta: init at 1.10.10

parent 4878c1d9
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
{
  appimageTools,
  fetchurl,
  lib,
  makeWrapper,
}:
let
  pname = "volanta";
  version = "1.10.10";
  src = fetchurl {
    url = "https://cdn.volanta.app/software/volanta-app/${version}-a7ebf1c7/volanta-${version}.AppImage";
    hash = "sha256-pdMPC3flJzguRYmS+xKiAXWQ4BKsD3N48S27djXDtuo=";
  };
  appImageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 rec {
  inherit pname version src;

  nativeBuildInputs = [ makeWrapper ];

  # Note: Volanta needs the env variable APPIMAGE=true to be set in order to work at all.
  extraInstallCommands = ''
    install -m 444 -D ${appImageContents}/volanta.desktop $out/share/applications/volanta.desktop
    install -m 444 -D ${appImageContents}/volanta.png \
      $out/share/icons/hicolor/1024x1024/apps/volanta.png
    substituteInPlace $out/share/applications/volanta.desktop \
      --replace-fail 'Exec=AppRun' 'Exec=env APPIMAGE=true volanta'
    wrapProgram $out/bin/volanta \
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
  '';
  meta = {
    description = "Easy-to-use smart flight tracker that integrates all your flight data across all major flightsims";
    homepage = "https://volanta.app/";
    maintainers = with lib.maintainers; [ SirBerg ];
    mainProgram = "volanta";
    platforms = [ "x86_64-linux" ];
    license = lib.licenses.unfree;
  };
}