{
 "app_id": "org.desktop_plus.desktop-plus",
 "source_url": "https://raw.githubusercontent.com/flathub/org.desktop_plus.desktop-plus/master/org.desktop_plus.desktop-plus.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=fallback-x11",
  "--socket=gpg-agent",
  "--socket=ssh-auth",
  "--socket=wayland",
  "--device=all",
  "--filesystem=xdg-run/keyring",
  "--filesystem=host",
  "--filesystem=/var/lib/flatpak/app:ro",
  "--talk-name=org.freedesktop.Flatpak",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.gtk.vfs.*",
  "--talk-name=org.freedesktop.secrets"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:14:26.669101+00:00",
 "manifest": {
  "app-id": "org.desktop_plus.desktop-plus",
  "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.node24"
  ],
  "command": "start-desktop-plus",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--socket=ssh-auth",
   "--socket=gpg-agent",
   "--share=network",
   "--device=all",
   "--filesystem=host",
   "--filesystem=/var/lib/flatpak/app:ro",
   "--filesystem=xdg-run/keyring",
   "--talk-name=org.freedesktop.Flatpak",
   "--talk-name=org.freedesktop.secrets",
   "--talk-name=org.gtk.vfs.*",
   "--talk-name=com.canonical.AppMenu.Registrar",
   "--env=FLATPAK_HOST=1",
   "--env=ELECTRON_TRASH=gio",
   "--env=ELECTRON_OZONE_PLATFORM_HINT=auto"
  ],
  "modules": [
   {
    "name": "node-gyp",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755  node-gyp /app/bin"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "script",
      "dest-filename": "node-gyp",
      "commands": [
       "node /usr/lib/sdk/node24/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js \"$@\""
      ]
     }
    ]
   },
   {
    "name": "desktop-plus",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/app/bin:/usr/lib/sdk/node24/bin:/run/build/desktop-plus/flatpak-node/chromedriver:/usr/lib/sdk/node24/lib/node_modules/npm/node_modules/node-gyp/bin",
     "env": {
      "npm_config_nodedir": "/usr/lib/sdk/node24",
      "ELECTRON_CACHE": "/run/build/desktop-plus/flatpak-node/electron-cache",
      "ELECTRON_SKIP_BINARY_DOWNLOAD": "1",
      "OFFLINE": "1",
      "CHROMEDRIVER_SKIP_DOWNLOAD": "true",
      "TMPDIR": "/run/build/desktop-plus/flatpak-node/tmp",
      "XDG_CACHE_HOME": "/run/build/desktop-plus/flatpak-node/cache",
      "APP_VERSION": "3.6.6.0"
     }
    },
    "build-commands": [
     "HOME=$PWD node ./vendor/yarn-1.21.1.js config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror",
     "ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp",
     "node ./vendor/yarn-1.21.1.js --offline",
     ". ./obfuscated-creds.sh && . flatpak-node/electron-builder-arch-args.sh && node ./vendor/yarn-1.21.1.js run --offline build:prod $ELECTRON_BUILDER_ARCH_ARGS",
     "cp -r dist/desktop-plus-linux-* /app/desktop-plus",
     "install -Dm755 start-desktop-plus.sh /app/bin/start-desktop-plus"
    ],
    "post-install": [
     "install -D publish/flatpak/org.desktop_plus.desktop-plus.desktop -t  /app/share/applications/",
     "sed -i 's/\\[VERSION\\]/'\"$APP_VERSION\"'/g; s/\\[DATE\\]/'$(date +%Y-%m-%d)'/g' publish/flatpak/org.desktop_plus.desktop-plus.metainfo.xml",
     "install -D publish/flatpak/org.desktop_plus.desktop-plus.metainfo.xml -t  /app/share/metainfo/",
     "install -Dm644 publish/flatpak/logos/32x32.png  /app/share/icons/hicolor/32x32/apps/$FLATPAK_ID.png",
     "install -Dm644 publish/flatpak/logos/64x64.png  /app/share/icons/hicolor/64x64/apps/$FLATPAK_ID.png",
     "install -Dm644 publish/flatpak/logos/128x128.png  /app/share/icons/hicolor/128x128/apps/$FLATPAK_ID.png",
     "install -Dm644 publish/flatpak/logos/256x256.png  /app/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png",
     "install -Dm644 publish/flatpak/logos/512x512.png  /app/share/icons/hicolor/512x512/apps/$FLATPAK_ID.png"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/desktop-plus/desktop-plus.git",
      "tag": "v3.6.6.0",
      "commit": "5ebc69fb11fddc9ede3880f627c246f81b676712"
     },
     {
      "type": "patch",
      "path": "node_options.patch"
     },
     {
      "type": "file",
      "path": "obfuscated-creds.sh"
     },
     "generated-sources.json",
     {
      "type": "script",
      "dest-filename": "start-desktop-plus.sh",
      "commands": [
       "export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID",
       "exec zypak-wrapper /app/desktop-plus/desktop-plus \"$@\""
      ]
     }
    ]
   }
  ]
 }
}