Watch
0
0
Fork
You've already forked hyperhive
0

archetypes: each built-in archetype ships an icon

reviewer, android-dev and reverse-engineer set services.hyperhive.agent.icon, with
lib.mkDefault, to an SVG under nix/archetypes/icons, so an agent built from one
shows an icon in the swarm UI until its config sets another. The archetype
module-eval check requires an svg icon on each.
This commit is contained in:
iris 2026-11-11 02:18:13 +01:00 • committed by mara
commit 5cdf51fcfc

View file

@ -291,7 +291,7 @@ let
# output and prints it as JSON. A derivation or a path in `meta` would
# make that evaluation build or copy something; a function would not
# print at all.
name = "the built-in archetypes carry a module and a meta of plain data, and reviewer can run commands and android-dev installs its toolchain and reverse-engineer turns rea on";
name = "the built-in archetypes carry a module and a meta of plain data, and reviewer can run commands and android-dev installs its toolchain and reverse-engineer turns rea on, and each sets an svg icon as a default";
ok =
let
plain =
@ -316,8 +316,13 @@ let
&& !(lib.elem "meta" reviewer)
&&
lib.elem pkgs.android-tools
(archetypes.android-dev.module { inherit pkgs; }).environment.systemPackages
&& archetypes.reverse-engineer.module.services.hyperhive.agent.rea.enable;
(archetypes.android-dev.module { inherit pkgs lib; }).environment.systemPackages
&& (archetypes.reverse-engineer.module { inherit lib; }).services.hyperhive.agent.rea.enable
&& lib.all (icon: lib.hasSuffix ".svg" (toString icon.content)) [
(archetypes.reviewer.module { inherit lib; }).services.hyperhive.agent.icon
(archetypes.android-dev.module { inherit pkgs lib; }).services.hyperhive.agent.icon
(archetypes.reverse-engineer.module { inherit lib; }).services.hyperhive.agent.icon
];
}
{
# `docs.enable` reads `docs.source`, whose default builds from the