# Tipsy Flatpak manifest, built by packaging/flatpak/build-flatpak.sh, which # rewrites `tag: main` to the release tag and @VERSION@ to the version. # Runtime: the current stable KDE runtime (Qt 6.10 on freedesktop 25.08, whose # golang SDK extension provides the go toolchain). Bump runtime-version when # Flathub retires this branch (`flatpak remote-ls flathub | grep org.kde.Sdk`). app-id: io.github.tipsy_linux.Tipsy runtime: org.kde.Platform runtime-version: '6.10' sdk: org.kde.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.golang command: tipsy-gui finish-args: - --share=ipc - --share=network - --socket=x11 - --socket=pulseaudio - --device=dri # Gamepad evdev nodes (/dev/input/event*): Tipsy opens pads # O_RDONLY|O_NONBLOCK for reads (O_RDWR only for Phase 4 rumble), never # grabs them. --device=input is Flatpak 1.15.6+; Ubuntu 24.04 and the # GitHub ubuntu-24.04 publish runner ship 1.14.6, which rejects the # token at build-finish ("Unknown device type input") and ignores it # at runtime. --device=all is the 1.14-safe grant that includes # /dev/input (and dri). Existing installs can grant it without # reinstalling: # flatpak override --user --device=all io.github.tipsy_linux.Tipsy # See packaging/gamepad-input.md. - --device=all - --filesystem=xdg-data/tipsy:create - --filesystem=xdg-config/tipsy:create # Desktop launcher ownership (Settings > Desktop integration, `tipsy desktop`): # see whether a user-level entry from an AppImage shadows this Flatpak's # exported launcher, and remove it on request. Read-only mimeapps.list shows # which install handles roblox:// links. The Flatpak never writes handlers. - --filesystem=xdg-data/applications:create - --filesystem=xdg-config/mimeapps.list:ro - --talk-name=org.freedesktop.Notifications # No --socket=wayland: Tipsy is X11-first by design. # WebKitGTK 4.1 is in the GNOME runtime, not org.kde.Sdk. build-flatpak.sh # stages matching Freedesktop 25.08 libraries into webkit-prefix (libexec # paths rewritten /usr → /app). - --env=WEBKIT_EXEC_PATH=/app/libexec/webkit2gtk-4.1 modules: # KDE 6.10 has gtk+-3.0 but not webkit2gtk-4.1. Install the GNOME 49 # (same Freedesktop 25.08) WebKitGTK into /app before compiling Tipsy. - name: webkit2gtk-4.1 buildsystem: simple build-commands: - mkdir -p /app/lib /app/libexec /app/include /app/lib/pkgconfig - cp -a lib/. /app/lib/ - cp -a libexec/. /app/libexec/ - cp -a include/. /app/include/ - cp -a pkgconfig/. /app/lib/pkgconfig/ sources: - type: dir path: webkit-prefix - name: tipsy buildsystem: simple build-options: append-path: /usr/lib/sdk/golang/bin # Each build-command runs in its own shell, so the toolchain settings # live here rather than in an `export` line. env: CGO_ENABLED: '1' GOAMD64: v3 GOFLAGS: -buildvcs=false -mod=readonly -modcacherw -trimpath GOTOOLCHAIN: local GOCACHE: /run/build/tipsy/.gocache GOMODCACHE: /run/build/tipsy/.gomodcache GOPATH: /run/build/tipsy/.gopath PKG_CONFIG_PATH: /app/lib/pkgconfig build-args: # go.mod dependencies (miqt, x/sys) are fetched from the module proxy # at build time; this is a self-hosted repository, not Flathub. - --share=network sources: - type: git url: https://github.com/32bitx64bit/Tipsy.git tag: main build-commands: - mkdir -p /app/bin - go build -ldflags "-buildid= -s -w -X github.com/tipsy-linux/tipsy/internal/version.Version=@VERSION@ -X github.com/tipsy-linux/tipsy/internal/version.Channel=stable" -o /app/bin/tipsy ./cmd/tipsy - go build -ldflags "-buildid= -s -w -X github.com/tipsy-linux/tipsy/internal/version.Version=@VERSION@ -X github.com/tipsy-linux/tipsy/internal/version.Channel=stable" -o /app/bin/tipsy-gui ./cmd/tipsy-gui # Flatpak only exports icons and desktop files named after the app id, so # the app-id file must exist under its exported name. tipsy.png is # installed alongside it because the GUI resolves its brand icon from # ../share/icons/hicolor/512x512/apps/tipsy.png inside the sandbox # (cmd/tipsy-gui/theme.go); without it the window falls back to a theme icon. - install -Dm0644 tipsy.png /app/share/icons/hicolor/512x512/apps/io.github.tipsy_linux.Tipsy.png - install -Dm0644 tipsy.png /app/share/icons/hicolor/512x512/apps/tipsy.png - install -Dm0644 share/applications/io.github.tipsy_linux.Tipsy.Play.desktop /app/share/applications/io.github.tipsy_linux.Tipsy.Play.desktop - install -Dm0644 share/applications/io.github.tipsy_linux.Tipsy.Settings.desktop /app/share/applications/io.github.tipsy_linux.Tipsy.Settings.desktop - sed -i 's/^Icon=tipsy$/Icon=io.github.tipsy_linux.Tipsy/' /app/share/applications/io.github.tipsy_linux.Tipsy.*.desktop - install -Dm0644 share/metainfo/io.github.tipsy_linux.Tipsy.metainfo.xml /app/share/metainfo/io.github.tipsy_linux.Tipsy.metainfo.xml - install -Dm0644 LICENSE /app/share/licenses/tipsy/LICENSE - install -Dm0644 NOTICE /app/share/licenses/tipsy/NOTICE # Release identity read by internal/app/official.go. build-flatpak.sh # fills @RELEASE_KIND@: development-unrestricted by default, and # release-repository-signed only for --mode official (GitHub Actions). - mkdir -p /app/share/tipsy - printf '%s\n' '{"architecture":"x86_64","format":"tipsy.build-info.v1","medium":"flatpak","name":"Tipsy","releaseKind":"@RELEASE_KIND@","source":{"commit":"'"$(git rev-parse HEAD 2>/dev/null || echo unknown)"'","tree":"clean"},"version":"@VERSION@"}' > /app/share/tipsy/build-info.json