app-id: org.tunaos.BlueShell runtime: org.gnome.Platform runtime-version: "50" sdk: org.gnome.Sdk default-branch: master command: ghostty # BlueShell ships its own metainfo and artwork. Renaming Ghostty's metainfo # would leave Ghostty's name, description, and icon in software stores. finish-args: # 3D rendering - --device=dri # use host PTS namespace + container sockets - --device=all # Windowing - --share=ipc - --socket=fallback-x11 - --socket=wayland # Allow user to specify additional config files in home by default - --filesystem=home:ro # So we can escape the sandbox to spawn host shells - --talk-name=org.freedesktop.Flatpak # podman socket (containers picker) - --filesystem=xdg-run/podman # Ghostty registers its GTK application on the session bus under its # upstream app-id. Without owning this name the single-instance guard # fails and the app silently exits. - --own-name=com.mitchellh.ghostty - --talk-name=com.mitchellh.ghostty # Belt-and-suspenders: ensure Ghostty finds shell-integration inside # the sandbox even if -Dflatpak binary-path resolution falls back. - --env=GHOSTTY_RESOURCES_DIR=/app/share/ghostty cleanup: - /include - /lib/girepository-1.0 - /lib/pkgconfig - /share/gir-1.0 - /share/pkgconfig - /share/vala - "*.la" - "*.a" - "*.so" modules: # Inherit Ghostty's heavy dependencies (Zig, Wayland, libadwaita pin, etc). - dependencies.yml # Bundled ptyxis-agent. Lives at /app/libexec/ptyxis-agent so the # resolveAgentPath() fallback finds it without any env var. - name: ptyxis-agent buildsystem: meson config-opts: - --libexecdir=/app/libexec sources: - type: dir path: ../third_party/ptyxis-agent - name: ghostty buildsystem: simple build-options: append-path: /app/zig build-commands: - zig build -Doptimize=ReleaseFast -Dcpu=baseline -Dflatpak=true -Dstrip=false -fno-sys=oniguruma --prefix /app --search-prefix /app --system $PWD/vendor/p # Install our custom desktop file (overrides the upstream one). - install -Dm644 flatpak/org.tunaos.BlueShell.desktop /app/share/applications/org.tunaos.BlueShell.desktop - install -Dm644 flatpak/org.tunaos.BlueShell.metainfo.xml /app/share/metainfo/org.tunaos.BlueShell.metainfo.xml # Install the BlueShell icon (original artwork; Ghostty's icon is # unlicensed to us). Upstream's com.mitchellh.ghostty icons stay # installed but are not exported (flatpak exports only app-id-named # icons). - install -Dm644 flatpak/org.tunaos.BlueShell.svg /app/share/icons/hicolor/scalable/apps/org.tunaos.BlueShell.svg - install -Dm644 flatpak/org.tunaos.BlueShell-64.png /app/share/icons/hicolor/64x64/apps/org.tunaos.BlueShell.png - install -Dm644 flatpak/org.tunaos.BlueShell-128.png /app/share/icons/hicolor/128x128/apps/org.tunaos.BlueShell.png sources: - type: dir path: .. skip: - flatpak/.flatpak-builder - flatpak/builddir - flatpak/repo - zig-cache - zig-out - zig-packages.json