All checks were successful
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.
56 lines
1.8 KiB
JSON
56 lines
1.8 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.2/.schema/devbox.schema.json",
|
|
"packages": {
|
|
"rustc": "latest",
|
|
"cargo": "latest",
|
|
"pkg-config": "latest",
|
|
"rustfmt": "latest",
|
|
"gtk4": {
|
|
"version": "latest",
|
|
"platforms": ["x86_64-linux", "aarch64-linux"],
|
|
"outputs": ["out", "dev"]
|
|
},
|
|
"libadwaita": {
|
|
"version": "latest",
|
|
"platforms": ["x86_64-linux", "aarch64-linux"],
|
|
"outputs": ["out", "dev"]
|
|
},
|
|
"appstream": {
|
|
"version": "latest",
|
|
"platforms": ["x86_64-linux", "aarch64-linux"]
|
|
}
|
|
},
|
|
"env": {
|
|
"PATH": "/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
|
|
},
|
|
"shell": {
|
|
"init_hook": [
|
|
"export PKG_CONFIG_PATH=\"$DEVBOX_PACKAGES_DIR/lib/pkgconfig:$PKG_CONFIG_PATH\"",
|
|
"if [[ \"$(uname)\" == \"Darwin\" ]]; then export PKG_CONFIG_PATH=\"/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH\"; export PKG_CONFIG_PATH_arm64_apple_darwin=\"/opt/homebrew/lib/pkgconfig\"; fi"
|
|
],
|
|
"scripts": {
|
|
"build": [
|
|
"cargo build --release"
|
|
],
|
|
"run": [
|
|
"cargo build --release && ./target/release/carrier"
|
|
],
|
|
"dev": [
|
|
"cargo build && ./target/debug/carrier"
|
|
],
|
|
"test": [
|
|
"cargo test"
|
|
],
|
|
"check": [
|
|
"cargo fmt --check && cargo build && cargo test"
|
|
],
|
|
"package": [
|
|
"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.json",
|
|
"flatpak build-bundle .flatpak-repo carrier-x86_64.flatpak com.randogoth.carrier"
|
|
]
|
|
}
|
|
}
|
|
}
|