# Flatpak manifest, built from source and offline, as Flathub requires: npm # dependencies come from generated-sources.json (packaging/flatpak/update-sources.sh). # The source here is this repository; packaging/flatpak/prepare-flathub.sh swaps it # for the release's Git tag in the Flathub repository. # # flatpak run --no-documents-portal org.flatpak.Builder --user --install-deps-from=flathub \ # --force-clean --repo=release/flatpak-repo release/flatpak-build packaging/flatpak/io.github.chapdel.whathush.yml app-id: io.github.chapdel.whathush runtime: org.freedesktop.Platform runtime-version: '26.08' sdk: org.freedesktop.Sdk base: org.electronjs.Electron2.BaseApp base-version: '26.08' sdk-extensions: - org.freedesktop.Sdk.Extension.node22 command: whathush separate-locales: false finish-args: - --share=ipc - --share=network - --socket=wayland - --socket=fallback-x11 - --socket=pulseaudio - --device=dri # Camera for video calls: Electron cannot use the camera portal yet. - --device=all - --talk-name=org.freedesktop.Notifications # Tray icon (StatusNotifierItem). - --talk-name=org.kde.StatusNotifierWatcher # Lock together with the desktop session: screensaver signals, listen only. - --talk-name=org.freedesktop.ScreenSaver - --talk-name=org.gnome.ScreenSaver # Encrypted proxy credentials: system keyring through Electron safeStorage. - --talk-name=org.freedesktop.secrets - --talk-name=org.kde.kwalletd6 - --talk-name=org.kde.kwalletd5 - --filesystem=xdg-download # Native Wayland with IME input. - --env=ELECTRON_OZONE_PLATFORM_HINT=auto build-options: append-path: /usr/lib/sdk/node22/bin modules: - name: whathush buildsystem: simple build-options: env: XDG_CACHE_HOME: /run/build/whathush/flatpak-node/cache npm_config_cache: /run/build/whathush/flatpak-node/npm-cache npm_config_offline: 'true' build-commands: - npm ci --offline - npm run build # Electron comes from the offline cache filled by generated-sources.json. - | . flatpak-node/electron-builder-arch-args.sh npx electron-builder $ELECTRON_BUILDER_ARCH_ARGS --linux --dir --publish never \ -c.electronDist=flatpak-node/cache/electron - cp -a release/linux*unpacked /app/whathush - install -Dm755 whathush.sh /app/bin/whathush - install -Dm644 packaging/linux/io.github.chapdel.whathush.desktop /app/share/applications/io.github.chapdel.whathush.desktop - install -Dm644 packaging/linux/io.github.chapdel.whathush.metainfo.xml /app/share/metainfo/io.github.chapdel.whathush.metainfo.xml - | for size in 128 256 512; do install -Dm644 build/icons/${size}x${size}.png /app/share/icons/hicolor/${size}x${size}/apps/io.github.chapdel.whathush.png done sources: # Local source (replaced for Flathub): this repository, minus build outputs. - type: dir path: ../.. skip: - node_modules - dist - release - test-results - playwright-report - lab/node_modules - lab/dist - .flatpak-builder - generated-sources.json - type: script dest-filename: whathush.sh commands: # zypak: Chromium's sandbox inside the Flatpak sandbox. - exec zypak-wrapper /app/whathush/whathush "$@"