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.
This commit is contained in:
hermes 2026-09-15 18:04:03 +00:00
commit 4f40c2b719

View file

@ -50,6 +50,19 @@ let
}; };
patches = [ ]; 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 { firecrawl-py = prev.firecrawl-py.overridePythonAttrs (_old: rec {
# hermes-agent >=0.4.0 requires firecrawl-py >=4.16.0; nixpkgs builds from GitHub # hermes-agent >=0.4.0 requires firecrawl-py >=4.16.0; nixpkgs builds from GitHub
version = "4.16.0"; version = "4.16.0";
@ -252,6 +265,8 @@ pythonPackages.buildPythonApplication {
pyjwt pyjwt
cryptography cryptography
pillow pillow
# Vision — HEIF/HEIC/AVIF decode for iPhone photos (upstream >=0.21.3)
pillow-heif
# Messaging # Messaging
python-telegram-bot python-telegram-bot
discordpy discordpy