fix(nix): gate matrix extra to Linux in [all] profile#7461
Conversation
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
|
@BugBot review |
PR SummaryMedium Risk Overview Updates the packaging regression test to assert that Reviewed by Cursor Bugbot for commit ab95f74. Configure here. |
There was a problem hiding this comment.
✅ 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.
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
) * 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]
) * 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]
) * 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]
) * 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]
) * 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]
) * 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]
Summary
Fixes #4594 — Matrix does not work on NixOS setup.
Problem
The
[matrix]extra was completely excluded from the[all]install profile becausepython-olm(a dependency ofmatrix-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 thoughpython-olmbuilds fine on Linux.Fix
Add a
sys_platform == 'linux'environment marker to the[all]profile entry: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)[all]Notes
[matrix]extra definition is untouched — the marker only affects the[all]aggregate.matrix-niowithmautrix) is tracked separately.