{
 "app_id": "com.loukai.app",
 "source_url": "https://raw.githubusercontent.com/monteslu/loukai/main/flatpak/com.loukai.app.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "24.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--socket=wayland",
  "--socket=x11",
  "--share=ipc",
  "--device=dri",
  "--socket=pulseaudio",
  "--socket=session-bus",
  "--talk-name=org.freedesktop.Notifications",
  "--share=network",
  "--device=input",
  "--filesystem=home"
 ],
 "module_count": 1,
 "fetched_at": "2026-10-05T15:46:13.124097+00:00",
 "manifest": {
  "app-id": "com.loukai.app",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "24.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "24.08",
  "command": "loukai",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/node22/bin",
   "env": {
    "NPM_CONFIG_CACHE": "/run/build/loukai/flatpak-node/npm-cache",
    "NPM_CONFIG_OFFLINE": "true",
    "XDG_CACHE_HOME": "/run/build/loukai/flatpak-node/cache",
    "ELECTRON_CACHE": "/run/build/loukai/flatpak-node/cache/electron",
    "electron_config_cache": "/run/build/loukai/flatpak-node/cache/electron"
   }
  },
  "finish-args": [
   "--socket=wayland",
   "--socket=x11",
   "--share=ipc",
   "--device=dri",
   "--socket=pulseaudio",
   "--socket=session-bus",
   "--talk-name=org.freedesktop.Notifications",
   "--share=network",
   "--device=input",
   "--filesystem=home"
  ],
  "modules": [
   {
    "name": "loukai",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "npm_config_ignore_scripts": "true"
     }
    },
    "build-commands": [
     "npm ci --offline --no-audit --no-fund --ignore-scripts",
     "node node_modules/electron/install.js",
     "cd node_modules/@kmamal/sdl\nexport SDL_INC=/usr/include/SDL2\nexport SDL_LIB=/usr/lib/$(gcc -dumpmachine)\nnpx -y node-gyp rebuild\nmkdir -p dist\ncp build/Release/sdl.node dist/sdl.node\n# Do NOT ship a vendored libSDL2: we link the runtime's copy.\nrm -f dist/libSDL2-*.so*\nldd dist/sdl.node | grep -q '/usr/lib.*libSDL2' || { echo 'ERROR: not linked against runtime SDL'; exit 1; }\n",
     "npm run build:renderer",
     "npm run build:web",
     "# Any dist/linux-*unpacked carried in from a host checkout would make the\n# staging glob below ambiguous, and the wrong arch could be copied.\nrm -rf dist/linux-unpacked dist/linux-*-unpacked\nzip=\"flatpak-node/cache/electron/electron-v42.4.1-linux-$(node -p 'process.arch').zip\"\ntest -f \"$zip\" || { echo \"ERROR: staged Electron zip not found at $zip\"; ls flatpak-node/cache/electron; exit 1; }\nnpx electron-builder --linux dir \\\n  --config.npmRebuild=false \\\n  --config.electronDist=\"$zip\"\n",
     "mkdir -p /app/loukai",
     "set -e\ndirs=$(ls -d dist/linux-*unpacked 2>/dev/null | wc -l)\ntest \"$dirs\" -eq 1 || { echo \"ERROR: expected exactly one unpacked dir, found $dirs:\"; ls -d dist/linux-*unpacked; exit 1; }\ncp -r dist/linux-*unpacked/. /app/loukai/\n",
     "rm -f /app/loukai/chrome-sandbox",
     "install -Dm755 flatpak/loukai-launcher.sh /app/bin/loukai",
     "install -Dm644 com.loukai.app.desktop /app/share/applications/com.loukai.app.desktop",
     "install -Dm644 com.loukai.app.metainfo.xml /app/share/metainfo/com.loukai.app.metainfo.xml",
     "install -Dm644 static/images/logo-512.png /app/share/icons/hicolor/512x512/apps/com.loukai.app.png"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/monteslu/loukai.git",
      "tag": "v0.11.0"
     },
     "generated-sources.json",
     {
      "type": "archive",
      "url": "https://github.com/monteslu/loukai/releases/download/v0.11.0/webgpu-assets-0.11.0.tar.gz",
      "sha256": 0,
      "dest": "static/webgpu"
     }
    ]
   }
  ]
 }
}