app-id: com.github.p13marc.ZenSight runtime: org.freedesktop.Platform runtime-version: "25.08" sdk: org.freedesktop.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable command: zensight finish-args: # Wayland and X11 display access - --socket=wayland - --socket=fallback-x11 - --share=ipc # GPU acceleration for Iced/wgpu - --device=dri # Network access for Zenoh connections - --share=network # Access to config directory - --filesystem=xdg-config/zensight:create build-options: append-path: /usr/lib/sdk/rust-stable/bin env: CARGO_HOME: /run/build/zensight/cargo RUST_BACKTRACE: "1" modules: - name: zensight buildsystem: simple build-options: # Allow network during build to fetch crates build-args: - --share=network build-commands: # The SDK extension gives whatever "stable" this runtime-version ships, # and it has no rustup, so the repo's rust-toolchain.toml (1.98) does not # reach it — this is the one build in the tree whose compiler cannot be # pinned. So assert it instead: a runtime bump that moves rustc backwards # past the workspace's rust-version must fail here, loudly, rather than # in a user's install (#1099). - | set -eu have=$(rustc --version | cut -d' ' -f2) want=$(grep -m1 '^rust-version' Cargo.toml | cut -d'"' -f2) echo "flatpak SDK rustc $have; workspace rust-version $want" lowest=$(printf '%s\n%s\n' "$have" "$want" | sort -V | head -1) if [ "$lowest" != "$want" ] && [ "$have" != "$want" ]; then echo "ERROR: the SDK's rustc $have is older than the workspace's rust-version $want" >&2 exit 1 fi # --locked on BOTH (#1099): this is the artifact end users install, and # it was the only build in the tree not built from Cargo.lock — free to # resolve dependency versions no CI job ever verified. - cargo fetch --locked --manifest-path Cargo.toml - cargo build --release --locked -p zensight - install -Dm755 target/release/zensight ${FLATPAK_DEST}/bin/zensight - install -Dm644 flatpak/com.github.p13marc.ZenSight.desktop ${FLATPAK_DEST}/share/applications/com.github.p13marc.ZenSight.desktop - install -Dm644 flatpak/com.github.p13marc.ZenSight.metainfo.xml ${FLATPAK_DEST}/share/metainfo/com.github.p13marc.ZenSight.metainfo.xml - install -Dm644 flatpak/icons/hicolor/scalable/apps/com.github.p13marc.ZenSight.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/com.github.p13marc.ZenSight.svg - install -Dm644 flatpak/icons/hicolor/symbolic/apps/com.github.p13marc.ZenSight-symbolic.svg ${FLATPAK_DEST}/share/icons/hicolor/symbolic/apps/com.github.p13marc.ZenSight-symbolic.svg sources: - type: dir path: ..