{
 "app_id": "com.giadamusic.Giada",
 "source_url": "https://raw.githubusercontent.com/flathub/com.giadamusic.Giada/master/com.giadamusic.Giada.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=pulseaudio",
  "--socket=x11",
  "--device=dri",
  "--filesystem=xdg-run/pipewire-0",
  "--filesystem=home"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:07:24.905166+00:00",
 "manifest": {
  "id": "com.giadamusic.Giada",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "giada",
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--socket=pulseaudio",
   "--device=dri",
   "--filesystem=xdg-run/pipewire-0",
   "--filesystem=home",
   "--env=TMPDIR=/var/tmp"
  ],
  "add-extensions": {
   "org.freedesktop.LinuxAudio.Plugins": {
    "directory": "extensions/Plugins",
    "version": "25.08",
    "add-ld-path": "lib",
    "merge-dirs": "vst3;lv2",
    "subdirectories": true,
    "no-autodownload": true
   }
  },
  "cleanup": [
   "/share/fltk",
   "/share/man",
   "/bin/fltk-config",
   "*.a"
  ],
  "modules": [
   {
    "name": "rtmidi",
    "cleanup": [
     "/include",
     "/lib/pkgconfig",
     "*.la",
     "*.a",
     "*.so"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz",
      "sha256": "48db0ed58c8c0e207b5d7327a0210b5bcaeb50e26387935d02829239b0f3c2b9"
     }
    ]
   },
   {
    "name": "jsoncpp",
    "buildsystem": "cmake-ninja",
    "config-opts": [
     "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
    ],
    "cleanup": [
     "/include",
     "/share"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/nlohmann/json.git",
      "tag": "v3.11.2",
      "commit": "bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d"
     },
     {
      "type": "patch",
      "paths": [
       "patches/jsoncpp-gcc13.patch",
       "patches/jsoncpp-gcc13-2.patch"
      ]
     }
    ]
   },
   "shared-modules/glu/glu-9.json",
   {
    "name": "giada",
    "buildsystem": "cmake-ninja",
    "builddir": true,
    "cleanup": [
     "/include",
     "/bin/JUCE-*",
     "/lib/cmake"
    ],
    "config-opts": [
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
     "-DWITH_VST3=ON"
    ],
    "post-install": [
     "desktop-file-edit --set-icon=${FLATPAK_ID} ${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop",
     "mv /app/bin/giada{,.bin}",
     "install -Dm755 ../giada.sh /app/bin/giada",
     "install -d /app/extensions/Plugins"
    ],
    "sources": [
     {
      "type": "archive",
      "url": "https://github.com/monocasual/giada/releases/download/1.5.0/giada-1.5.0-src.tar.gz",
      "sha256": "12686a2cb8e83f02f0e2321dbc29f730ea589a83c029a1eeb83c63d1c904124d",
      "x-checker-data": {
       "type": "json",
       "url": "https://api.github.com/repos/monocasual/giada/releases/latest",
       "version-query": ".tag_name | sub(\"^jq-\"; \"\")",
       "url-query": "\"https://github.com/monocasual/giada/releases/download/\" + ($version) + \"/giada-\" + ($version) +  \"-src.tar.gz\""
      }
     },
     {
      "type": "patch",
      "paths": [
       "patches/giada-fs.patch",
       "patches/giada-path.patch"
      ]
     },
     {
      "type": "script",
      "dest-filename": "giada.sh",
      "commands": [
       "export LV2_PATH=/app/extensions/Plugins/lv2:/app/lib/lv2:$HOME/.lv2",
       "exec giada.bin \"$@\""
      ]
     }
    ]
   }
  ]
 }
}