# Flatpak manifest for Hermitage # # Build: # flatpak-builder --user --install --force-clean build-dir \ # data/io.github.virinvictus.hermitage.yml # # Run: # flatpak run io.github.virinvictus.hermitage # # The GNOME 50 runtime ships Python 3.13 + PyGObject 3.56; PyYAML and # Pillow are not in the runtime so they're packaged as modules below # (sdist sources pinned by sha256 for offline builds). --- app-id: io.github.virinvictus.hermitage runtime: org.gnome.Platform runtime-version: '50' sdk: org.gnome.Sdk command: hermitage # The metainfo.xml ships as-is to /share/metainfo and software centers # read it directly. Skip flatpak-builder's bundled appstreamcli-compose # pass — it requires gdk-pixbuf to rasterise the SVG icon, and the # librsvg pixbuf loader isn't always present on the build host # (Fedora 44 dropped it). Skipping is harmless: Flathub re-runs compose # against its own toolchain at submission time. appstream-compose: false # Sandbox permissions — minimal. Display + DRI for GTK4/Wayland; home # for ~/.config / ~/.cache / ~/.local/share / Calibre libraries living # under $HOME. Arbitrary paths outside $HOME are reached via the GNOME # file-chooser portal (no extra permission needed). finish-args: - --share=ipc - --socket=wayland - --socket=fallback-x11 - --device=dri - --filesystem=home # Cleanup once the install set is built — the SDK pulls in build-only # headers and pyc cache that we don't need at runtime. cleanup: - /include - /lib/pkgconfig - /share/man - /share/doc - '*.la' - '*.a' modules: # Cython — build dependency for PyYAML's _yaml C extension on # Python 3.13+. Installed first so PyYAML can pick it up off the # /app PYTHONPATH that flatpak-builder threads through subsequent # modules. The runtime SDK already ships setuptools, so we don't # need to package that separately. - name: python3-cython buildsystem: simple build-commands: - >- pip3 install --verbose --exists-action=i --no-index --no-build-isolation --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} Cython sources: - type: file url: https://files.pythonhosted.org/packages/91/85/7574c9cd44b69a27210444b6650f6477f56c75fee1b70d7672d3e4166167/cython-3.2.4.tar.gz sha256: 84226ecd313b233da27dc2eb3601b4f222b8209c3a7216d8733b031da1dc64e6 # PyYAML — needed by hermitage.config. Builds the libyaml C binding # against the SDK's libyaml-devel. --no-build-isolation lets the # build see the SDK's setuptools and the Cython we just installed. - name: python3-pyyaml buildsystem: simple build-commands: - >- pip3 install --verbose --exists-action=i --no-index --no-build-isolation --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} PyYAML sources: - type: file url: https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz sha256: d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f # Pillow — used by the thumbnailer, color extractor, and codex blur. # Pinned at 11.x — Pillow 12 dragged in pybind11 (and a transitive # scikit-build-core), which more than doubles the build-dep surface. # 11.3.0 still gets us LANCZOS, GaussianBlur, and the rest of what we # actually use. Builds against libjpeg-turbo + libpng + zlib from the SDK. - name: python3-pillow buildsystem: simple build-commands: - >- pip3 install --verbose --exists-action=i --no-index --no-build-isolation --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} Pillow sources: - type: file url: https://files.pythonhosted.org/packages/f3/0d/d0d6dea55cd152ce3d6767bb38a8fc10e33796ba4ba210cbab9354b6d238/pillow-11.3.0.tar.gz sha256: 3828ee7586cd0b2091b6209e5ad53e20d0649bbe87164a459d0676e035e8f523 # cquarry — the canonical Calibre metadata.db layer hermitage reads # everything database-shaped through; there is no hand-rolled DB access # in this tree. The dev dependency tracks @main, but a Flatpak build # must be reproducible, so the manifest pins an exact commit and the # pin is bumped deliberately with each cquarry release. Standing rule # (cquarry roadmap, 2026-08-30): any cquarry roadmap item that affects # Hermitage bumps this pin in the same release as its consumer sync. # cquarry builds with hatchling, which the SDK does not ship, so the # wheel set below is installed first (pure wheels, --no-index, pinned # by sha256 for offline builds; tomli is only needed below Python 3.11 # and the runtime ships 3.13). - name: python3-hatchling buildsystem: simple build-commands: - >- pip3 install --verbose --exists-action=i --no-index --no-build-isolation --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} hatchling sources: - type: file url: https://files.pythonhosted.org/packages/a9/84/1798b6d85ecde0e31546004efd25c5de1b1f49250644a60cce460e12593a/hatchling-1.32.0-py3-none-any.whl sha256: 0e17c9c3b9aa7c625acc8d0f5b622f107d5049af9ecf5ada4de1aada5be7cdbc - type: file url: https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl sha256: d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c - type: file url: https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl sha256: a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189 - type: file url: https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl sha256: e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746 - type: file url: https://files.pythonhosted.org/packages/13/bc/8c13eb66537dce1d2bd3a57132902f38d0e7f5bb46fa9f4daed9fe9d76ee/tomlkit-0.15.1-py3-none-any.whl sha256: 177a05aece5a8ca5266fd3c448abb47b8d352f09d477d3ca8332db4d89b24304 - type: file url: https://files.pythonhosted.org/packages/7c/a4/81502f486f01db95bc8320646a8a12511f5e556cb63d5e224d91816605c4/trove_classifiers-2026.6.1.19-py3-none-any.whl sha256: ab4c4ec93cc4a4e7815fa759906e05e6bb3f2fbd92ea0f897288c6a43efd15b3 - name: cquarry buildsystem: simple build-commands: # --no-build-isolation uses the hatchling installed by the module # above; --no-deps is safe because cquarry is pure stdlib. - >- pip3 install --verbose --no-deps --no-build-isolation --prefix=${FLATPAK_DEST} . sources: - type: git url: https://github.com/VirInvictus/cquarry.git commit: a1cebf863b8b753d1bf71e7c2c993f80f8173dbb # cquarry v1.18.0+py313.1 (compat-py313; the 3.13 floor for this # runtime's Python, recorded decision #81; tag verbatim-verified) # Hermitage itself + its desktop / icon / metainfo data files. - name: hermitage buildsystem: simple build-commands: # Install the package (includes hermitage.fonts/*.ttf via package-data). - >- pip3 install --verbose --no-deps --no-build-isolation --prefix=${FLATPAK_DEST} . # Pre-render PNG sizes from the master SVG. We deliberately don't # install the SVG itself — flatpak-builder's export step validates # icons via gdk-pixbuf, and the librsvg pixbuf loader is no longer # shipped on modern Fedora (GTK4 renders SVG natively without it), # so an SVG-in-export trips a "Format not recognized" error. # GTK4 apps look up rasterised sizes from the hicolor theme just # fine, and software centers prefer PNGs anyway. - | for sz in 32 48 64 128 256 512; do mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/${sz}x${sz}/apps rsvg-convert -w ${sz} -h ${sz} \ data/icons/hicolor/scalable/apps/io.github.virinvictus.hermitage.svg \ -o ${FLATPAK_DEST}/share/icons/hicolor/${sz}x${sz}/apps/io.github.virinvictus.hermitage.png done # Desktop entry - >- install -Dm644 data/io.github.virinvictus.hermitage.desktop ${FLATPAK_DEST}/share/applications/io.github.virinvictus.hermitage.desktop # AppStream metainfo - >- install -Dm644 data/io.github.virinvictus.hermitage.metainfo.xml ${FLATPAK_DEST}/share/metainfo/io.github.virinvictus.hermitage.metainfo.xml sources: # The release tag, per the Flathub requirement that builders fetch # clean tagged source (type: dir cannot work there). Forward-only # tag policy: this reference never moves. - type: git url: https://github.com/VirInvictus/Hermitage.git tag: v1.8.4