{
 "app_id": "network.loki.Session",
 "source_url": "https://raw.githubusercontent.com/flathub/network.loki.Session/master/network.loki.Session.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=pulseaudio",
  "--socket=wayland",
  "--device=all",
  "--filesystem=home",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T16:14:01.984791+00:00",
 "manifest": {
  "app-id": "network.loki.Session",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "session",
  "separate-locales": false,
  "rename-desktop-file": "session-desktop.desktop",
  "rename-icon": "session-desktop",
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--socket=pulseaudio",
   "--share=network",
   "--device=all",
   "--filesystem=home",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.kde.StatusNotifierWatcher"
  ],
  "modules": [
   {
    "name": "session-desktop",
    "buildsystem": "simple",
    "build-commands": [
     "ar x session-desktop-linux-amd64-*.deb",
     "rm -f session-desktop-linux-amd64-*.deb",
     "tar xf data.tar.xz",
     "rm -f control.tar.gz data.tar.xz debian-binary",
     "cp -r usr/* opt/* $FLATPAK_DEST",
     "rm -rf $FLATPAK_DEST/share/icons/hicolor/*",
     "rm -rf usr opt",
     "install -Dm644 session_icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/session-desktop.svg",
     "for size in 64 128 256 512; do rsvg-convert -u -w $size -h $size -f png -o $size.png $FLATPAK_DEST/share/icons/hicolor/scalable/apps/session-desktop.svg; install -Dm644 $size.png $FLATPAK_DEST/share/icons/hicolor/${size}x${size}/apps/session-desktop.png; done",
     "chmod -R a-s,go+rX,go-w $FLATPAK_DEST/Session",
     "install session.sh $FLATPAK_DEST/bin/session",
     "install -Dm644 network.loki.Session.metainfo.xml $FLATPAK_DEST/share/metainfo/network.loki.Session.metainfo.xml",
     "desktop-file-edit --set-key=Exec --set-value='session %U' $FLATPAK_DEST/share/applications/session-desktop.desktop"
    ],
    "sources": [
     {
      "type": "file",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://github.com/session-foundation/session-desktop/releases/download/v1.18.1/session-desktop-linux-amd64-1.18.1.deb",
      "sha256": "03e11d9ac383897e626ddfc0ad3917604327257bd972735599b8ea3909c984a6",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/session-foundation/session-desktop/releases/latest",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "url-query": ".assets[] | select(.name==\"session-desktop-linux-amd64-\" + $version + \".deb\") | .browser_download_url",
       "is-main-source": true
      }
     },
     {
      "type": "script",
      "dest-filename": "session.sh",
      "commands": [
       "export TMPDIR=\"$XDG_RUNTIME_DIR/app/$FLATPAK_ID\"",
       "exec zypak-wrapper /app/Session/session-desktop \"$@\""
      ]
     },
     {
      "type": "file",
      "path": "network.loki.Session.metainfo.xml"
     },
     {
      "sha256": "294707383453f21ac884cd2b236a5044ee7b90b5a9ab86a0de47fe791f8bc76a",
      "type": "file",
      "url": "https://raw.githubusercontent.com/oxen-io/session-desktop/99f7f17e73373d8fcdfcea14673570cd0febd4a9/images/session/session_icon.svg"
     }
    ]
   }
  ]
 }
}