-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
33 lines (32 loc) · 1.14 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
fractalide ? import <fractalide> {}
, buffet ? fractalide.buffet
, rs ? null
, purs ? null
}:
let
inherit (buffet.pkgs.lib) attrVals recursiveUpdate;
inherit (buffet.pkgs) writeTextFile;
inherit (builtins) head;
target = if rs != null then { name = "rs"; nodes = newBuffet.nodes.rs; node = rs;}
else if purs != null then { name = "purs"; nodes = newBuffet.nodes.purs; node = purs;}
else { name = "rs"; nodes = newBuffet.nodes.rs; node = rs;};
targetNode = (head (attrVals [target.node] target.nodes));
newBuffet = {
nodes = recursiveUpdate buffet.nodes fractalNodes;
edges = buffet.edges // fractalEdges;
support = buffet.support;
imsg = buffet.imsg;
mods = buffet.mods;
pkgs = buffet.pkgs;
};
fractalEdges = import ./edges { buffet = newBuffet; };
fractalNodes = import ./nodes { buffet = newBuffet; };
fvm = import (<fractalide> + "/nodes/fvm/${target.name}") { buffet = newBuffet; };
test = writeTextFile {
name = targetNode.name;
text = "${fvm}/bin/fvm ${targetNode}";
executable = true;
};
in
{ nodes = fractalNodes; edges = fractalEdges; test = test; service = ./service.nix; }