app-id: com.wordhunter.app branch: stable runtime: org.gnome.Platform runtime-version: "50" sdk: org.gnome.Sdk sdk-extensions: - org.freedesktop.Sdk.Extension.rust-stable - org.freedesktop.Sdk.Extension.node22 command: word-hunter-rustified finish-args: - --share=ipc - --share=network - --socket=fallback-x11 - --socket=wayland - --socket=pulseaudio - --device=dri - --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 - --filesystem=xdg-config/gtk-3.0:ro - --filesystem=xdg-config/kdeglobals:ro - --filesystem=xdg-documents - --filesystem=xdg-download - --filesystem=host-os:ro - --talk-name=com.wordhunter.app.SingleInstance - --own-name=com.wordhunter.app.SingleInstance modules: # The Rust build refuses a missing or stale dist/web (src-tauri/build.rs), # and dist/ is gitignored. scripts/build-flatpak.sh builds the frontend on # the host (npm run build:frontend) before invoking flatpak-builder, so the # checkout inside the sandbox already contains dist/web; running npm inside # the sandbox is avoided because npm ci crashes there (npm "Exit handler # never called!" after ~70 s, reproducible in CI). This module installs the # host-compiled frontend to /app; the word-hunter module copies it into its # source tree. - name: frontend only-arches: - x86_64 buildsystem: simple build-commands: - install -d /app/share/word-hunter/frontend - cp -r dist/web/. /app/share/word-hunter/frontend/ sources: - type: dir path: . skip: - .flatpak-builder - .git - .worktree - .agents - .codex - .codex-remote-attachments - build - build_work - docs/android - docs/ddia-assessment.md - My_Data - node_modules - output - outputs - scratch - src-tauri/target - src-tauri/ocr-runner/target - TODO - name: word-hunter only-arches: - x86_64 buildsystem: simple build-options: append-path: /usr/lib/sdk/rust-stable/bin env: CARGO_HOME: /run/build/word-hunter/cargo CARGO_NET_OFFLINE: "true" CTRANSLATE2_RELEASE: "4.6.0" ORT_LIB_LOCATION: /run/build/word-hunter/src-tauri/target/flatpak-onnxruntime build-commands: - cp -r /app/share/word-hunter/frontend/. dist/web - cargo --offline --locked build --release --manifest-path src-tauri/Cargo.toml - cargo --offline --locked build --release --manifest-path src-tauri/ocr-runner/Cargo.toml - install -Dm755 src-tauri/target/release/word-hunter-rustified /app/bin/word-hunter-rustified - install -Dm755 src-tauri/ocr-runner/target/release/wordhunter-paddleocr /app/bin/ocr-runtime/bin/wordhunter-paddleocr - install -Dm755 src-tauri/target/flatpak-onnxruntime/lib/libwebgpu_dawn.so /app/lib/libwebgpu_dawn.so - install -Dm755 src-tauri/target/flatpak-pdfium/libpdfium.so /app/bin/ocr-runtime/bin/libpdfium.so - install -Dm644 src-tauri/target/flatpak-ocr-models/*.onnx -t /app/bin/ocr-runtime/models/ - install -Dm644 LICENSE /app/share/licenses/com.wordhunter.app/LICENSE - install -Dm644 THIRD-PARTY-NOTICES.md THIRD-PARTY-LICENSES.html OCR-THIRD-PARTY-LICENSES.html -t /app/share/doc/word-hunter/ - install -Dm644 flatpak/com.wordhunter.app.desktop /app/share/applications/com.wordhunter.app.desktop - install -Dm644 flatpak/com.wordhunter.app.metainfo.xml /app/share/metainfo/com.wordhunter.app.metainfo.xml - install -Dm644 src/assets/icon-16.png /app/share/icons/hicolor/16x16/apps/com.wordhunter.app.png - install -Dm644 src/assets/icon-32.png /app/share/icons/hicolor/32x32/apps/com.wordhunter.app.png - install -Dm644 src/assets/icon-48.png /app/share/icons/hicolor/48x48/apps/com.wordhunter.app.png - install -Dm644 src/assets/icon-64.png /app/share/icons/hicolor/64x64/apps/com.wordhunter.app.png - install -Dm644 src/assets/icon-128.png /app/share/icons/hicolor/128x128/apps/com.wordhunter.app.png - install -Dm644 src/assets/icon-256.png /app/share/icons/hicolor/256x256/apps/com.wordhunter.app.png sources: - type: dir path: . skip: - .flatpak-builder - .git - .worktree - .agents - .codex - .codex-remote-attachments - build - build_work - docs/android - docs/ddia-assessment.md - My_Data - node_modules - output - outputs - scratch - src-tauri/target - src-tauri/ocr-runner/target - TODO - flatpak/cargo-sources.json - type: archive archive-type: tar-gzip url: https://cdn.pyke.io/0/pyke:ort-rs/ms@1.22.0/x86_64-unknown-linux-gnu+wgpu.tgz sha256: d766b62a8419124d242bb02a0ab1d2407b86c39011fec6214d83d5ac304d5593 dest: src-tauri/target/flatpak-onnxruntime - type: archive archive-type: tar-gzip url: https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F7920/pdfium-linux-x64.tgz sha256: 49ab3afbd4e6c1e284b5f2898129c8bb8a10fd785c1c5392c8c1fc70242f9ced dest: src-tauri/target/flatpak-pdfium - type: archive archive-type: zip url: https://github.com/mg-chao/paddle-ocr-rs/releases/download/onnx_models/Paddle.OCR.V5.zip sha256: 2fa4055b10dc4e9c1433444fe29f8d5acca2fccc0a0e86b3313caa5cc9e56b7a dest: src-tauri/target/flatpak-ocr-models - type: archive url: https://github.com/OpenNMT/CTranslate2/archive/refs/tags/v4.6.0.tar.gz sha256: 9421d846668573466ceb713b27f71fb16fed8486ed7bdb654583c48c3c20621b dest: src-tauri/target/release/CTranslate2-4.6.0 strip-components: 1 - type: archive url: https://github.com/google/cpu_features/archive/8a494eb1e158ec2050e5f699a504fbc9b896a43b.tar.gz sha256: 9b2019dae7608630ab985129a5c3263fc788e4f82e26965a8d8c33b8c035802e dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/cpu_features strip-components: 1 - type: archive url: https://github.com/NVIDIA/cutlass/archive/bbe579a9e3beb6ea6626d9227ec32d0dae119a49.tar.gz sha256: 9fa1da6be3d2d9207b801d5768cbced59c202444a8c84b82325b0670f47f9d48 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/cutlass strip-components: 1 - type: archive url: https://github.com/jarro2783/cxxopts/archive/c74846a891b3cc3bfa992d588b1295f528d43039.tar.gz sha256: 29b618401f6e29ee5a21208c5cf4d8b17e55814cc220e0ada9a798239f1944e3 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/cxxopts strip-components: 1 - type: archive url: https://github.com/google/googletest/archive/f8d7d77c06936315286eb55f8de22cd23c188571.tar.gz sha256: 7ff5db23de232a39cbb5c9f5143c355885e30ac596161a6b9fc50c4538bfbf01 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/googletest strip-components: 1 - type: archive url: https://github.com/google/ruy/archive/363f252289fb7a1fba1703d99196524698cb884d.tar.gz sha256: 3c2181c9134896784d5d0494e2638c43127de4da2ddf81b3a64c06311fb17432 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/ruy strip-components: 1 - type: archive url: https://github.com/pytorch/cpuinfo/archive/082deffc80ce517f81dc2f3aebe6ba671fcd09c9.tar.gz sha256: 4379348ec3127b37e854a0a66f85ea1d3c606e5f3a6dce235dc9c69ce663c026 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/ruy/third_party/cpuinfo strip-components: 1 - type: archive url: https://github.com/google/googletest/archive/6c58c11d5497b6ee1df3cb400ce30deb72fc28c0.tar.gz sha256: b4a7109b1a4fa078c23012078ad5bc273af24a10f8bfcaecc6111839fceeb010 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/ruy/third_party/googletest strip-components: 1 - type: archive url: https://github.com/gabime/spdlog/archive/76fb40d95455f249bd70824ecfcae7a8f0930fa3.tar.gz sha256: 4530d53b86d45228a5b8982a8f4fe7d95d3ba8e1944858d3f663732c7e949cb7 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/spdlog strip-components: 1 - type: archive url: https://github.com/NVIDIA/thrust/archive/d997cd37a95b0fa2f1a0cd4697fd1188a842fbc8.tar.gz sha256: 940e45a615f690f9f4adabae60c9da1956f5759b2e1ba58021c0a82897726ae0 dest: src-tauri/target/release/CTranslate2-4.6.0/third_party/thrust strip-components: 1 - type: inline contents: "" dest: src-tauri/target/release/CTranslate2-4.6.0 dest-filename: submodules_downloaded