{
 "app_id": "io.kinvolk.Headlamp",
 "source_url": "https://raw.githubusercontent.com/flathub/io.kinvolk.Headlamp/master/io.kinvolk.Headlamp.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--share=network",
  "--socket=wayland",
  "--socket=x11",
  "--device=dri",
  "--filesystem=~/.kube/config",
  "--filesystem=~/.azure",
  "--filesystem=~/.aws",
  "--filesystem=~/.config/gcloud",
  "--filesystem=~/.config/doctl",
  "--filesystem=~/.minikube",
  "--filesystem=~/.config/Headlamp",
  "--filesystem=~/.oci"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-17T16:12:50.688028+00:00",
 "manifest": {
  "app-id": "io.kinvolk.Headlamp",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "command": "run-headlamp.sh",
  "separate-locales": false,
  "rename-desktop-file": "headlamp.desktop",
  "rename-icon": "headlamp",
  "add-extensions": {
   "io.kinvolk.Headlamp.Tools": {
    "directory": "tools",
    "subdirectories": true,
    "no-autodownload": true
   }
  },
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--socket=wayland",
   "--device=dri",
   "--share=network",
   "--filesystem=~/.kube/config",
   "--filesystem=~/.minikube",
   "--filesystem=~/.config/Headlamp",
   "--filesystem=~/.aws",
   "--filesystem=~/.azure",
   "--filesystem=~/.config/doctl",
   "--filesystem=~/.config/gcloud",
   "--filesystem=~/.oci",
   "--env=ELECTRON_OZONE_PLATFORM_HINT=auto"
  ],
  "modules": [
   {
    "name": "headlamp",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "XDG_CACHE_HOME": "/run/build/headlamp/flatpak-node/cache",
      "DEBUG": "electron-builder"
     }
    },
    "sources": [
     "headlamp-source.json",
     {
      "type": "file",
      "path": "./headlamp.desktop"
     },
     {
      "type": "shell",
      "commands": [
       "install -Dm644 headlamp.desktop /app/share/applications/headlamp.desktop"
      ]
     },
     {
      "type": "file",
      "path": "./headlamp.svg"
     },
     {
      "type": "shell",
      "commands": [
       "install -Dm644 headlamp.svg /app/share/icons/hicolor/scalable/apps/headlamp.svg"
      ]
     },
     {
      "type": "file",
      "path": "./io.kinvolk.Headlamp.appdata.xml"
     },
     {
      "type": "shell",
      "commands": [
       "install -Dm644 io.kinvolk.Headlamp.appdata.xml /app/share/appdata/io.kinvolk.Headlamp.appdata.xml"
      ]
     }
    ],
    "build-commands": [
     "rm ./headlamp/chrome-sandbox",
     "install -d /app/headlamp-app/",
     "cp -R ./headlamp/* /app/headlamp-app/"
    ]
   },
   {
    "name": "k8s-tools",
    "buildsystem": "simple",
    "build-options": {
     "env": {
      "TOOLS_TO_WRAP": "aliyunl;aws;az;doctl;gcloud;helm;ibmcloud;k3s;kind;kubectl;kubelogin;minikube;oc;oci;gke-gcloud-auth-plugin"
     }
    },
    "sources": [
     {
      "type": "file",
      "path": "./setup-tool-wrapper.sh"
     }
    ],
    "build-commands": [
     "chmod a+x ./setup-tool-wrapper.sh",
     "mkdir tools && cd tools && ../setup-tool-wrapper.sh $TOOLS_TO_WRAP",
     "for tool in $(ls tools); do install -Dm 755 tools/$tool /app/bin/$tool; done"
    ]
   },
   {
    "name": "start-script",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "script",
      "dest-filename": "run-headlamp.sh",
      "commands": [
       "export PATH=$PATH:/app/tools",
       "export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID",
       "zypak-wrapper /app/headlamp-app/headlamp \"$@\""
      ]
     }
    ],
    "build-commands": [
     "install -Dm 755 run-headlamp.sh /app/bin/run-headlamp.sh"
    ]
   }
  ]
 }
}