app-id: io.github.ronb1964.TalkType runtime: org.gnome.Platform runtime-version: '50' sdk: org.gnome.Sdk command: talktype-launcher finish-args: - --socket=wayland # x11, NOT fallback-x11: the recording indicator positions itself with # gtk_window_move(), which only XWayland honours, and the service runs with # GDK_BACKEND=x11,wayland to use it. fallback-x11 hands out the X socket ONLY # when there's no Wayland, so on a Wayland session (GNOME/KDE) the indicator # got native Wayland instead — uncentered, unmovable, and mis-rendering styles. # Plain x11 always exposes XWayland, matching the AppImage/.deb/.rpm. - --socket=x11 - --share=ipc - --socket=pulseaudio - --device=dri - --share=network - --talk-name=org.freedesktop.portal.Desktop # Tray icon (StatusNotifier/AppIndicator), its menu, and notifications. The # sandbox D-Bus proxy blocks these host services unless named, so without them # the AppIndicator never registers and the tray icon is silently invisible. - --talk-name=org.kde.StatusNotifierWatcher - --talk-name=com.canonical.AppMenu.Registrar - --talk-name=org.freedesktop.Notifications - --filesystem=xdg-run/tray-icon:create # Query GNOME Shell (org.gnome.Shell.Extensions.GetExtensionInfo) to detect # whether the TalkType extension is enabled. Inside the sandbox the # gnome-extensions CLI and org.gnome.shell gsettings schema are both absent, so # this D-Bus call is the only way to know — without it the GTK tray shows # alongside the extension's indicator (a duplicate tray icon on GNOME). - --talk-name=org.gnome.Shell modules: # PortAudio — sounddevice dlopens libportaudio.so.2 at import; not in the runtime. - name: portaudio buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - -DPA_BUILD_SHARED=ON - -DPA_BUILD_STATIC=OFF # PortAudio 19.7's CMakeLists predates CMake 4.x's minimum-policy floor; # the GNOME 50 SDK ships CMake 4.x, which refuses cmake_minimum_required < 3.5. - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 sources: - type: git url: https://github.com/PortAudio/portaudio.git tag: v19.7.0 # Tray icon library: libayatana-appindicator (flathub shared-modules) — provides # the AyatanaAppIndicator3 typelib the runtime lacks (also builds # libdbusmenu/ayatana-ido/libayatana-indicator/intltool). This is exactly what # tray.py requires unguarded, matching the AppImage/.deb/.rpm dependency. - shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json # Python ML/audio stack for the runtime's Python 3.13 (mechanism proven in the # GPU spike). Self-hosted build: network pip is acceptable here; pin to a # requirements lock later for reproducibility. - name: python-deps buildsystem: simple build-options: build-args: - --share=network build-commands: # dbus-python provides the `dbus` module used by dbus_service.py (tray <-> # service <-> GNOME extension). It is a system package on host installs but # must be bundled here (builds against the SDK's libdbus + glib). - pip3 install --prefix=/app --no-warn-script-location faster-whisper sounddevice evdev pyperclip toml dbus-python # The app itself: source + launcher + AppStream metadata + icon + desktop file. - name: talktype buildsystem: simple build-commands: - install -Dm755 talktype-launcher /app/bin/talktype-launcher - mkdir -p /app/lib && cp -r talktype /app/lib/talktype - install -Dm644 io.github.ronb1964.TalkType.appdata.xml /app/share/metainfo/io.github.ronb1964.TalkType.appdata.xml # App icon. The welcome splash searches for this exact path and falls back # to plain "TalkType" text (no blue logo) if it's absent — which is what # happened before this was added. It is also the icon GNOME/KDE show in the # app grid and dock. Scalable SVG covers every size; the runtime ships # librsvg so GdkPixbuf can render it. This is a square-canvas copy of # icons/OFFICIAL_ICON_DO_NOT_CHANGE.svg — Flatpak rejects non-square icons # on export ("Expected a square icon"), and the original is 782x769. - install -Dm644 io.github.ronb1964.TalkType.svg /app/share/icons/hicolor/scalable/apps/io.github.ronb1964.TalkType.svg # Desktop entry so the app appears in the launcher with its name and icon. # Exec is normalized to the in-sandbox launcher (the repo copy carries the # AppImage's "AppRun tray"); Flatpak rewrites the exported copy to # "flatpak run" regardless, but keep the in-sandbox file honest. - install -Dm644 io.github.ronb1964.TalkType.desktop /app/share/applications/io.github.ronb1964.TalkType.desktop - sed -i 's|^Exec=.*|Exec=talktype-launcher|' /app/share/applications/io.github.ronb1964.TalkType.desktop sources: - type: dir path: ../../src dest: . - type: file path: ../../io.github.ronb1964.TalkType.appdata.xml - type: file path: talktype-launcher - type: file path: io.github.ronb1964.TalkType.svg - type: file path: ../../io.github.ronb1964.TalkType.desktop