{
 "app_id": "chat.rocket.RocketChat",
 "source_url": "https://raw.githubusercontent.com/flathub/chat.rocket.RocketChat/master/chat.rocket.RocketChat.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--socket=x11",
  "--device=all",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications",
  "--talk-name=org.gnome.Mutter.IdleMonitor",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.ayatana.indicator.application",
  "--talk-name=com.canonical.indicator.application"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T16:06:47.361796+00:00",
 "manifest": {
  "app-id": "chat.rocket.RocketChat",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "rocketchat-desktop",
  "separate-locales": false,
  "rename-desktop-file": "rocketchat-desktop.desktop",
  "rename-icon": "rocketchat-desktop",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--socket=wayland",
   "--socket=pulseaudio",
   "--share=network",
   "--device=all",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.gnome.Mutter.IdleMonitor",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--talk-name=com.canonical.indicator.application",
   "--talk-name=org.ayatana.indicator.application"
  ],
  "modules": [
   {
    "name": "rocketchat-desktop",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "file",
      "path": "chat.rocket.RocketChat.appdata.xml"
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export TMPDIR=\"$XDG_RUNTIME_DIR/app/$FLATPAK_ID\"",
       "exec zypak-wrapper /app/Rocket.Chat/rocketchat-desktop --ozone-platform-hint=auto \"$@\""
      ]
     },
     {
      "type": "file",
      "dest-filename": "rocketchat.deb",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/RocketChat/Rocket.Chat.Electron/releases/download/4.17.1/rocketchat-4.17.1-linux-amd64.deb",
      "sha256": "fb52e95b352657f663d22cc1e10a4d072b38d2eeffc74d0dc97d5b3c598ae965",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/RocketChat/Rocket.Chat.Electron/releases/latest",
       "version-query": ".tag_name",
       "url-query": ".assets[] | select(.name | match(\"(linux-amd64.deb)\")) | .browser_download_url"
      }
     }
    ],
    "build-commands": [
     "bsdtar -Oxf rocketchat.deb 'data.tar.xz' | bsdtar -xf - -C \"${FLATPAK_DEST}\" --strip-components=2 ./opt ./usr\n",
     "rm -r \"${FLATPAK_DEST}/share/icons/hicolor/1024x1024\"",
     "install -Dm0755 run.sh \"${FLATPAK_DEST}/bin/rocketchat-desktop\"",
     "chmod -R a-s,go+rX,go-w ${FLATPAK_DEST}/Rocket.Chat",
     "desktop-file-edit --remove-key=entry --set-key=Exec --set-value='rocketchat-desktop %U' \"${FLATPAK_DEST}/share/applications/rocketchat-desktop.desktop\"",
     "install -Dm0644 \"chat.rocket.RocketChat.appdata.xml\" \"${FLATPAK_DEST}/share/appdata/chat.rocket.RocketChat.appdata.xml\""
    ]
   }
  ]
 }
}