{
 "app_id": "io.github.douglasdemaio.Vtessera",
 "source_url": "https://raw.githubusercontent.com/douglasdemaio/vtessera/main/packaging/flatpak/io.github.douglasdemaio.Vtessera.json",
 "runtime": "org.gnome.Platform",
 "runtime_version": "50",
 "sdk": "org.gnome.Sdk",
 "finish_args": [
  "--share=network",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--share=ipc",
  "--device=dri",
  "--device=kvm",
  "--talk-name=org.freedesktop.systemd1",
  "--talk-name=org.freedesktop.Flatpak",
  "--filesystem=host-os:ro",
  "--filesystem=host-etc:ro",
  "--filesystem=/var/lib/vtessera:ro",
  "--filesystem=~/.config/vtessera:create",
  "--filesystem=~/.local/share/vtessera:create",
  "--filesystem=~/.local/share/systemd/user:create"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-21T19:36:36.232549+00:00",
 "manifest": {
  "app-id": "io.github.douglasdemaio.Vtessera",
  "runtime": "org.gnome.Platform",
  "runtime-version": "50",
  "sdk": "org.gnome.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.rust-stable"
  ],
  "command": "vtessera-gui",
  "finish-args": [
   "--share=network",
   "--socket=wayland",
   "--socket=fallback-x11",
   "--share=ipc",
   "--device=dri",
   "--device=kvm",
   "--talk-name=org.freedesktop.systemd1",
   "--talk-name=org.freedesktop.Flatpak",
   "--filesystem=host-os:ro",
   "--filesystem=host-etc:ro",
   "--filesystem=/var/lib/vtessera:ro",
   "--filesystem=~/.config/vtessera:create",
   "--filesystem=~/.local/share/vtessera:create",
   "--filesystem=~/.local/share/systemd/user:create"
  ],
  "modules": [
   {
    "name": "vtessera",
    "buildsystem": "simple",
    "build-options": {
     "append-path": "/usr/lib/sdk/rust-stable/bin",
     "env": {
      "CARGO_HOME": "/run/build/vtessera/cargo",
      "CARGO_NET_OFFLINE": "true"
     }
    },
    "build-commands": [
     "rm -f rust-toolchain.toml",
     "cargo --offline fetch --manifest-path Cargo.toml --locked",
     "cargo --offline build --release --manifest-path Cargo.toml --locked -p vtessera-gui",
     "install -Dm755 -t ${FLATPAK_DEST}/bin target/release/vtessera-gui",
     "install -Dm644 -t ${FLATPAK_DEST}/share/metainfo packaging/flatpak/io.github.douglasdemaio.Vtessera.metainfo.xml",
     "install -Dm644 -t ${FLATPAK_DEST}/share/applications packaging/flatpak/io.github.douglasdemaio.Vtessera.desktop",
     "for s in 16 22 24 32 36 48 64 72 96 128 192 256 512; do install -Dm644 -t ${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps packaging/flatpak/icons/${s}x${s}/io.github.douglasdemaio.Vtessera.png; done",
     "install -Dm644 -t ${FLATPAK_DEST}/share/licenses/io.github.douglasdemaio.Vtessera LICENSE",
     "install -Dm644 -t ${FLATPAK_DEST}/share/doc/io.github.douglasdemaio.Vtessera packaging/flatpak/README.md",
     "## Host node stack (Flatpak-only channel). The Setup page's",
     "## copy-paste install command copies these out of the bundle into",
     "## the user session; systemd then runs the three USER units from",
     "## ~/.local/share/systemd/user/. Preferred source is",
     "## packaging/flatpak/host/ \u2014 the release pipeline's static (musl)",
     "## artifacts, so any host glibc runs them. A dev flatpak-builder",
     "## run falls back to this SDK's glibc build.",
     "b=vtessera-node; src=packaging/flatpak/host/bin/$b; [ -x \"$src\" ] || src=target/x86_64-unknown-linux-musl/release/$b; if [ ! -x \"$src\" ]; then cargo --offline build --release --manifest-path Cargo.toml --locked -p vtessera-node-api --features vtessera-node-api/serve; src=target/release/$b; fi; install -Dm755 \"$src\" ${FLATPAK_DEST}/libexec/vtessera/bin/$b",
     "b=vtessera-offer-index; src=packaging/flatpak/host/bin/$b; [ -x \"$src\" ] || src=target/x86_64-unknown-linux-musl/release/$b; if [ ! -x \"$src\" ]; then cargo --offline build --release --manifest-path Cargo.toml --locked -p vtessera-offer-index --features vtessera-offer-index/serve; src=target/release/$b; fi; install -Dm755 \"$src\" ${FLATPAK_DEST}/libexec/vtessera/bin/$b",
     "b=vtesserad; src=packaging/flatpak/host/bin/$b; [ -x \"$src\" ] || src=target/x86_64-unknown-linux-musl/release/$b; if [ ! -x \"$src\" ]; then cargo --offline build --release --manifest-path Cargo.toml --locked -p vtesserad; src=target/release/$b; fi; install -Dm755 \"$src\" ${FLATPAK_DEST}/libexec/vtessera/bin/$b",
     "install -Dm644 -t ${FLATPAK_DEST}/libexec/vtessera/units packaging/systemd-user/vtessera-meter.service packaging/systemd-user/vtessera-node.service packaging/systemd-user/vtessera-index.service",
     "## Guest initramfs \u2014 one more bundled file (the Setup page's sudo row",
     "## copies it to /var/lib/vtessera). Released via packaging/flatpak/host/",
     "## initramfs.cpio.gz (release pipeline); a dev run skips it.",
     "src=packaging/flatpak/host/initramfs.cpio.gz; if [ -f \"$src\" ]; then install -Dm644 \"$src\" ${FLATPAK_DEST}/libexec/vtessera/initramfs.cpio.gz; fi"
    ],
    "sources": [
     {
      "type": "dir",
      "path": "../.."
     },
     "cargo-sources.json"
    ]
   }
  ]
 }
}