swarm-ui: serve the hyperhive favicon

Same pattern frontend.nix already uses for the dashboard: the SVG
lives outside the npm tree at branding/hyperhive.svg, copied into
$out during the nix install phase (not build.mjs, so plain npm build
consumers still work, same split frontend.nix uses). Added the
matching <link rel="icon"> to index.html.
This commit is contained in:
iris 2026-08-16 17:13:55 +02:00
commit 61977514c6
3 changed files with 9 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ buildNpmPackage }:
{ buildNpmPackage, branding-svg }:
# Static build of the swarm-level UI shell (project-bootstrap scope:
# empty start page, no functionality yet — see
@ -27,7 +27,9 @@
# `npm run build --workspaces` frontend.nix runs) via an explicit
# `npm run build --workspace=…` buildPhase, so a dashboard/agent-only
# change doesn't need to rebuild (or re-review the output of) this
# derivation.
# derivation. The favicon (`branding/hyperhive.svg`, same file
# `./frontend.nix` copies for the dashboard) is likewise copied in
# during install — it lives outside the npm tree.
buildNpmPackage {
pname = "hyperhive-swarm-ui";
@ -48,6 +50,7 @@ buildNpmPackage {
runHook preInstall
mkdir -p $out
cp -r packages/swarm-ui/dist/. $out/
cp ${branding-svg} $out/favicon.svg
runHook postInstall
'';