Unverified Commit 36420cc4 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

volanta: 1.12.0 -> 1.12.4 (#438492)

parents 006ef47f df10188f
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -3,13 +3,17 @@
  fetchurl,
  lib,
  makeWrapper,
  writeShellScript,
  common-updater-scripts,
  nix-update,
}:
let
  pname = "volanta";
  version = "1.12.0";
  version = "1.12.4";
  build = "e745115c";
  src = fetchurl {
    url = "https://cdn.volanta.app/software/volanta-app/${version}-0e24f0ee/volanta-${version}.AppImage";
    hash = "sha256-PwBnKR0oFMJtyPxpgDGlSDmcxY9wxhp2Un6mkRJIlfI=";
    url = "https://cdn.volanta.app/software/volanta-app/${version}-${build}/volanta-${version}.AppImage";
    hash = "sha256-BfPfIeCJZLk2Lkr+8QWcDhpDNdPQbFt9cnH31uGSeBU=";
  };
  appImageContents = appimageTools.extract { inherit pname version src; };
in
@@ -26,8 +30,20 @@ appimageTools.wrapType2 {
    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}}"
      --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --wayland-text-input-version=3}}"
  '';

  passthru = {
    inherit src build;
    updateScript = writeShellScript "update-volanta" ''
      LATEST_YML=$(curl --fail --silent https://api.volanta.app/api/v1/ClientUpdate/latest-linux.yml)
      VERSION=$(echo "$LATEST_YML" | grep -E '^version:' | awk '{print $2}')
      BUILD=$(echo "$LATEST_YML" | grep -E 'url: .*/volanta-app/' | sed -E 's/.*volanta-app\/[0-9.]+-([0-9a-f]+)\/.*/\1/' | head -n1)
      ${lib.getExe' common-updater-scripts "update-source-version"} volanta $BUILD --version-key=build || true
      ${lib.getExe nix-update} volanta --version $VERSION
    '';
  };

  meta = {
    description = "Easy-to-use smart flight tracker that integrates all your flight data across all major flightsims";
    homepage = "https://volanta.app/";