mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-30 06:41:51 +00:00
Remove the stale Babel compiler config and direct Babel dev dependencies from the TUI package. Regenerate the npm lockfile and refresh the Nix fetchNpmDeps hash for the trimmed dependency graph.
35 lines
949 B
Nix
35 lines
949 B
Nix
# nix/tui.nix — Hermes TUI (Ink/React) compiled with tsc and bundled
|
|
{ pkgs, hermesNpmLib, ... }:
|
|
let
|
|
src = ../ui-tui;
|
|
npmDeps = pkgs.fetchNpmDeps {
|
|
inherit src;
|
|
hash = "sha256-F6/MzZOWc0zhW9mIfnaY+PrllPvJcsA/OdFdEM+NpLY=";
|
|
};
|
|
|
|
npm = hermesNpmLib.mkNpmPassthru { folder = "ui-tui"; attr = "tui"; pname = "hermes-tui"; };
|
|
|
|
packageJson = builtins.fromJSON (builtins.readFile (src + "/package.json"));
|
|
version = packageJson.version;
|
|
in
|
|
pkgs.buildNpmPackage (npm // {
|
|
pname = "hermes-tui";
|
|
inherit src npmDeps version;
|
|
|
|
doCheck = false;
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/lib/hermes-tui
|
|
|
|
# Single self-contained bundle built by scripts/build.mjs (esbuild).
|
|
cp -r dist $out/lib/hermes-tui/dist
|
|
|
|
# package.json kept for "type": "module" resolution on `node dist/entry.js`.
|
|
cp package.json $out/lib/hermes-tui/
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|