{
 "app_id": "io.github.unknownskl.greenlight",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.unknownskl.greenlight/master/io.github.unknownskl.greenlight.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=all",
  "--filesystem=/run/udev:ro",
  "--allow=bluetooth"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-19T12:50:59.368896+00:00",
 "manifest": {
  "app-id": "io.github.unknownskl.greenlight",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.node22"
  ],
  "command": "run.sh",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--socket=pulseaudio",
   "--share=network",
   "--allow=bluetooth",
   "--device=all",
   "--filesystem=/run/udev:ro"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/node22/bin",
   "env": {
    "NPM_CONFIG_LOGLEVEL": "info"
   }
  },
  "modules": [
   {
    "name": "greenlight",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "XDG_CACHE_HOME": "/run/build/greenlight/flatpak-node/cache",
      "npm_config_cache": "/run/build/greenlight/flatpak-node/npm-cache",
      "npm_config_offline": "true",
      "yarn_config_cache": "/run/build/greenlight/flatpak-node/yarn-mirror"
     }
    },
    "build-commands": [
     "cp -a ../extralib/extralib -t /app/",
     "gunzip /app/extralib/libLLVM-16.0.6.so.gz",
     "cp -a ../extralib/reduceSoFiles.sh -t /app/extralib",
     "pushd /app/extralib && ln -s libLLVM-16.0.6.so libLLVM-16.so && chmod +x reduceSoFiles.sh && ./reduceSoFiles.sh && popd",
     "yarn --offline",
     "yarn run desktop flatpak-build --offline -- --linux",
     "install -Dm 644 packages/desktop/flatpak/io.github.unknownskl.greenlight.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png",
     "install -Dm 644 packages/desktop/flatpak/io.github.unknownskl.greenlight.desktop ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "install -Dm 644 packages/desktop/flatpak/io.github.unknownskl.greenlight.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.appdata.xml",
     "cp -a packages/desktop/dist/linux*unpacked /app/main",
     "install -Dm755 -t /app/bin/ ../run.sh"
    ],
    "subdir": "main",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/unknownskl/greenlight",
      "tag": "v2.4.2",
      "commit": "312f4958d78eb5914394c3536d6f2fae31e9130c",
      "dest": "main"
     },
     {
      "type": "git",
      "url": "https://github.com/Originalimoc/amd-patched-mesa",
      "dest": "extralib",
      "commit": "a70058baf35f1823613f2577c30a477e93cd106a"
     },
     "yarn-sources.json",
     {
      "type": "inline",
      "dest-filename": ".yarnrc",
      "contents": "yarn-offline-mirror \"/run/build/greenlight/flatpak-node/yarn-mirror\"\nyarn-offline-mirror-pruning true\n"
     },
     {
      "type": "script",
      "dest-filename": "run.sh",
      "commands": [
       "export LIBGL_DRIVERS_PATH=/app/extralib/dri:/usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver:/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/:${LIBGL_DRIVERS_PATH}",
       "export LIBVA_DRIVERS_PATH=/app/extralib/dri:/usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver:/usr/lib/x86_64-linux-gnu/GL/default/lib/dri/:${LIBVA_DRIVERS_PATH}",
       "export VK_ICD_FILENAMES=/app/extralib/icd.d/intel_icd.x86_64.json:/app/extralib/icd.d/radeon_icd.x86_64.json:/app/extralib/icd.d/virtio_icd.x86_64.json:/app/extralib/icd.d/intel_hasvk_icd.x86_64.json:/app/extralib/icd.d/lvp_icd.x86_64.json:${VK_ICD_FILENAMES}",
       "export LD_LIBRARY_PATH=/app/extralib:${LD_LIBRARY_PATH}",
       "echo runtime LD_LIBRARY_PATH = $LD_LIBRARY_PATH",
       "echo runtime ARCH = $(uname -m)-$(uname -s | tr '[:upper:]' '[:lower:]')",
       "zypak-wrapper.sh /app/main/greenlight-desktop \"$@\""
      ]
     }
    ]
   }
  ]
 }
}