fix(nix): include web dashboard dependencies and frontend in Nix build#9502
Closed
chiyema wants to merge 1 commit into
Closed
fix(nix): include web dashboard dependencies and frontend in Nix build#9502chiyema wants to merge 1 commit into
chiyema wants to merge 1 commit into
Conversation
08b8ca7 to
786ef17
Compare
Two issues prevented 'hermes dashboard' from working in the Nix package: 1. uv.lock was missing the [web] extra — fastapi and uvicorn were only resolved under the [rl] marker, so the [all] extra didn't include them. Regenerated with 'uv lock' to fix the root cause. 2. nix/packages.nix didn't build or bundle the Vite/React frontend. Added buildNpmPackage derivation for the frontend and a site-packages overlay with web_dist symlinked into hermes_cli, prepended via PYTHONPATH in the wrapper scripts. No application code changes needed. Tested on x86_64-linux (NixOS Proxmox LXC): - nix build succeeds with fastapi 0.133.1 and uvicorn 0.41.0 in the venv - web_dist is built and symlinked into the hermes_cli overlay - 'hermes dashboard --host 0.0.0.0 --port 9119 --no-open' starts successfully as a systemd service, returns HTTP 200, and serves the React frontend on LAN See also NousResearch#9307 for an alternative approach.
786ef17 to
81b95b7
Compare
7 tasks
Collaborator
|
Superseded by #12194 (merged) which builds the web dashboard frontend in the Nix package and touches the same nix/packages.nix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermes dashboarddoesn't work when installed via the Nix flake. Two issues:uv.lockmissing[web]extra —fastapianduvicornwere only resolved under the[rl]marker, so the[all]extra didn't include them. Theweboptional-dependency group was entirely absent from the lockfile. Fixed by regenerating withuv lock.Frontend not bundled —
nix/packages.nixdidn't build or include the Vite/React frontend. Fixed by adding abuildNpmPackagederivation and a site-packages overlay withweb_distsymlinked intohermes_cli, prepended viaPYTHONPATHin the wrapper scripts. No application code changes needed.Changes
uv.lock: Regenerated to properly resolve[web]extra (fastapi,uvicorn) into the[all]group — fixes the root cause rather than working around itnix/packages.nix: AddedhermesWeb(buildNpmPackage for the Vite frontend) andhermesSiteOverlay(thin overlay that shadowshermes_cliwithweb_distpresent), passed viaPYTHONPATHin makeWrapperTesting
Tested on x86_64-linux (NixOS Proxmox LXC):
nix buildsucceeds withfastapi 0.133.1anduvicorn 0.41.0in the venvweb_distis built and symlinked into the hermes_cli overlayhermes dashboard --host 0.0.0.0 --port 9119 --no-openstarts successfully as a systemd service, returns HTTP 200, and serves the React frontend on LANhermes dashboard --helpruns without "Web UI dependencies not installed" errorSee also #9307 for an alternative approach — this PR fixes the
uv.lockroot cause (vs thepython.nixworkaround in #9307) and adopts the same PYTHONPATH overlay technique forweb_dist.