From 81705370cb5975c0425431b613526db7bec0960a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 19 May 2025 12:38:49 +0100 Subject: [PATCH] station: 1.52.2 -> 3.3.0 Co-authored-by: Marcin Serwin --- pkgs/by-name/st/station/package.nix | 55 ++++++++++++++++------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/st/station/package.nix b/pkgs/by-name/st/station/package.nix index 7e9391b6866f..c80a0ad5a3b4 100644 --- a/pkgs/by-name/st/station/package.nix +++ b/pkgs/by-name/st/station/package.nix @@ -1,43 +1,50 @@ { + lib, appimageTools, fetchurl, - lib, + makeWrapper, + nix-update-script, }: - let + version = "3.3.0"; pname = "station"; - version = "1.52.2"; - src = fetchurl { - url = "https://github.com/getstation/desktop-app-releases/releases/download/${version}/Station-${version}-x86_64.AppImage"; - sha256 = "0lhiwvnf94is9klvzrqv2wri53gj8nms9lg2678bs4y58pvjxwid"; + url = "https://github.com/getstation/desktop-app/releases/download/v${version}/Station-x86_64.AppImage"; + hash = "sha256-OiUVRKpU2W1dJ6z9Dqvxd+W4/oNpG+Zolj43ZHpKaO0="; }; - appimageContents = appimageTools.extractType2 { inherit pname version src; }; in -appimageTools.wrapType2 rec { +appimageTools.wrapType2 { inherit pname version src; - - profile = '' - export LC_ALL=C.UTF-8 - ''; - extraInstallCommands = '' - install -m 444 -D ${appimageContents}/browserx.desktop $out/share/applications/browserx.desktop - install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/browserx.png \ - $out/share/icons/hicolor/512x512/apps/browserx.png - substituteInPlace $out/share/applications/browserx.desktop \ - --replace 'Exec=AppRun' 'Exec=${pname}' + source "${makeWrapper}/nix-support/setup-hook" + wrapProgram $out/bin/${pname} \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + install -m 444 -D ${appimageContents}/station-desktop-app.desktop \ + $out/share/applications/station-desktop-app.desktop + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/station-desktop-app.png \ + $out/share/icons/hicolor/512x512/apps/station-desktop-app.png + substituteInPlace $out/share/applications/station-desktop-app.desktop \ + --replace-fail 'Exec=AppRun' 'Exec=station' ''; - meta = with lib; { - description = "Single place for all of your web applications"; - homepage = "https://getstation.com"; - license = licenses.mit; - platforms = [ "x86_64-linux" ]; - maintainers = [ ]; + passthru = { + updateScript = nix-update-script { + extraArgs = [ "--url=https://github.com/getstation/desktop-app" ]; + }; + }; + + meta = { + changelog = "https://github.com/getstation/desktop-app/releases/tag/v${version}"; + description = "A single place for all of your web applications"; + downloadPage = "https://github.com/getstation/desktop-app/releases"; + homepage = "https://getstation.com/"; + license = lib.licenses.asl20; mainProgram = "station"; + maintainers = with lib.maintainers; [ flexiondotorg ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; }; }