mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 17:27:37 +08:00
* change(nix): dedupe nix lockfile checking scripts in ci * feat(nix): make .#fix-lockfiles run --apply if no args passed * fix(nix): use same nodejs version everywhere & small lints - prevent lockfile thrashing while using nix :3 - use lib.getExe instead of raw /bin/ paths - use inputs'.self instead of passing system in manually * fix(nix): update lock files yet again (hopefully for the last time) * fix(nix): align indentation of collision check echo --------- Co-authored-by: Hermes Agent <hermes@nousresearch.com>
32 lines
721 B
Nix
32 lines
721 B
Nix
# nix/web.nix — Hermes Web Dashboard (Vite/React) frontend build
|
|
{ pkgs, hermesNpmLib, ... }:
|
|
let
|
|
src = ../web;
|
|
npmDeps = pkgs.fetchNpmDeps {
|
|
inherit src;
|
|
hash = "sha256-HWB1piIPglTXbzQHXFYHLgVZIbDb60esupXSQGa1+lI=";
|
|
};
|
|
|
|
npm = hermesNpmLib.mkNpmPassthru { folder = "web"; attr = "web"; pname = "hermes-web"; };
|
|
|
|
packageJson = builtins.fromJSON (builtins.readFile (src + "/package.json"));
|
|
version = packageJson.version;
|
|
in
|
|
pkgs.buildNpmPackage (npm // {
|
|
pname = "hermes-web";
|
|
inherit src npmDeps version;
|
|
|
|
doCheck = false;
|
|
|
|
buildPhase = ''
|
|
npx tsc -b
|
|
npx vite build --outDir dist
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
cp -r dist $out
|
|
runHook postInstall
|
|
'';
|
|
})
|