hermes-agent/nix
ethernet 7eefb09314 fix(nix): tie devShell's HERMES_PYTHON to the venv actually on PATH
`nix/devShell.nix` collected `devShellHook` by scanning every package:

    nonNpmHooks = map (p: p.passthru.devShellHook or "") packages;

But `minimal` and `messaging` are `.override` variants of `default`, so
each carries its own `devShellHook` exporting its own HERMES_PYTHON. The
scan therefore concatenated three conflicting exports and forced Nix to
evaluate and realise three separate uv2nix editable venvs on every
`nix develop`.

`attrValues` is alphabetical, so the last hook won (`minimal`) while
`python`/VIRTUAL_ENV came from `default`'s devDeps:

    HERMES_PYTHON        = ...dimim2... (minimal — no optional deps)
    python / VIRTUAL_ENV = ...85r28... (full)

Inside the shell `$HERMES_PYTHON -c "import anthropic"` failed while
`python -c "import anthropic"` succeeded. Worse, `scripts/run_tests.sh`
prefers HERMES_PYTHON, so the suite ran against the minimal venv. Its
guard did not catch this: it only checks that HERMES_PYTHON has pytest,
and minimal's venv does (pytest is in the `dev` group), so the wrong
interpreter was silently accepted.

Tying the hook to `packages.default` — the same package whose `devDeps`
are installed — keeps HERMES_PYTHON, `python`, and VIRTUAL_ENV pointing
at one venv by construction.

    editable venvs referenced   3      -> 1
    their combined closure      421 MB -> 140 MB
    test failures               85     -> 32

The venv mismatch was masking 53 failures; e.g. test_web_tools_config.py
goes 2-failed -> 38-passed. Full suite is now 25369 passed / 32 failed,
and those 32 reproduce identically on a pristine HEAD worktree with no
nix/ changes under the same interpreter (mostly NixOS artifacts — tests
spawning bare `python3` in a scrubbed env exit 127).
2026-08-03 13:32:08 -04:00
..
checks.nix feat(runtime)!: require Node 26 across all installers, heal, and upgrade paths 2026-08-01 21:17:51 -04:00
configMergeScript.nix
desktop.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
devShell.nix fix(nix): tie devShell's HERMES_PYTHON to the venv actually on PATH 2026-08-03 13:32:08 -04:00
hermes-agent.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
lib.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
nixosModules.nix
node-gyp-11-4-0-package-lock.json fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
node-gyp-11-4-0.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
npm-12-0-2.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
overlays.nix
packages.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
python.nix
tui.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00
web.nix fix: fix @nousresearch/ui version, update to npm 12 2026-08-01 17:05:42 -04:00