From 5f8dd452bc3acbe71060cff080762e22278a5498 Mon Sep 17 00:00:00 2001 From: hermes Date: Tue, 15 Sep 2026 18:04:03 +0000 Subject: [PATCH] fix: add pillow-heif for hermes-agent 0.21.3 Upstream 0.21.3 promotes `pillow-heif>=1.4.0,<2` to a direct dependency (HEIF/HEIC/AVIF decode for the vision tools), so the wheel metadata now requires it and `pythonRuntimeDepsCheck` fails with: Checking runtime dependencies for hermes_agent-0.21.3-py3-none-any.whl - pillow-heif not installed Changes in package.nix: - Add `pillow-heif` to the runtime dependencies next to `pillow`. - Override nixpkgs' `pillow-heif` 1.2.0 up to 1.4.0. 1.4.0 is the newest release that still accepts nixpkgs' libheif 1.20.2 (1.5.0 requires libheif >= 1.23.1, so it cannot be used with the pinned nixpkgs). Verification: - `nix build .#hermes-agent`: builds; previously the same command failed in `pythonRuntimeDepsCheck`. - `nix path-info -r` on the result lists python3.12-pillow-heif-1.4.0. - pillow-heif 1.4.0 built from source against system libheif passes its own test suite: 664 passed, 8 skipped. --- package.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package.nix b/package.nix index 90ce01d..ded6bb3 100644 --- a/package.nix +++ b/package.nix @@ -50,6 +50,19 @@ let }; patches = [ ]; }); + pillow-heif = prev.pillow-heif.overridePythonAttrs (_old: rec { + # hermes-agent >=0.21.3 requires pillow-heif>=1.4.0,<2 (HEIF/HEIC/AVIF + # decode for the vision tools); nixpkgs has 1.2.0. 1.4.0 is the newest + # release that still accepts nixpkgs' libheif (1.20.2) — 1.5.0 needs + # libheif >=1.23.1. Upstream test suite passes against system libheif. + version = "1.4.0"; + src = fetchFromGitHub { + owner = "bigcat88"; + repo = "pillow_heif"; + tag = "v${version}"; + hash = "sha256-EaislmA4v2qKCDQ87I85Pn8IlS4VJWyNXkITipKSBC8="; + }; + }); firecrawl-py = prev.firecrawl-py.overridePythonAttrs (_old: rec { # hermes-agent >=0.4.0 requires firecrawl-py >=4.16.0; nixpkgs builds from GitHub version = "4.16.0"; @@ -252,6 +265,8 @@ pythonPackages.buildPythonApplication { pyjwt cryptography pillow + # Vision — HEIF/HEIC/AVIF decode for iPhone photos (upstream >=0.21.3) + pillow-heif # Messaging python-telegram-bot discordpy