# NousResearch/hermes-agent · Nix package missing FastAPI and web dashboard build

## Open now

- Nothing open on GitHub.

These issues and PRs address the Nix package failing to include FastAPI and omitting the web dashboard frontend build step. Multiple fixes were proposed targeting the same gap in the Nix packaging configuration.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #12194. Verify it addresses your case.
- **Recommended:** read PR #12194 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-12194`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.50`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #9305: Nix package: missing fastapi + web dashboard frontend not built

## Prior & competing PRs

- **#12194: fix(nix): build web dashboard frontend in Nix package**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `hermes_cli/main.py`, `hermes_cli/web_server.py`, `nix/packages.nix`, `nix/web.nix`
  - fix hunks:
  - `hermes_cli/main.py`

    ```diff
    @@ -6229,8 +6229,9 @@ def cmd_dashboard(args):
             print(f"Install them with:  {sys.executable} -m pip install 'fastapi' 'uvicorn[standard]'")
             sys.exit(1)
     
    -    if not _build_web_ui(PROJECT_ROOT / "web", fatal=True):
    -        sys.exit(1)
    +    if "HERMES_WEB_DIST" not in os.environ:
    +        if not _build_web_ui(PROJECT_ROOT / "web", fatal=True):
    +            sys.exit(1)
     
         from hermes_cli.web_server import start_server
     
    ```
  - `hermes_cli/web_server.py`

    ```diff
    @@ -59,7 +59,7 @@
             f"Install with: {sys.executable} -m pip install 'fastapi' 'uvicorn[standard]'"
         )
     
    -WEB_DIST = Path(__file__).parent / "web_dist"
    +WEB_DIST = Path(os.environ["HERMES_WEB_DIST"]) if "HERMES_WEB_DIST" in os.environ else Path(__file__).parent / "web_dist"
     _log = logging.getLogger(__name__)
     
     app = FastAPI(title="Hermes Agent", version=__version__)
    ```
  - `nix/packages.nix`

    ```diff
    @@ -18,6 +18,10 @@
             filter = path: _type: !(pkgs.lib.hasInfix "/index-cache/" path);
           };
     
    +      hermesWeb = pkgs.callPackage ./web.nix {
    +        npm-lockfile-fix = inputs'.npm-lockfile-fix.packages.default;
    +      };
    +
           runtimeDeps = with pkgs; [
             nodejs_22
             ripgrep
    ```

    ```diff
    @@ -52,6 +56,7 @@
     
                 mkdir -p $out/share/hermes-agent $out/bin
                 cp -r ${bundledSkills} $out/share/hermes-agent/skills
    +            cp -r ${hermesWeb} $out/share/hermes-agent/web_dist
     
                 # copy pre-built TUI (same layout as dev: ui-tui/dist/ + node_modules/)
                 mkdir -p $out/ui-tui
    ```

    ```diff
    @@ -62,6 +67,7 @@
                     makeWrapper ${hermesVenv}/bin/${name} $out/bin/${name} \
                       --suffix PATH : "${runtimePath}" \
                       --set HERMES_BUNDLED_SKILLS $out/share/hermes-agent/skills \
    +                  --set HERMES_WEB_DIST $out/share/hermes-agent/web_dist \
                       --set HERMES_TUI_DIR $out/ui-tui \
                       --set HERMES_PYTHON ${hermesVenv}/bin/python3 \
                       --set HERMES_NODE ${pkgs.nodejs_22}/bin/node
    ```

    ```diff
    @@ -104,6 +110,7 @@
             };
     
             tui = hermesTui;
    +        web = hermesWeb;
           };
         };
     }
    ```
  - `nix/web.nix`

    ```diff
    @@ -0,0 +1,63 @@
    +# nix/web.nix — Hermes Web Dashboard (Vite/React) frontend build
    +{ pkgs, npm-lockfile-fix, ... }:
    +let
    +  src = ../web;
    +  npmDeps = pkgs.fetchNpmDeps {
    +    inherit src;
    +    hash = "sha256-Y0pOzdFG8BLjfvCLmsvqYpjxFjAQabXp1i7X9W/cCU4=";
    +  };
    +
    +  npmLockHash = builtins.hashString "sha256" (builtins.readFile ../web/package-lock.json);
    +in
    +pkgs.buildNpmPackage {
    +  pname = "hermes-web";
    +  version = "0.0.0";
    +  inherit src npmDeps;
    +
    +  doCheck = false;
    +
    +  buildPhase = ''
    +    npx tsc -b
    +    npx vite build --outDir dist
    +  '';
    +
    +  installPhase = ''
    +    runHook preInstall
    +    cp -r dist $out
    +    runHook postInstall
    +  '';
    +
    +  nativeBuildInputs = [
    +    (pkgs.writeShellScriptBin "update_web_lockfile" ''
    +      set -euox pipefail
    +
    +      REPO_ROOT=$(git rev-parse --show-toplevel)
    +
    +      cd "$REPO_ROOT/web"
    +      rm -rf node_modules/
    +      npm cache clean --force
    +      CI=true npm install
    +      ${pkgs.lib.getExe npm-lockfile-fix} ./package-lock.json
    +
    +      NIX_FILE="$REPO_ROOT/nix/web.nix"
    +      sed -i "s/hash = \"[^\"]*\";/hash = \"\";/" $NIX_FILE
    +      NIX_OUTPUT=$(nix build .#web 2>&1 || true)
    +      NEW_HASH=$(echo "$NIX_OUTPUT" | grep 'got:' | awk '{print $2}')
    +      echo got new hash $NEW_HASH
    +      sed -i "s|hash = \"[^\"]*\";|hash = \"$NEW_HASH\";|" $NIX_FILE
    +      nix build .#web
    +      echo "Updated npm hash in $NIX_FILE to $NEW_HASH"
    +    '')
    +  ];
    +
    +  passthru.devShellHook = ''
    +    STAMP=".nix-stamps/hermes-web"
    +    STAMP_VALUE="${npmLockHash}"
    +    if [ ! -f "$STAMP" ] || [ "$(cat "$STAMP")" != "$STAMP_VALUE" ]; then
    +      echo "hermes-web: installing npm dependencies..."
    +      cd web && CI=true npm install --silent --no-fund --no-audit 2>/dev/null && cd ..
    +      mkdir -p .nix-stamps
    +      echo "$STAMP_VALUE" > "$STAMP"
    +    fi
    +  '';
    +}
    ```
- **#9307: fix(nix): include fastapi and build web frontend for dashboard**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#12197: fix(nix): build web dashboard frontend in Nix package**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`

## Fix status

- Merged to main in PR #12194 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-04-18`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
