Skip to content

fix(nix): gate matrix extra to Linux in [all] profile#7461

Merged
alt-glitch merged 2 commits into
mainfrom
fix/matrix-nix-linux-gating
Apr 11, 2026
Merged

fix(nix): gate matrix extra to Linux in [all] profile#7461
alt-glitch merged 2 commits into
mainfrom
fix/matrix-nix-linux-gating

Conversation

@alt-glitch

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4594 — Matrix does not work on NixOS setup.

Problem

The [matrix] extra was completely excluded from the [all] install profile because python-olm (a dependency of matrix-nio[e2e]) is upstream-broken on modern macOS (archived libolm, C++ errors with Clang 21+). This meant NixOS users — who typically install via [all] — got no Matrix support at all, even though python-olm builds fine on Linux.

Fix

Add a sys_platform == 'linux' environment marker to the [all] profile entry:

"hermes-agent[matrix]; sys_platform == 'linux'",

This pulls in Matrix support on Linux (including NixOS) while continuing to skip the broken macOS build. Users on macOS who need Matrix can still install manually via pip install 'hermes-agent[matrix]'.

Test changes

Updated test_matrix_extra_linux_only_in_all() to verify:

  • hermes-agent[matrix] is not unconditionally in [all] (would break macOS)
  • A Linux-gated variant is present in [all]

Notes

  • The existing [matrix] extra definition is untouched — the marker only affects the [all] aggregate.
  • This is the short-term fix mentioned in the issue. The long-term fix (replacing matrix-nio with mautrix) is tracked separately.

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes #4594
@alt-glitch

Copy link
Copy Markdown
Collaborator Author

@BugBot review

@cursor

cursor Bot commented Apr 11, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes dependency resolution for the all extra, which can affect installation outcomes across platforms; risk is limited to packaging metadata and is gated by a Linux-only marker.

Overview
Adds Matrix support back into the pyproject.toml [all] extra, but only when sys_platform == 'linux', so Linux/NixOS installs get hermes-agent[matrix] while macOS avoids the broken python-olm dependency.

Updates the packaging regression test to assert that hermes-agent[matrix] is not included unconditionally in [all] and that a Linux-gated entry is present.

Reviewed by Cursor Bugbot for commit ab95f74. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ab95f74. Configure here.

@alt-glitch alt-glitch merged commit 9a0c44f into main Apr 11, 2026
4 of 6 checks passed
@alt-glitch alt-glitch deleted the fix/matrix-nix-linux-gating branch April 11, 2026 00:30
arasovic added a commit to arasovic/hermes-agent that referenced this pull request Apr 12, 2026
pip install -e .[all] hangs indefinitely on 32-bit ARM Linux hosts
(Raspberry Pi 3B / 2 / Zero) because the unconditional hermes-agent[voice]
entry in [all] pulls in faster-whisper, which transitively depends on
ctranslate2 and onnxruntime. Neither package publishes wheels for
armv6l / armv7l, so pip falls back to building from source, which either
OOMs or fills tmpfs on 1GB-RAM devices. The Telegram /update command
therefore never returns and the gateway hangs until the stuck pip process
is killed manually.

Gate the voice entry in [all] with a platform_machine environment marker,
mirroring the [matrix]; sys_platform == 'linux' pattern merged in NousResearch#7461
and the existing termux extras' rationale (whose comment already calls
out faster-whisper -> ctranslate2 as the reason the Termux path avoids
voice). Users on ARM32 who genuinely need local STT can still install it
explicitly via pip install -e '.[voice]'.

Adds tests/test_packaging_metadata.py::test_all_extra_gates_voice_off_arm32
as a regression test using packaging.requirements.Requirement to resolve
the marker against synthetic platform_machine values.

Fixes NousResearch#8397
Tommyeds pushed a commit to Tommyeds/hermes-agent that referenced this pull request Apr 12, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
ulasbilgen pushed a commit to ulasbilgen/hermes-adhd-agent that referenced this pull request May 1, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
)

* fix(nix): gate matrix extra to Linux in [all] profile

matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
macOS (Clang 21+, archived libolm). Previously the [matrix] extra was
completely excluded from [all], meaning NixOS users (who install via [all])
had no Matrix support at all.

Add a sys_platform == 'linux' marker so [all] pulls in [matrix] on Linux
(where python-olm builds fine) while still skipping it on macOS. This
fixes the NixOS setup path without breaking macOS installs.

Update the regression test to verify the Linux-gated marker is present
rather than just checking matrix is absent from [all].

Fixes NousResearch#4594

* chore: regenerate uv.lock with matrix-on-linux in [all]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Setup]: Matrix does not work on NixOS setup

1 participant