Revert flatpak to building from source; add appstream package
All checks were successful
CI / linux (push) Successful in 2m9s
Release / linux (push) Successful in 2m19s
Release / flatpak (push) Successful in 1m32s
Release / release (push) Successful in 10s
CI / macos (push) Successful in 39s
Release / macos (push) Successful in 34s

Reusing the linux job's binary (previous commit) doesn't work: it's
dynamically linked against ~100 libraries at absolute /nix/store
paths, including its own ELF interpreter, none of which exist inside
the Flatpak sandbox - confirmed locally via a real install+run
(execvp: No such file or directory). Reverted to building from source
inside flatpak-builder's sandbox via the rust-stable SDK extension,
same as the existing local `devbox run package` already does.

Also fixes two things needed for that in-sandbox build to work under
the forgejo-runner service (not an interactive session):
- appstreamcli (used by flatpak-builder to compose AppStream metadata)
  wasn't on PATH - added as a devbox package (linux-only, like
  gtk4/libadwaita) rather than a NixOS system package, keeping it
  scoped to the project.
- rofiles-fuse's mount/unmount cycle fails under the service context
  even though /dev/fuse itself is world-writable; --disable-rofiles-fuse
  is flatpak-builder's own documented workaround for this.

Verified locally: full build, appstreamcli compose, bundle install,
and the installed binary actually executing inside the sandbox.
This commit is contained in:
randogoth 2026-10-07 21:26:53 +03:00
parent cf57009eeb
commit 18befcc008
4 changed files with 78 additions and 59 deletions

View file

@ -14,6 +14,10 @@
"version": "latest",
"platforms": ["x86_64-linux", "aarch64-linux"],
"outputs": ["out", "dev"]
},
"appstream": {
"version": "latest",
"platforms": ["x86_64-linux", "aarch64-linux"]
}
},
"env": {
@ -44,7 +48,7 @@
"flatpak-builder --force-clean --user --install-deps-from=flathub --install .flatpak com.randogoth.carrier.json"
],
"bundle-flatpak": [
"flatpak-builder --force-clean --user --disable-rofiles-fuse --repo=.flatpak-repo --install-deps-from=flathub .flatpak-build com.randogoth.carrier.release.json",
"flatpak-builder --force-clean --user --disable-rofiles-fuse --repo=.flatpak-repo --install-deps-from=flathub .flatpak-build com.randogoth.carrier.json",
"flatpak build-bundle .flatpak-repo carrier-x86_64.flatpak com.randogoth.carrier"
]
}