{
 "app_id": "net.veloren.veloren",
 "source_url": "https://raw.githubusercontent.com/flathub/net.veloren.veloren/master/net.veloren.veloren.yaml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--socket=fallback-x11",
  "--device=all",
  "--filesystem=xdg-pictures/veloren:create"
 ],
 "module_count": 2,
 "fetched_at": "2026-09-17T16:13:57.050725+00:00",
 "manifest": {
  "app-id": "net.veloren.veloren",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "veloren-voxygen",
  "finish-args": [
   "--device=all",
   "--filesystem=xdg-pictures/veloren:create",
   "--share=ipc",
   "--share=network",
   "--socket=fallback-x11",
   "--socket=pulseaudio",
   "--socket=wayland"
  ],
  "modules": [
   {
    "name": "rust-nightly",
    "build-options": {
     "strip": false,
     "no-debuginfo": true
    },
    "buildsystem": "simple",
    "build-commands": [
     "./install.sh --prefix=/app --disable-ldconfig --verbose"
    ],
    "cleanup": [
     "*"
    ],
    "sources": [
     {
      "type": "archive",
      "only-arches": [
       "x86_64"
      ],
      "url": "https://static.rust-lang.org/dist/2025-09-08/rust-nightly-x86_64-unknown-linux-gnu.tar.xz",
      "sha256": "9aa21da7a176371cb344886f511e743e6355d0653381331c5d0767a9035b8d1f"
     },
     {
      "type": "archive",
      "only-arches": [
       "aarch64"
      ],
      "url": "https://static.rust-lang.org/dist/2025-09-08/rust-nightly-aarch64-unknown-linux-gnu.tar.xz",
      "sha256": "f19b4221c0cb2e237780beef4b3cf89314b27d45ae0a77709a408ddc7aa2c12d"
     }
    ]
   },
   {
    "name": "veloren",
    "build-options": {
     "env": {
      "RUSTFLAGS": "--remap-path-prefix =../",
      "CARGO_HOME": "/run/build/veloren/cargo",
      "VELOREN_USERDATA_STRATEGY": "system"
     }
    },
    "buildsystem": "simple",
    "build-commands": [
     "cargo --offline fetch --manifest-path Cargo.toml",
     "cargo --offline build --release --no-default-features --features=\"default-publish\"",
     "install -D -m 755 ./target/release/veloren-{voxygen,server-cli} -t /app/bin/"
    ],
    "post-install": [
     "mkdir -p /app/share/veloren/",
     "cp -ap assets/ /app/share/veloren/",
     "install -Dpm0644 assets/voxygen/${FLATPAK_ID}.metainfo.xml -t /app/share/metainfo/",
     "install -Dpm0644 assets/voxygen/${FLATPAK_ID}.desktop -t /app/share/applications/",
     "install -Dpm0644 assets/voxygen/${FLATPAK_ID}.png -t /app/share/icons/hicolor/256x256/apps/",
     "set -e\nVERSION=0.18.0-$(git describe --tags --always | sed 's/^[vV]//')\nDATE=$(date -d @$(git show -s --format=%ct) +'%Y-%m-%d')\nsed \\\n  -e \"s/@VERSION@/${VERSION}/g\" \\\n  -e \"s/@DATE@/${DATE}/g\" \\\n  -i /app/share/metainfo/${FLATPAK_ID}.metainfo.xml\n"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://gitlab.com/veloren/veloren.git",
      "commit": "1d12f35edd6cdbfc1fb921c167cdd7beeeffe248",
      "tag": "v0.18.0"
     },
     {
      "type": "patch",
      "path": "aarch64-fix-cargo-config.patch"
     },
     {
      "type": "shell",
      "only-arches": [
       "arm"
      ],
      "commands": [
       "sed -i \"/lto = true/d\" Cargo.toml"
      ]
     },
     "generated-sources.json"
    ]
   }
  ]
 }
}