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:
parent
d48cc83dcb
commit
5cdf51fcfc
1 changed files with 80 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue