{
 "app_id": "io.github.DCCXXV.dolm",
 "source_url": "https://raw.githubusercontent.com/flathub/io.github.DCCXXV.dolm/master/io.github.DCCXXV.dolm.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:10:19.173606+00:00",
 "manifest": {
  "id": "io.github.DCCXXV.dolm",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.ocaml"
  ],
  "command": "dolm",
  "build-options": {
   "append-path": "/app/share/runtime/ocaml/bin:/app/share/runtime/ocaml/switch/_opam/bin:/usr/lib/sdk/ocaml/bin",
   "env": {
    "CAML_LD_LIBRARY_PATH": "/app/share/runtime/ocaml/switch/_opam/lib/stublibs:/app/share/runtime/ocaml/switch/_opam/lib/ocaml/stublibs:/app/share/runtime/ocaml/switch/_opam/lib/ocaml",
    "OCAML_TOPLEVEL_PATH": "/app/share/runtime/ocaml/switch/_opam/lib/toplevel",
    "OPAMROOT": "/app/share/runtime/ocaml",
    "OPAMSWITCH": "/app/share/runtime/ocaml/switch",
    "OPAM_SWITCH_PREFIX": "/app/share/runtime/ocaml/switch/_opam"
   }
  },
  "finish-args": [
   "--share=ipc",
   "--socket=fallback-x11",
   "--socket=wayland",
   "--device=dri"
  ],
  "modules": [
   {
    "name": "switch",
    "buildsystem": "simple",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/ocaml/opam-repository",
      "commit": "4e7f3a62e3e8654e6c3b146b76136959efbcb3f5"
     },
     {
      "type": "file",
      "url": "https://github.com/ocaml/ocaml/releases/download/5.4.1/ocaml-5.4.1.tar.gz",
      "sha256": "d4528517aaa1a44b8e2b1bc109a1ed0a5e0014f3ddc4feb8906b11a7e063e89a",
      "dest": "cache/sha256/d4",
      "dest-filename": "d4528517aaa1a44b8e2b1bc109a1ed0a5e0014f3ddc4feb8906b11a7e063e89a"
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/ocaml/ocaml/899b8f3bece45f55161dad72eaa223c2bb7202e8/ocaml-variants.install",
      "sha256": "7af3dc34e6f9f3be2ffd8d32cd64fa650d6a036c86c4821a7033d24a90fba11c",
      "dest": "cache/sha256/7a",
      "dest-filename": "7af3dc34e6f9f3be2ffd8d32cd64fa650d6a036c86c4821a7033d24a90fba11c"
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/ocaml/ocaml/66f33f6e08857f3c3cb53fc1759fbad6860c59bd/tools/opam/gen_ocaml_config.ml.in",
      "sha256": "a9ad8d84a08961159653a978db92d10f694510182b206cacb96d5c9f63b5121e",
      "dest": "cache/sha256/a9",
      "dest-filename": "a9ad8d84a08961159653a978db92d10f694510182b206cacb96d5c9f63b5121e"
     },
     {
      "type": "file",
      "url": "https://raw.githubusercontent.com/ocaml/ocaml/363fb9f5a2fb87dbd5f8cc579af87dd04e14343b/tools/opam/ocaml-config.install",
      "sha256": "6e4fd93f4cce6bad0ed3c08afd0248dbe7d7817109281de6294e5b5ef5597051",
      "dest": "cache/sha256/6e",
      "dest-filename": "6e4fd93f4cce6bad0ed3c08afd0248dbe7d7817109281de6294e5b5ef5597051"
     }
    ],
    "build-commands": [
     "mkdir -p ${FLATPAK_DEST}/share/runtime/ocaml",
     "opam init -y --bare --disable-sandboxing .",
     "mkdir -p ${OPAMROOT}/download-cache/sha256",
     "cp -r cache/sha256/. ${OPAMROOT}/download-cache/sha256/",
     "opam switch create -y ${FLATPAK_DEST}/share/runtime/ocaml/switch ocaml-base-compiler.5.4.1"
    ],
    "post-install": [
     "opam switch list"
    ]
   },
   "shared-modules/SDL2/SDL2_ttf.json",
   {
    "name": "ocaml-packages",
    "buildsystem": "simple",
    "sources": [
     "sources/dolm.json"
    ],
    "build-commands": [
     "for d in sha256 sha512 md5; do [ -d cache/$d ] && cp -r cache/$d ${OPAMROOT}/download-cache/ || true; done",
     "mkdir -p ${OPAMROOT}/download-cache/md5/ca",
     "cp ${OPAMROOT}/download-cache/sha256/d6/d6899935ccabf67f067a9af3f3f88d94e310075d13c648fa03ff498769ce039d ${OPAMROOT}/download-cache/md5/ca/ca770e5806032a96131b670f6e07f146",
     "opam install -y --no-depexts tsdl.1.2.0 tsdl-ttf.0.6 dune.3.21.1 ocamlfind.1.9.8"
    ],
    "post-install": [
     "opam info --field name,all-installed-versions tsdl"
    ]
   },
   {
    "name": "dolm",
    "buildsystem": "simple",
    "cleanup": [
     "/share/runtime/ocaml"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/DCCXXV/dolm.git",
      "tag": "v1.0.3",
      "commit": "987774f388fc968358ff9ed3760d5fdd00ace09c"
     }
    ],
    "build-commands": [
     "dune build",
     "install -Dm755 _build/default/bin/main.exe /app/bin/dolm",
     "mkdir -p /app/lib",
     "find ${OPAM_SWITCH_PREFIX}/lib/stublibs -name '*.so' -exec install -m755 {} /app/lib/ \\;",
     "install -Dm644 assets/font/Micro5-Regular.ttf /app/share/dolm/assets/font/Micro5-Regular.ttf",
     "install -Dm644 data/io.github.DCCXXV.dolm.desktop /app/share/applications/io.github.DCCXXV.dolm.desktop",
     "install -Dm644 data/io.github.DCCXXV.dolm.appdata.xml /app/share/metainfo/io.github.DCCXXV.dolm.appdata.xml",
     "install -Dm644 assets/img/icon.png /app/share/icons/hicolor/256x256/apps/io.github.DCCXXV.dolm.png"
    ]
   }
  ]
 }
}