{
 "app_id": "chat.delta.desktop",
 "source_url": "https://raw.githubusercontent.com/flathub/chat.delta.desktop/master/chat.delta.desktop.yml",
 "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=xdg-documents",
  "--filesystem=xdg-download",
  "--filesystem=xdg-music",
  "--filesystem=xdg-videos",
  "--filesystem=xdg-pictures",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.freedesktop.Notifications",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=com.canonical.Unity",
  "--system-talk-name=org.freedesktop.login1"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-20T06:29:58.031348+00:00",
 "manifest": {
  "app-id": "chat.delta.desktop",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22",
   "org.freedesktop.Sdk.Extension.rust-stable"
  ],
  "command": "run.sh",
  "finish-args": [
   "--socket=fallback-x11",
   "--socket=wayland",
   "--share=ipc",
   "--device=all",
   "--socket=pulseaudio",
   "--filesystem=xdg-documents",
   "--filesystem=xdg-download",
   "--filesystem=xdg-music",
   "--filesystem=xdg-pictures",
   "--filesystem=xdg-videos",
   "--share=network",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--talk-name=org.kde.StatusNotifierWatcher",
   "--talk-name=com.canonical.Unity",
   "--system-talk-name=org.freedesktop.login1",
   "--env=NOTIFY_IGNORE_PORTAL=1"
  ],
  "cleanup": [
   "/app/dc-core",
   "/delta/resources/app/node_modules/napi-macros",
   "/delta/resources/app/node_modules/react-*",
   "/delta/resources/app/node_modules/classnames",
   "/delta/resources/app/node_modules/use-debounce",
   "/delta/resources/app/node_modules/create-react-context",
   "/delta/resources/app/node_modules/resize-observer-polyfill",
   "/delta/resources/app/node_modules/moment"
  ],
  "modules": [
   {
    "name": "deltachat-core-rust",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "npm_config_cache": "/run/build/deltachat-core-rust/flatpak-node/npm-cache/",
      "CARGO_HOME": "/run/build/deltachat-core-rust/cargo",
      "RUSTFLAGS": "-g",
      "RUSTC_WRAPPER": "/app/bin/sccache",
      "SCCACHE_DIR": "/run/ccache/sccache/"
     },
     "append-path": "/usr/lib/sdk/rust-stable/bin:/usr/lib/sdk/node22/bin"
    },
    "build-commands": [
     "ls /run/build",
     "ls",
     "pwd",
     "node --version",
     "python3 --version",
     "npm cache verify",
     "cd deltachat-jsonrpc/typescript && env DEBUG=\"*\" npm install --offline --verbose && npm run build",
     "python3 deltachat-rpc-server/npm-package/scripts/make_local_dev_version.py",
     "mkdir -p /app/dc-core",
     "sed -i 's|/run/build/deltachat-core-rust|/app/dc-core/deltachat-rpc-server|g' deltachat-rpc-server/npm-package/package.json",
     "cp -r deltachat-jsonrpc /app/dc-core/deltachat-jsonrpc",
     "cp -r deltachat-rpc-server /app/dc-core/deltachat-rpc-server"
    ],
    "modules": [
     {
      "name": "sccache",
      "buildsystem": "simple",
      "build-commands": [
       "install -Dma+rwx sccache /app/bin/sccache"
      ],
      "cleanup": [
       "/bin/sccache"
      ],
      "sources": [
       {
        "type": "archive",
        "url": "https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz",
        "sha256": "e5d03a9aa3b9fac7e490391bbe22d4f42c840d31ef9eaf127a03101930cbb7ca",
        "only-arches": [
         "x86_64"
        ]
       },
       {
        "type": "archive",
        "url": "https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-aarch64-unknown-linux-musl.tar.gz",
        "sha256": "90d91d21a767e3f558196dbd52395f6475c08de5c4951a4c8049575fa6894489",
        "only-arches": [
         "aarch64"
        ]
       }
      ]
     }
    ],
    "sources": [
     "generated/core-git.json",
     "generated/sources-rust.json",
     "generated/sources-jsonrpc-client-npm.json",
     {
      "type": "file",
      "path": "generated/deltachat-jsonrpc.typescript.package-lock.json",
      "dest": "deltachat-jsonrpc/typescript/",
      "dest-filename": "package-lock.json"
     }
    ]
   },
   {
    "name": "delta",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node22/bin:/run/build/delta/pnpm/bin",
     "env": {
      "NPM_CONFIG_LOGLEVEL": "info",
      "PNPM_CONFIG_TRUST_LOCKFILE": "true",
      "XDG_CACHE_HOME": "/run/build/delta/flatpak-node/cache",
      "TMPDIR": "/run/build/delta/flatpak-node/tmp",
      "VERSION_INFO_GIT_REF": "flathub",
      "NO_ASAR": "true",
      "ELECTRON_CONFIG_CACHE": "/run/build/delta/flatpak-node/cache/electron",
      "electron_config_cache": "/run/build/delta/flatpak-node/cache/electron",
      "ELECTRON_CACHE": "/run/build/delta/flatpak-node/cache/electron"
     }
    },
    "build-commands": [
     "mv ../pnpm/bin/pnpm.cjs ../pnpm/bin/pnpm",
     "chmod +x ../pnpm/bin/pnpm",
     "mkdir -p $TMPDIR",
     "node --version",
     "pnpm --version",
     "python3 --version",
     "(cd .. && python3 flatpak-node/populate_pnpm_store.py flatpak-node/pnpm-manifest.json flatpak-node/pnpm-tarballs flatpak-node/pnpm-store)",
     "(cd .. && bash flatpak-node/setup_sdk_node_headers.sh)",
     "echo \"storeDir: /run/build/delta/flatpak-node/pnpm-store\" >> pnpm-workspace.yaml",
     "ln -s /app/dc-core ../deltachat-core-rust",
     "tar xzf ../linked-core-overrides.tar.gz --no-same-owner",
     "pnpm install --offline --frozen-lockfile",
     "mkdir -p /app/delta",
     "pnpm --filter @deltachat-desktop/target-electron build4production",
     "pnpm --filter @deltachat-desktop/target-electron pack:generate_config",
     "pnpm --filter @deltachat-desktop/target-electron pack:patch-node-modules",
     "pnpm --filter @deltachat-desktop/target-electron exec electron-builder --config ./electron-builder.json5 --linux --dir -c.electronDist=/run/build/delta/flatpak-node/cache/electron",
     "cp -ar packages/target-electron/dist/linux*unpacked/* /app/delta/",
     "set -e\nNM=/app/delta/resources/app/node_modules\nSRC=$(ls -d \"$NM/@deltachat/stdio-rpc-server/platform_package/\"*)\nDEST=\"$NM/@deltachat/stdio-rpc-server-linux-$(node -e 'process.stdout.write(process.arch)')\"\ncp -a \"$SRC\" \"$DEST\"\n",
     "install ../run.sh $FLATPAK_DEST/bin/run.sh",
     "install -Dm 0644 ../chat.delta.desktop.desktop  /app/share/applications/chat.delta.desktop.desktop",
     "install -Dm 0644 ../mime/deltachat-desktop.xml  /app/share/mime/packages/chat.delta.desktop.xml",
     "install -Dm 0644 ../chat.delta.desktop.appdata.xml  /app/share/metainfo/chat.delta.desktop.appdata.xml",
     "install -Dm 0644 ../delta-v7-pathed.svg /app/share/icons/hicolor/scalable/apps/chat.delta.desktop.svg"
    ],
    "subdir": "main",
    "sources": [
     "generated/desktop-git.json",
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/deltachat/interface/970c5df39866695b5e8ebdd73caa68cbb6de5242/icons/delta-v7-pathed.svg",
      "sha256": "1787a9dfdd80301ae5dbe48105bd58215c6552bd8ecfa4efd15fe6d31ba31274",
      "dest-filename": "delta-v7-pathed.svg"
     },
     {
      "type": "file",
      "path": "chat.delta.desktop.desktop"
     },
     {
      "type": "file",
      "path": "chat.delta.desktop.256.png",
      "dest-filename": "chat.delta.desktop.png"
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export TMPDIR=\"$XDG_RUNTIME_DIR/app/$FLATPAK_ID\"",
       "exec zypak-wrapper /app/delta/deltachat-desktop \"$@\""
      ]
     },
     "generated/pnpm-sources.json",
     "generated/pnpm.json",
     {
      "type": "file",
      "path": "generated/linked-core-overrides.tar.gz"
     },
     {
      "type": "file",
      "path": "chat.delta.desktop.appdata.xml"
     },
     {
      "type": "file",
      "path": "mime/deltachat-desktop.xml",
      "dest": "mime"
     }
    ]
   }
  ]
 }
}