{
 "app_id": "io.github.shiiion.primehack",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.shiiion.primehack/master/io.github.shiiion.primehack.yml",
 "runtime": "org.kde.Platform",
 "runtime_version": "6.10",
 "sdk": "org.kde.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=pulseaudio",
  "--device=all",
  "--filesystem=xdg-run/app/com.discordapp.Discord:create",
  "--filesystem=xdg-config/kdeglobals:ro",
  "--filesystem=host:ro",
  "--filesystem=xdg-run/gamescope-0:ro",
  "--allow=bluetooth",
  "--talk-name=com.canonical.AppMenu.Registrar",
  "--talk-name=org.kde.kconfig.notify",
  "--talk-name=org.kde.KGlobalSettings",
  "--talk-name=org.freedesktop.ScreenSaver"
 ],
 "module_count": 3,
 "fetched_at": "2026-09-19T12:49:03.860433+00:00",
 "manifest": {
  "app-id": "io.github.shiiion.primehack",
  "runtime": "org.kde.Platform",
  "runtime-version": "6.10",
  "sdk": "org.kde.Sdk",
  "command": "primehack-wrapper",
  "rename-desktop-file": "primehack.desktop",
  "rename-icon": "dolphin-emu",
  "rename-appdata-file": "primehack.appdata.xml",
  "finish-args": [
   "--device=all",
   "--filesystem=host:ro",
   "--socket=pulseaudio",
   "--env=QT_QPA_PLATFORM=xcb",
   "--socket=x11",
   "--share=network",
   "--share=ipc",
   "--allow=bluetooth",
   "--filesystem=xdg-run/app/com.discordapp.Discord:create",
   "--talk-name=org.freedesktop.ScreenSaver",
   "--filesystem=xdg-run/gamescope-0:ro"
  ],
  "cleanup": [
   "/include",
   "/lib/pkgconfig",
   "/share/man",
   "*.la"
  ],
  "modules": [
   {
    "name": "libevdev",
    "buildsystem": "meson",
    "config-opts": [
     "-Dtests=disabled",
     "-Ddocumentation=disabled"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://www.freedesktop.org/software/libevdev/libevdev-1.13.6.tar.xz",
      "sha256": "73f215eccbd8233f414737ac06bca2687e67c44b97d2d7576091aa9718551110",
      "x-checker-data": {
       "type": "anitya",
       "project-id": 20540,
       "stable-only": true,
       "url-template": "https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz"
      }
     }
    ]
   },
   {
    "name": "xdg-screensaver-shim",
    "buildsystem": "meson",
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz",
      "sha256": "0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399"
     }
    ]
   },
   {
    "name": "dolphin-emu",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=Release",
     "-DENABLE_ALSA=OFF",
     "-DENABLE_SDL=ON",
     "-DENABLE_EVDEV=ON",
     "-DUSE_SYSTEM_LIBUSB=ON",
     "-DDISTRIBUTOR=Flathub",
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "post-install": [
     "install -D primehack-wrapper /app/bin/primehack-wrapper",
     "install -Dm644 appdata.xml /app/share/appdata/primehack.appdata.xml",
     "rm /app/share/icons/hicolor/scalable/apps/dolphin-emu.svg",
     "mv /app/share/applications/dolphin-emu.desktop /app/share/applications/primehack.desktop",
     "desktop-file-edit --set-key=Exec --set-value='primehack-wrapper' /app/share/applications/primehack.desktop",
     "desktop-file-edit --set-key=Name --set-value='PrimeHack' /app/share/applications/primehack.desktop"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/shiiion/dolphin.git",
      "commit": "53f53e0f5bad27ad62a807cb93b136d84f68777f"
     },
     {
      "type": "file",
      "path": "appdata.xml"
     },
     {
      "type": "script",
      "commands": [
       "for i in {0..9}; do",
       "test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;",
       "done",
       "dolphin-emu \"$@\""
      ],
      "dest-filename": "primehack-wrapper"
     }
    ]
   }
  ]
 }
}