{
 "app_id": "xyz.rescribe.rescribe",
 "source_url": "https://raw.githubusercontent.com/flathub/xyz.rescribe.rescribe/master/xyz.rescribe.rescribe.yml",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=fallback-x11",
  "--device=dri",
  "--filesystem=home"
 ],
 "module_count": 4,
 "fetched_at": "2026-09-17T16:17:40.665343+00:00",
 "manifest": {
  "app-id": "xyz.rescribe.rescribe",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "sdk-extensions": [
   "org.freedesktop.Sdk.Extension.golang"
  ],
  "build-options": {
   "append-path": "/usr/lib/sdk/golang/bin"
  },
  "finish-args": [
   "--socket=fallback-x11",
   "--share=ipc",
   "--socket=wayland",
   "--device=dri",
   "--share=network",
   "--filesystem=home"
  ],
  "command": "rescribe",
  "modules": [
   {
    "name": "leptonica",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/DanBloomberg/leptonica",
      "tag": "1.86.0",
      "commit": "dbb48b0fd0e10e943ecd9bab7439701842894733"
     }
    ]
   },
   {
    "name": "tesseract-ocr",
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/tesseract-ocr/tesseract",
      "tag": "5.5.1",
      "commit": "3b7c70e34dea179549ed3e995872e2e019eb8477"
     }
    ]
   },
   {
    "name": "getxbook",
    "buildsystem": "simple",
    "build-commands": [
     "make PREFIX=$FLATPAK_DEST install"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://git.njw.name/getxbook.git",
      "commit": "b14f62f36939e0c14f12d4a823c9b1d701420cd4",
      "disable-shallow-clone": true
     }
    ]
   },
   {
    "name": "rescribe",
    "buildsystem": "simple",
    "build-commands": [
     "cd cmd/rescribe && go build -tags flatpak .",
     "cd cmd/rescribe && go build -tags flatpak,wayland -o rescribe-wayland .",
     "install -Dm00755 cmd/rescribe/rescribe $FLATPAK_DEST/bin/rescribe-bin",
     "install -Dm00755 cmd/rescribe/rescribe-wayland $FLATPAK_DEST/bin/rescribe-bin-wayland",
     "install -Dm00644 cmd/rescribe/icon.256.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/xyz.rescribe.rescribe.png",
     "install -Dm00644 cmd/rescribe/icon.svg $FLATPAK_DEST/share/icons/hicolor/scalable/apps/xyz.rescribe.rescribe.svg",
     "install -Dm00644 cmd/rescribe/xyz.rescribe.rescribe.desktop $FLATPAK_DEST/share/applications/xyz.rescribe.rescribe.desktop",
     "install -Dm00644 cmd/rescribe/xyz.rescribe.rescribe.appdata.xml $FLATPAK_DEST/share/appdata/xyz.rescribe.rescribe.appdata.xml",
     "printf '#!/bin/sh\\nexport TMPDIR=$XDG_RUNTIME_DIR\\nbin=rescribe-bin\\ntest -n \"$WAYLAND_DISPLAY\" && bin=rescribe-bin-wayland\\n\"$bin\" -gbookcmd \"/app/bin/getgbook\" -tesscmd \"/app/bin/tesseract\"\\n' > $FLATPAK_DEST/bin/rescribe",
     "chmod 755 $FLATPAK_DEST/bin/rescribe"
    ],
    "sources": [
     {
      "type": "git",
      "url": "https://github.com/rescribe/bookpipeline",
      "tag": "v1.4.0",
      "commit": "d6c559a87e7cca9e119117f2894fc33df5bc5611"
     },
     {
      "type": "archive",
      "url": "https://rescribe.xyz/rescribe/modules-20251201-d6c559a8.tar.xz",
      "sha256": "49f8c776cb9f659ee31534cff9b1318d5e4dc71ed72a1080bab861614515c896",
      "strip-components": 0
     },
     {
      "type": "file",
      "url": "https://rescribe.xyz/rescribe/embeds/tessdata.20220322.zip",
      "sha256": "725fd570a3c3dc0eba9463248ce47a8646db8bafb198d428d6bb8f0be18540ee",
      "dest": "cmd/rescribe"
     }
    ]
   }
  ]
 }
}