feat(packaging): add Flatpak manifest (#40) - #197
amanmprojects wants to merge 4 commits into
Conversation
Adds a flatpak-builder manifest under flatpak/, building the same artifacts as the source AUR recipe (PKGBUILD-source.template) but rooted at /app: - dev.limux.linux.yml — app-id matches the existing desktop/metainfo files. Builds libghostty (Zig), then the Rust workspace offline against vendored crates, and installs the CLI (/app/bin/limux), GTK host (/app/libexec/limux/limux-host), libghostty-internal.so (/app/lib/limux), and Ghostty resources/terminfo (/app/share/limux). RUSTFLAGS overrides the .cargo/config.toml rpath with /app/lib/limux; finish-args cover Wayland/X11, the DRI device for Ghostty's GL rendering, network, and the XDG portals WebKitGTK's helpers use. - cargo-sources.json — offline sources for all 147 crates.io deps, generated from Cargo.lock (no git deps; checksums verified against the lockfile). - README.md — build steps, install layout, finish-args rationale, and the two open items before Flathub submission (offline vendoring of Ghostty's own Zig build deps, and an end-to-end build/GUI test on a machine with a display). Refs am-will#40 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
I reviewed this draft at head
The documented Zig dependency vendoring and an actual Flatpak build plus GUI smoke test are still needed. I would keep this in draft until those checks pass. |
…lision Building through flatpak-builder revealed that the repo's `ghostty` submodule and the pinned `ghostty` git source both target the same directory, so the build died with a `.git` cp collision. Set `disable-submodules: true` on the limux source and let the pinned source own that directory. Also record what the build run validated (source resolution, cargo vendoring, Zig 0.16 in the ziglang//24.08 extension) and what still needs finishing. Refs am-will#40 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Building end to end surfaced that the GTK4 Rust crates (gdk4 0.11, cairo-rs/gdk-pixbuf 0.22) require rustc >= 1.92, but the GNOME 48 (freedesktop 24.08) rust-stable extension only ships rustc 1.89, so the Rust build fails there. Bump runtime-version to 49 (freedesktop 25.08; rust-stable 1.98, ziglang still 0.16.0). Verified: the manifest now builds end to end via org.flatpak.Builder on GNOME 49 and `flatpak run dev.limux.linux` maps a GTK window titled "Limux v0.1.30". README updated with the verification status and the remaining Flathub open item (offline vendoring of Ghostty's Zig deps; the verifying build used --share=network for the zig step). Refs am-will#40 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
org.freedesktop.portal.Documents/Flatpak are granted to sandboxed apps by default, so requesting them explicitly is a flatpak-builder-lint error (finish-args-portal-talk-name). Drop both; keep Notifications. Refresh README open items now that build+launch is verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Taking this out of draft — it now builds end to end and launches. Verified (GNOME 49 / freedesktop 25.08):
flatpak-builder-lint is clean except two entries that are genuinely your call, not defects:
Two things I did not want to decide for you, left as open items in the README:
So: fully working as a locally-built Flatpak today; the remaining gap to a Flathub submission is the Zig vendoring + metainfo, both of which touch decisions I'd rather leave to you. |
bvolpato
left a comment
There was a problem hiding this comment.
Requesting changes because the Flatpak still misses two core Limux behaviors. --filesystem=host shares project files, but the terminal shell still runs inside the Flatpak runtime without host tools such as git and cargo on PATH (I verified this under GNOME 49). The control socket also stays in Flatpak's private $XDG_RUNTIME_DIR, so a host limux-cli cannot reach the app. Please add and exercise a host shell path and a host-visible control socket before merging. The three pane action SVGs noted in my earlier comment are also still absent. The submodule collision and GNOME runtime issues are fixed; the documented offline Zig and metainfo work still remains before Flathub.
Refs #40.
Adds a
flatpak/directory with a flatpak-builder manifest that builds the same artifacts asPKGBUILD-source.template, rooted at/app.What's here
flatpak/dev.limux.linux.yml— app-iddev.limux.linux, matching the existingdev.limux.linux.desktop/dev.limux.linux.metainfo.xml. Runtimeorg.gnome.Platform//48(GTK4 / libadwaita / WebKitGTK / Mesa), with therust-stableandziglangSDK extensions. It builds libghostty with the exact Zig args from the AUR recipe, builds the Rust workspace--offline --locked, and installs the CLI (/app/bin/limux), the GTK host (/app/libexec/limux/limux-host),libghostty-internal.so(/app/lib/limux), and Ghostty resources + terminfo (/app/share/limux).flatpak/cargo-sources.json— offline sources for all 147 crates.io dependencies, generated fromCargo.lock. The workspace has no git deps, so it's fully offline; checksums come straight from the lockfile.flatpak/README.md— build steps, install-layout table, and finish-args rationale.Design notes
limux-host-linuxalready resolves Ghostty resources relative to its own executable (set_ghostty_runtime_env_for_exe), so the/apptree is discovered at runtime with no hardcoded/usrpaths.RUSTFLAGSoverrides the/usr/local/lib/limuxrpath from.cargo/config.tomlwith/app/lib/limux, keeping--export-dynamicfor the Ghostty FFI symbol lookup.--device=drifor Ghostty's OpenGL rendering,--share=networkfor terminals and the built-in browser, portal--talk-names for WebKitGTK's sandboxed helpers, and--filesystem=host(a terminal running arbitrary shell commands can't be confined to a subtree).Draft — two open items before Flathub
Filed as a draft because two things still need doing, both documented in the README:
zig buildstep in theghosttysubmodule still fetches its Zig packages, which Flathub's network-less builds disallow. Until vendored, build locally with a network-enabled build.cargo-sources.jsonchecksums verified againstCargo.lock), but it hasn't been run throughflatpak-builderor launched as a GUI yet — I don't have a display-capable environment here.Happy to iterate on the runtime version, finish-args scope, or the Zig-vendoring approach.
🤖 Generated with Claude Code