fix(nix): gate matrix extra to Linux in [all] profile (#7461)
* 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 #4594 * chore: regenerate uv.lock with matrix-on-linux in [all]
This commit is contained in:
@@ -11,12 +11,19 @@ def _load_optional_dependencies():
|
||||
return project["optional-dependencies"]
|
||||
|
||||
|
||||
def test_matrix_extra_exists_but_excluded_from_all():
|
||||
def test_matrix_extra_linux_only_in_all():
|
||||
"""matrix-nio[e2e] depends on python-olm which is upstream-broken on modern
|
||||
macOS (archived libolm, C++ errors with Clang 21+). The [matrix] extra is
|
||||
kept for opt-in install but deliberately excluded from [all] so one broken
|
||||
upstream dep doesn't nuke every other extra during ``hermes update``."""
|
||||
included in [all] but gated to Linux via a platform marker so that
|
||||
``hermes update`` doesn't fail on macOS."""
|
||||
optional_dependencies = _load_optional_dependencies()
|
||||
|
||||
assert "matrix" in optional_dependencies
|
||||
# Must NOT be unconditional — python-olm has no macOS wheels.
|
||||
assert "hermes-agent[matrix]" not in optional_dependencies["all"]
|
||||
# Must be present with a Linux platform marker.
|
||||
linux_gated = [
|
||||
dep for dep in optional_dependencies["all"]
|
||||
if "matrix" in dep and "linux" in dep
|
||||
]
|
||||
assert linux_gated, "expected hermes-agent[matrix] with sys_platform=='linux' marker in [all]"
|
||||
|
||||
Reference in New Issue
Block a user