Download nix/devShell.nix from SaylorTwift/hermes-agent: direct link, hf CLI and curl.
- Browser
- Download file 2.55 kB
-
https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/nix/devShell.nix
- Command line
-
hf download hf://SaylorTwift/hermes-agent/nix/devShell.nix
-
curl -L -o devShell.nix https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/nix/devShell.nix
2.55 kB
| # nix/devShell.nix — Dev shell that delegates setup to each package | |
| # | |
| # Each npm workspace package exposes passthru.packageJsonPath (e.g. | |
| # "ui-tui/package.json"). This file collects them all and passes the | |
| # list to mkNpmDevShellHook, which stamps all package.jsons at once, | |
| # then runs a single `npm i --package-lock-only` if any changed and | |
| # `npm ci` if the lockfile changed. | |
| { ... }: | |
| { | |
| perSystem = | |
| { pkgs, self', ... }: | |
| let | |
| packages = builtins.attrValues self'.packages; | |
| hermesNpmLib = self'.packages.default.passthru.hermesNpmLib; | |
| # Collect all packageJsonPath values from npm workspace packages. | |
| npmPackageJsonPaths = builtins.filter (p: p != null) ( | |
| map (p: p.passthru.packageJsonPath or null) packages | |
| ); | |
| hermesAgentDevShellHook = self'.packages.default.passthru.devShellHook; | |
| in | |
| { | |
| devShells.default = pkgs.mkShell { | |
| packages = with pkgs; [ | |
| (pkgs.runCommand "hermes" { } '' | |
| mkdir -p $out/bin | |
| install -Dm755 ${../hermes} $out/bin/hermes | |
| '') | |
| self'.packages.sandbox | |
| uv | |
| # Headless Wayland compositor for E2E tests (test:e2e:visual). | |
| # cage renders a single client with no window management, so | |
| # the Electron window opens at a fixed size without tiling. | |
| # libglvnd provides libEGL.so.1 that cage needs on NixOS. | |
| cage | |
| libglvnd | |
| # Graphical terminal + Wayland screenshot client for CLI/TUI UI | |
| # evidence. `cage -- ghostty ...` keeps captures off the user's | |
| # live compositor; grim runs inside that isolated client session. | |
| ghostty | |
| grim | |
| ] | |
| ++ self'.packages.default.passthru.devDeps; | |
| shellHook = '' | |
| ${hermesAgentDevShellHook} | |
| ${hermesNpmLib.mkNpmDevShellHook npmPackageJsonPaths} | |
| # Force Node to use Nix's playwright-test binary instead of node_modules/.bin | |
| export PATH="${pkgs.playwright-test}/bin:$PATH" | |
| # for the devshell to pick up the src | |
| export HERMES_PYTHON_SRC_ROOT=$(git rev-parse --show-toplevel) | |
| # Let `uv run --active --no-sync` reuse Nix's provisioned Python | |
| # environment instead of creating an empty project .venv. | |
| export VIRTUAL_ENV="$(dirname "$(dirname "$(readlink -f "$(command -v python)")")")" | |
| echo "Hermes Agent dev shell in $HERMES_PYTHON_SRC_ROOT" | |
| echo "Ready. Run 'hermes' or 'sandbox hermes' to start." | |
| ''; | |
| }; | |
| }; | |
| } | |