{
 "app_id": "ch.threema.threema-web-desktop",
 "source_url": "https://raw.githubusercontent.com/flathub/ch.threema.threema-web-desktop/master/ch.threema.threema-web-desktop.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--filesystem=xdg-download"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T16:06:42.467290+00:00",
 "manifest": {
  "app-id": "ch.threema.threema-web-desktop",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "command": "run.sh",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--share=network",
   "--filesystem=xdg-download"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/node22/bin",
   "env": {
    "NPM_CONFIG_LOGLEVEL": "info",
    "DEV_ENV": "development",
    "THREEMA_WEB_VERSION": "threema-web-2.6.2"
   },
   "arch": {
    "x86_64": {
     "env": {
      "ARCH_OUTNAME": "x64",
      "ARCH_ELECTRON": "amd64"
     }
    },
    "aarch64": {
     "env": {
      "ARCH_OUTNAME": "arm64",
      "ARCH_ELECTRON": "arm64"
     }
    }
   }
  },
  "modules": [
   {
    "name": "threema-web-desktop",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "XDG_CACHE_HOME": "/run/build/threema-web-desktop/flatpak-node/cache",
      "npm_config_cache": "/run/build/threema-web-desktop/flatpak-node/npm-cache",
      "npm_config_nodedir": "/usr/lib/sdk/node22",
      "npm_config_offline": "true"
     }
    },
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/threema-ch/threema-web-electron.git",
      "commit": "6fc9e3d7065e3f5b977c8668e6dfb524ee2c1450"
     },
     {
      "type": "patch",
      "path": "0001-note-unofficial-flatpak.patch"
     },
     {
      "type": "patch",
      "path": "0002-add-debian-aarch64-build.patch"
     },
     "generated-sources.json",
     {
      "type": "patch",
      "path": "0003-Metainfo.xml-Fix-release-info.patch"
     },
     {
      "type": "patch",
      "path": "0004-Disable-full-Electron-packaging.patch"
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "zypak-wrapper.sh /app/main/threema-web --ozone-platform-hint=auto \"$@\""
      ]
     },
     {
      "type": "file",
      "path": "ch.threema.threema-web-desktop.desktop"
     }
    ],
    "build-commands": [
     "npm install --offline",
     "./tools/patches/patch-threema-web.sh",
     "npm run app:build:web",
     "./tools/patches/post-patch-threema-web.sh",
     "npm run app:install",
     "node tools/patches/post-patch-threema-web.js linux-deb consumer",
     "npm run electron:dist:linux:deb:consumer",
     "cp -a app/build/dist-electron/packaged/Threema-linux-${ARCH_OUTNAME} /app/main",
     "install -Dm755 -t /app/bin/ run.sh",
     "install -Dm644 ch.threema.threema-web-desktop.metainfo.xml /app/share/metainfo/ch.threema.threema-web-desktop.metainfo.xml",
     "install -Dm644 ch.threema.threema-web-desktop.desktop /app/share/applications/ch.threema.threema-web-desktop.desktop",
     "install -Dm644 app/assets/icons/png/consumer-128x128.png /app/share/icons/hicolor/128x128/apps/ch.threema.threema-web-desktop.png",
     "install -Dm644 app/assets/icons/png/consumer-512x512.png /app/share/icons/hicolor/512x512/apps/ch.threema.threema-web-desktop.png"
    ]
   }
  ]
 }
}