{
 "app_id": "net.hovancik.Stretchly",
 "source_url": "https://raw.githubusercontent.com/flathub/net.hovancik.Stretchly/master/net.hovancik.Stretchly.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=dri",
  "--talk-name=org.kde.StatusNotifierWatcher",
  "--talk-name=org.freedesktop.Notifications"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:13:31.256716+00:00",
 "manifest": {
  "app-id": "net.hovancik.Stretchly",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "24.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "command": "run.sh",
  "separate-locales": false,
  "finish-args": [
   "--device=dri",
   "--env=GIO_EXTRA_MODULES=/app/lib/gio/modules/",
   "--share=ipc",
   "--socket=pulseaudio",
   "--socket=x11",
   "--share=network",
   "--talk-name=org.freedesktop.Notifications",
   "--talk-name=org.kde.StatusNotifierWatcher"
  ],
  "modules": [
   "shared-modules/dbus-glib/dbus-glib.json",
   {
    "name": "stretchly",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/node22/bin",
     "env": {
      "XDG_CACHE_HOME": "/run/build/stretchly/flatpak-node/cache",
      "NPM_CONFIG_LOGLEVEL": "info",
      "npm_config_cache": "/run/build/stretchly/flatpak-node/npm-cache",
      "npm_config_offline": "true",
      "npm_config_nodedir": "/usr/lib/sdk/node22"
     }
    },
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/hovancik/stretchly.git",
      "tag": "v1.19.0",
      "commit": "edd21c4d7ae11eec430695304d69fd7d4de234cf",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/hovancik/stretchly/releases/latest",
       "tag-query": ".tag_name",
       "version-query": ".tag_name | sub(\"^v\"; \"\")",
       "timestamp-query": ".published_at"
      }
     },
     "generated-sources.json",
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export TMPDIR=$XDG_CACHE_HOME",
       "export ZYPAK_SPAWN_LATEST_ON_REEXEC=0",
       "export CHROME_WRAPPER=/app/bin/run.sh",
       "FLAGS=\"$FLAGS --enable-features=UseOzonePlatform\"\nif [ -n \"${WAYLAND_DISPLAY+set}\" ] && [ -e \"$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY\" ]; then\n  echo \"Wayland detected. Enabling Wayland support.\"\n  FLAGS=\"$FLAGS --ozone-platform=wayland\"\nelse\n  echo \"Wayland not detected. Enabling X11 support.\"\n  FLAGS=\"$FLAGS --ozone-platform=x11\"\nfi\necho \"Stretchly flags: $FLAGS\"\nzypak-wrapper /app/main/stretchly $FLAGS \"$@\"\n"
      ]
     }
    ],
    "build-commands": [
     "ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp\nnpm install --offline\n",
     "ln -s $XDG_CACHE_HOME/node-gyp $HOME/.electron-gyp\n. flatpak-node/electron-builder-arch-args.sh\nnpm run pack -- $ELECTRON_BUILDER_ARCH_ARGS --linux\n",
     "cp -a dist/linux*unpacked /app/main",
     "install -Dm 755 -t /app/bin/ run.sh",
     "install -Dm 644 net.hovancik.Stretchly.desktop /app/share/applications/$FLATPAK_ID.desktop",
     "sed -i 's/Icon=net.hovancik.Stretchly/Icon=net.hovancik.Stretchly/' /app/share/applications/$FLATPAK_ID.desktop",
     "install -Dm 644 net.hovancik.Stretchly.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml",
     "sed -i 's/net.hovancik.Stretchly/net.hovancik.Stretchly/' /app/share/metainfo/$FLATPAK_ID.metainfo.xml",
     "install -Dm644 app/images/stretchly.svg /app/share/icons/hicolor/scalable/apps/$FLATPAK_ID.svg"
    ]
   }
  ]
 }
}