# Manifest for CI builds only. # # The shipped manifest lives in the separate flathub/dev.sramek.clocks repo and # pins the app module to a released git commit. This one builds the *checked-out # working tree* (`type: dir`) so a pull request can be built and tested before it # is merged. # # Keep the finish-args here in step with the Flathub manifest -- they are the # app's actual sandbox requirements, and a permission missing there will not show # up in CI, which is exactly the failure this file exists to catch. app-id: dev.sramek.clocks runtime: org.freedesktop.Platform runtime-version: '25.08' sdk: org.freedesktop.Sdk sdk-extensions: # libcosmic requires rust-version 1.93 and edition 2024, which is newer than # the SDK's bundled toolchain. - org.freedesktop.Sdk.Extension.rust-stable - org.freedesktop.Sdk.Extension.llvm20 command: clocks # Two things deliberately absent, because Flatpak grants them already and # flatpak-builder-lint rejects them as redundant: # # --talk-name=org.freedesktop.portal.* portal interfaces are always allowed # --own-name=dev.sramek.clocks[.*] the app owns its own id and subnames, # the daemon's bus name included # # The last two entries below are the ones Flathub does not grant by default and # that need an exception on submission; each carries its justification. finish-args: - --share=ipc - --socket=wayland - --socket=fallback-x11 # wgpu rendering. - --device=dri # rodio playback for alarms, timers and the rest. - --socket=pulseaudio # notify-rust posts straight to the session bus. - --talk-name=org.freedesktop.Notifications # cosmic-config watches for changes through the settings daemon. - --talk-name=com.system76.CosmicSettingsDaemon # Read-only sight of the host's COSMIC config, which is where the theme lives. # Inside a sandbox cosmic-config deliberately reads the *host* config dir -- # via HOST_XDG_CONFIG_HOME, falling back to $HOME/.config -- and without this # it finds nothing and the app renders with default colours instead of the # desktop's theme. - --filesystem=xdg-config/cosmic:ro # Autostart, when the Background portal is not available to arrange it. # # The preferred route is org.freedesktop.portal.Background, and the app tries # that first. COSMIC does not implement it -- cosmic.portal declares Access, # FileChooser, RemoteDesktop, Screenshot, Settings and ScreenCast, the GTK # backend behind it in the chain has no Background either, and the frontend # only exports an interface some backend backs. So on this app's own target # desktop the portal call fails as an unknown interface, and without this the # daemon cannot be started at login at all: alarms would stop the moment the # window closed, which is the entire reason the daemon exists. # # Scoped to the autostart directory, not xdg-config, and written only when the # user presses "Start automatically". - --filesystem=xdg-config/autostart:create build-options: append-path: /usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/llvm20/bin prepend-ld-library-path: /usr/lib/sdk/llvm20/lib env: CARGO_HOME: /run/build/clocks/cargo modules: - name: clocks buildsystem: simple build-commands: - cargo --offline fetch --manifest-path Cargo.toml --verbose - cargo --offline build --release --verbose - install -Dm0755 target/release/clocks /app/bin/clocks - install -Dm0755 target/release/clocks-daemon /app/bin/clocks-daemon - install -Dm0644 resources/app.desktop /app/share/applications/dev.sramek.clocks.desktop - install -Dm0644 resources/app.metainfo.xml /app/share/metainfo/dev.sramek.clocks.metainfo.xml - install -Dm0644 resources/icons/hicolor/scalable/apps/icon.svg /app/share/icons/hicolor/scalable/apps/dev.sramek.clocks.svg - install -Dm0644 -t /app/share/clocks/audio resources/audio/*.wav # D-Bus activation, so the GUI can start the daemon on demand. Written # here rather than copied from resources/: the host file points at # /usr/bin, and inside the sandbox the binary is at /app/bin. The name # matches `$APP_ID.*.service`, which is what Flatpak exports. - install -d /app/share/dbus-1/services - printf '[D-BUS Service]\nName=dev.sramek.clocks.Daemon\nExec=/app/bin/clocks-daemon\n' > /app/share/dbus-1/services/dev.sramek.clocks.Daemon.service sources: - type: dir path: .. - cargo-sources.json