flatpak: add Flathub packaging (manifest, metainfo, desktop, README)

From-source Flatpak build for com.veganostr.Vega on GNOME 50 runtime.
Screenshots and the manifest git-pin are finalized before the Flathub PR.
Vendored cargo/node sources are generated (gitignored; live in the flathub repo).
This commit is contained in:
Jure
2026-07-15 13:57:12 +02:00
parent 662155224c
commit f9fda75cac
5 changed files with 251 additions and 0 deletions
+4
View File
@@ -51,3 +51,7 @@ skills-lock.json
# TypeScript incremental build info
*.tsbuildinfo
# Flatpak vendored sources (generated; belong in the flathub repo)
flatpak/cargo-sources.json
flatpak/node-sources.json
+68
View File
@@ -0,0 +1,68 @@
# Flathub packaging for Vega
This directory holds the Flatpak packaging for `com.veganostr.Vega`, built **entirely
from source** (Flathub forbids bundling prebuilt binaries — do **not** use Tauri's
official Flatpak guide, which repackages a `.deb`).
## Files
| File | Purpose | Lives in |
|---|---|---|
| `com.veganostr.Vega.yaml` | Flatpak manifest | Flathub PR repo (copy here for reference) |
| `com.veganostr.Vega.metainfo.xml` | AppStream metadata (store page) | this repo, installed from source |
| `com.veganostr.Vega.desktop` | Desktop entry | this repo, installed from source |
| `cargo-sources.json` | Vendored Rust crates (offline build) | generated → Flathub PR repo |
| `node-sources.json` | Vendored npm packages (offline build) | generated → Flathub PR repo |
## Regenerating the vendored sources (after any dependency bump)
```bash
# Rust
pip install toml aiohttp
python flatpak-cargo-generator.py -d src-tauri/Cargo.lock -o flatpak/cargo-sources.json
# npm (lockfile v3)
pipx install git+https://github.com/flatpak/flatpak-builder-tools.git#subdirectory=node
flatpak-node-generator npm -o flatpak/node-sources.json package-lock.json
```
The generated sources **must** match the `Cargo.lock` / `package-lock.json` at the git
tag the manifest pins.
## Validate locally
```bash
appstreamcli validate flatpak/com.veganostr.Vega.metainfo.xml
desktop-file-validate flatpak/com.veganostr.Vega.desktop
```
## Test build (needs ~several GB of SDK)
```bash
flatpak install flathub org.gnome.Platform//50 org.gnome.Sdk//50 \
org.freedesktop.Sdk.Extension.rust-stable org.freedesktop.Sdk.Extension.node20
flatpak install flathub org.flatpak.Builder
git clone https://github.com/flathub/shared-modules.git # for libappindicator
flatpak run org.flatpak.Builder --force-clean --user --install \
build-dir flatpak/com.veganostr.Vega.yaml
flatpak run com.veganostr.Vega
```
## Submitting to Flathub
1. Fork `github.com/flathub/flathub`, branch off **`new-pr`** (NOT `master`).
2. Add `com.veganostr.Vega.yaml`, `cargo-sources.json`, `node-sources.json`, and the
`shared-modules` submodule at the repo top level.
3. Open a PR against `new-pr`; a reviewer comments `bot, build` to test-build.
## Open items before submission
- **Screenshots**: `metainfo.xml` references three PNGs under
`flatpak/screenshots/`. Add real screenshots there and pin the manifest's git
source to a tag/commit that contains them (metainfo screenshot URLs should use a
tag/commit ref, not a branch).
- **`ffmpeg-full` `version:`** must match GNOME 50's freedesktop base — verify at
first `bot, build`.
- **Keyring in the sandbox**: the `keyring` crate uses the Secret Service over D-Bus
(`--talk-name=org.freedesktop.secrets`). Verify nsec survives a sandboxed restart;
if not, the `oo7` crate's file backend is the known fallback.
+12
View File
@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=Vega
GenericName=Nostr Client
Comment=Read, write and zap on the Nostr network
Exec=vega
Icon=com.veganostr.Vega
Terminal=false
Categories=Network;Chat;
Keywords=Nostr;Bitcoin;Lightning;Zap;Social;Decentralized;Microblog;Long-form;
StartupWMClass=Vega
StartupNotify=true
+81
View File
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.veganostr.Vega</id>
<name>Vega</name>
<summary>Read, write and zap on Nostr</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<developer id="com.veganostr">
<name>Jure Sršen</name>
</developer>
<launchable type="desktop-id">com.veganostr.Vega.desktop</launchable>
<description>
<p>
Vega is a desktop client for Nostr, a decentralized social network where you
own your identity, your content and your social graph. No company can delete
your account or censor your posts.
</p>
<p>
Long-form writing and reading is a first-class feature, not an afterthought.
Alongside the social feed, Vega gives you a proper markdown article editor and
reader for publishing and following long-form content.
</p>
<p>Features:</p>
<ul>
<li>Long-form articles (NIP-23) with a markdown editor and reader</li>
<li>Lightning zaps over Nostr Wallet Connect</li>
<li>Value-for-value podcast streaming</li>
<li>Web-of-trust filtering to keep the feed trustworthy</li>
<li>An optional built-in relay, so your notes stay available locally</li>
<li>Encrypted direct messages</li>
<li>Private keys stored in your system keyring</li>
</ul>
</description>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">intense</content_attribute>
<content_attribute id="money-purchasing">mild</content_attribute>
</content_rating>
<url type="homepage">https://veganostr.com</url>
<url type="bugtracker">https://github.com/hoornet/vega/issues</url>
<url type="vcs-browser">https://github.com/hoornet/vega</url>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/hoornet/vega/main/flatpak/screenshots/feed.png</image>
<caption>The main feed with notes, reactions and zaps</caption>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/hoornet/vega/main/flatpak/screenshots/article.png</image>
<caption>Reading a long-form article</caption>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/hoornet/vega/main/flatpak/screenshots/editor.png</image>
<caption>Writing an article in the markdown editor</caption>
</screenshot>
</screenshots>
<branding>
<color type="primary" scheme_preference="light">#c9b6ff</color>
<color type="primary" scheme_preference="dark">#2a2140</color>
</branding>
<releases>
<release version="0.14.1" date="2026-07-15">
<description>
<p>Fixes a crash in the Support view and adds an optional network proxy (HTTP/SOCKS5), including Tor.</p>
</description>
</release>
<release version="0.14.0" date="2026-07-14">
<description>
<p>Internal maintenance release aligning the application identifier with the project domain.</p>
</description>
</release>
</releases>
</component>
+86
View File
@@ -0,0 +1,86 @@
id: com.veganostr.Vega
runtime: org.gnome.Platform
runtime-version: "50"
sdk: org.gnome.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.rust-stable
- org.freedesktop.Sdk.Extension.node20
command: vega
finish-args:
- --socket=wayland # show the window (Wayland)
- --socket=fallback-x11 # show the window (X11 fallback)
- --share=ipc # required alongside X11
- --device=dri # GPU / OpenGL for WebKit
- --socket=pulseaudio # audio: podcasts & media
- --share=network # Nostr relays over WebSocket (runtime only)
- --talk-name=org.freedesktop.Notifications # mentions/zaps notifications
- --talk-name=org.freedesktop.secrets # keyring crate → Secret Service (nsec storage)
- --talk-name=org.kde.StatusNotifierWatcher # system tray
# GStreamer codecs for AAC/MP3/H.264 podcast & media playback. The base runtime
# only ships open/royalty-free codecs.
add-extensions:
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
add-ld-path: .
version: "24.08"
autodelete: false
build-options:
append-path: /usr/lib/sdk/node20/bin:/usr/lib/sdk/rust-stable/bin
env:
# Speed up and pin the offline caches inside the build dir.
CARGO_HOME: /run/build/vega/cargo
modules:
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
- name: vega
buildsystem: simple
sources:
- type: git
url: https://github.com/hoornet/vega.git
tag: v0.14.1
commit: e0a7c2e1a4368e22b6ca6982d02857ed65d8ef51
# flatpak-node-generator npm -o node-sources.json package-lock.json
- node-sources.json
# flatpak-cargo-generator.py -d ./src-tauri/Cargo.lock -o cargo-sources.json
- cargo-sources.json
build-options:
env:
XDG_CACHE_HOME: /run/build/vega/flatpak-node/cache
npm_config_cache: /run/build/vega/flatpak-node/npm-cache
npm_config_offline: "true"
build-commands:
# Install vendored npm packages (offline)
- npm ci --offline
# Pre-fetch vendored crates (offline)
- cargo --offline fetch --manifest-path src-tauri/Cargo.toml
# Build frontend (vite) + the Rust binary, without producing an installer bundle
- npm run --offline tauri build -- --no-bundle
# Binary
- install -Dm755 -t /app/bin/ src-tauri/target/release/vega
# Desktop entry + AppStream metainfo
- install -Dm644 -t /app/share/applications/ flatpak/com.veganostr.Vega.desktop
- install -Dm644 -t /app/share/metainfo/ flatpak/com.veganostr.Vega.metainfo.xml
# Icons (hicolor)
- install -Dm644 src-tauri/icons/32x32.png /app/share/icons/hicolor/32x32/apps/com.veganostr.Vega.png
- install -Dm644 src-tauri/icons/128x128.png /app/share/icons/hicolor/128x128/apps/com.veganostr.Vega.png
- install -Dm644 src-tauri/icons/128x128@2x.png /app/share/icons/hicolor/256x256/apps/com.veganostr.Vega.png
- install -Dm644 src-tauri/icons/icon.png /app/share/icons/hicolor/512x512/apps/com.veganostr.Vega.png
# Create the ffmpeg extension mount point
- mkdir -p /app/lib/ffmpeg
post-install:
- install -Dm644 LICENSE /app/share/licenses/com.veganostr.Vega/LICENSE