# SPDX-License-Identifier: MPL-2.0 app-id: io.github.sethcottle.Hangar runtime: org.gnome.Platform runtime-version: '50' sdk: org.gnome.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable # No ffmpeg extension is declared here, and that is deliberate: on this runtime # there is nothing for an app manifest to declare, and the extension people # reach for first does not exist. # # org.freedesktop.Platform.ffmpeg-full stops at 24.08. `flatpak remote-info # flathub org.freedesktop.Platform.ffmpeg-full//25.08` answers "Can't find ref", # and the newest branch Flathub carries is 24.08, so naming it here would name # nothing. freedesktop-sdk 25.08 replaced it with codecs-extra, and # org.gnome.Platform//50 is built on 25.08 and declares that extension # point itself: # # [Extension org.freedesktop.Platform.codecs-extra] # directory = lib/x86_64-linux-gnu/codecs-extra # version = 25.08-extra # add-ld-path = lib # autodelete = true # # It carries no no-autodownload, so flatpak installs it alongside the runtime: # resolving `flatpak install org.gnome.Platform//50` for an architecture with # nothing installed lists org.freedesktop.Platform.codecs-extra 25.08-extra in # the transaction. The runtime also already has it on the plugin path, so # GST_PLUGIN_SYSTEM_PATH needs no extending either. The runtime sets it to # /app/lib/gstreamer-1.0:/usr/lib/extensions/gstreamer-1.0:/usr/lib/$arch/codecs-extra/lib/gstreamer-1.0:/usr/lib/$arch/gstreamer-1.0 # # That extension is what gives Bluesky's H.264 + AAC HLS somewhere to decode. # The base runtime does ship gst-libav, but its ffmpeg is built # --disable-decoder='h264,hevc,vc1,vvc'; codecs-extra ships a full one, and its # own add-ld-path puts it ahead in the sandbox's ld cache, so libgstlibav.so # resolves libavcodec.so.61 to the codecs-extra copy. Measured inside a # freedesktop 25.08 sandbox: avdec_h264 and avdec_aac are both present, forcing # the base libavcodec back in makes both disappear, and gst-discoverer-1.0 walks # a real H.264-High/AAC HLS master playlist end to end. command: hangar finish-args: - --share=ipc - --socket=fallback-x11 - --socket=wayland # Without an audio socket autoaudiosink cannot link, and playbin3 fails the # whole pipeline rather than playing silently. - --socket=pulseaudio - --share=network - --device=dri - --talk-name=org.freedesktop.secrets build-options: append-path: /usr/lib/sdk/rust-stable/bin env: CARGO_HOME: /run/build/hangar/cargo RUST_BACKTRACE: '1' modules: - name: hangar buildsystem: simple build-commands: # Fail here, with a name, rather than a hundred lines into a build script # that cannot find gstreamer-gl-1.0. # # One invocation per module, because --atleast-version only applies to the # first name on the line: measured on pkgconf 2.5.1, a module that does not # exist at all still exits 0 from the second position onwards. And # --print-errors is no help either, printing nothing when the failure is a # version mismatch, so each check says out loud what it wanted. - 'pkg-config --atleast-version=1.18 gstreamer-1.0 || { echo "hangar: gstreamer-1.0 >= 1.18 is required" >&2; exit 1; }' - 'pkg-config --atleast-version=1.18 gstreamer-base-1.0 || { echo "hangar: gstreamer-base-1.0 >= 1.18 is required" >&2; exit 1; }' - 'pkg-config --atleast-version=1.18 gstreamer-video-1.0 || { echo "hangar: gstreamer-video-1.0 >= 1.18 is required" >&2; exit 1; }' - 'pkg-config --atleast-version=1.18 gstreamer-gl-1.0 || { echo "hangar: gstreamer-gl-1.0 >= 1.18 is required" >&2; exit 1; }' - 'pkg-config --exists gstreamer-gl-egl-1.0 || { echo "hangar: gstreamer-gl-egl-1.0 is required" >&2; exit 1; }' - 'pkg-config --exists gstreamer-gl-wayland-1.0 || { echo "hangar: gstreamer-gl-wayland-1.0 is required" >&2; exit 1; }' - 'pkg-config --exists gstreamer-gl-x11-1.0 || { echo "hangar: gstreamer-gl-x11-1.0 is required" >&2; exit 1; }' - cargo --offline fetch --manifest-path Cargo.toml --verbose - cargo --offline build --release --verbose - install -Dm755 target/release/hangar /app/bin/hangar - install -Dm644 assets/icons/io.github.sethcottle.Hangar.svg /app/share/icons/hicolor/scalable/apps/io.github.sethcottle.Hangar.svg # Raster sizes for desktops whose SVG renderer cannot draw the # scalable icon's filters (KDE turns them into black plates). - install -Dm644 assets/icons/png/16/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/16x16/apps/io.github.sethcottle.Hangar.png - install -Dm644 assets/icons/png/32/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/32x32/apps/io.github.sethcottle.Hangar.png - install -Dm644 assets/icons/png/48/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/48x48/apps/io.github.sethcottle.Hangar.png - install -Dm644 assets/icons/png/64/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/64x64/apps/io.github.sethcottle.Hangar.png - install -Dm644 assets/icons/png/128/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/128x128/apps/io.github.sethcottle.Hangar.png - install -Dm644 assets/icons/png/256/io.github.sethcottle.Hangar.png /app/share/icons/hicolor/256x256/apps/io.github.sethcottle.Hangar.png - install -Dm644 data/io.github.sethcottle.Hangar.desktop /app/share/applications/io.github.sethcottle.Hangar.desktop - install -Dm644 data/io.github.sethcottle.Hangar.metainfo.xml /app/share/metainfo/io.github.sethcottle.Hangar.metainfo.xml # Window geometry lives in GSettings, and gio::Settings finds nothing # without the installed schema, silently, because the lookup is # guarded rather than asserted. flatpak-builder compiles the schema # directory at finish time, but this compiles it here too: a missing # binary fails the build, where a missed finish step would only lose # geometry again. The schema id does not change between channels, so # nightly installs the same file. - install -Dm644 data/io.github.sethcottle.Hangar.gschema.xml /app/share/glib-2.0/schemas/io.github.sethcottle.Hangar.gschema.xml - glib-compile-schemas /app/share/glib-2.0/schemas sources: - type: dir path: . - cargo-sources.json