{
 "app_id": "org.stochas.Stochas",
 "source_url": "https://raw.githubusercontent.com/flathub/org.stochas.Stochas/master/org.stochas.Stochas.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "26.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=pulseaudio",
  "--socket=x11",
  "--filesystem=xdg-run/pipewire-0",
  "--filesystem=~/AudioVitamins:create"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:16:37.312940+00:00",
 "manifest": {
  "id": "org.stochas.Stochas",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "26.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "Stochas",
  "finish-args": [
   "--socket=x11",
   "--share=ipc",
   "--socket=pulseaudio",
   "--filesystem=xdg-run/pipewire-0",
   "--filesystem=~/AudioVitamins:create",
   "--persist=.config"
  ],
  "build-options": {
   "env": {
    "PLUGINS_DIR": "/app/extensions/Plugins/Stochas",
    "PLUGINS_ID": "org.freedesktop.LinuxAudio.Plugins.Stochas"
   }
  },
  "add-extensions": {
   "org.freedesktop.LinuxAudio.Plugins.Stochas": {
    "directory": "extensions/Plugins/Stochas",
    "version": "26.08",
    "add-ld-path": "lib",
    "bundle": true,
    "subdirectories": true,
    "no-autodownload": true,
    "autodelete": false
   }
  },
  "modules": [
   "shared-modules/appstream/appstream-compose.json",
   {
    "name": "stochas",
    "buildsystem": "cmake-ninja",
    "config_opts": [
     "-DSTOCHAS_VERSION=1.3.13",
     "-DCMAKE_BUILD_TYPE=Release"
    ],
    "cleanup": [
     "/bin/JUCE-*",
     "/lib",
     "/include"
    ],
    "post-install": [
     "install -Dm755 -t ${FLATPAK_DEST}/bin ./stochas_artefacts/Release/Standalone/Stochas",
     "install -Dm644 image/app_logo_512.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png",
     "install -Dm644 -t ${FLATPAK_DEST}/share/applications org.stochas.Stochas.desktop",
     "install -Dm644 -t ${FLATPAK_DEST}/share/metainfo org.stochas.Stochas.metainfo.xml",
     "install -d ${PLUGINS_DIR}/vst3",
     "cp -r stochas_artefacts/Release/VST3/*.vst3 ${PLUGINS_DIR}/vst3",
     "install -d ${PLUGINS_DIR}/clap",
     "cp -r stochas_artefacts/Release/CLAP/*.clap ${PLUGINS_DIR}/clap",
     "install -Dm644 -t ${PLUGINS_DIR}/share/metainfo org.freedesktop.LinuxAudio.Plugins.Stochas.metainfo.xml",
     "appstreamcli compose --components=${PLUGINS_ID} --prefix=/ --origin=${PLUGINS_ID} --result-root=${PLUGINS_DIR} --data-dir=${PLUGINS_DIR}/share/app-info/xmls ${PLUGINS_DIR}"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/surge-synthesizer/stochas.git",
      "tag": "v1.3.13",
      "commit": "360d5cacfc9ec24318a771b5d1d5193308548867"
     },
     {
      "type": "file",
      "path": "org.stochas.Stochas.desktop"
     },
     {
      "type": "file",
      "path": "org.stochas.Stochas.metainfo.xml"
     },
     {
      "type": "file",
      "path": "org.freedesktop.LinuxAudio.Plugins.Stochas.metainfo.xml"
     }
    ]
   }
  ]
 }
}