tangled
alpha
login
or
join now
oeiuwq.com
/
flake-aspects
2
fork
atom
fake.modules transposition for aspect-oriented Dendritic Nix. with cross-aspect dependencies. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
dendrix.oeiuwq.com/Dendritic.html
dendritic
nix
aspect
oriented
2
fork
atom
overview
issues
1
pulls
pipelines
map items
oeiuwq.com
4 months ago
2f059555
cee29878
+3
-10
1 changed file
expand all
collapse all
unified
split
default.nix
+3
-10
default.nix
···
1
1
lib:
2
2
let
3
3
transposeChild = child: parent: value: { inherit child parent value; };
4
4
-
5
4
accTransposed =
6
6
-
acc:
7
7
-
{
8
8
-
parent,
9
9
-
child,
10
10
-
value,
11
11
-
}:
5
5
+
acc: item:
12
6
acc
13
7
// {
14
14
-
${parent} = (acc.${parent} or { }) // {
15
15
-
${child} = value;
8
8
+
${item.parent} = (acc.${item.parent} or { }) // {
9
9
+
${item.child} = item.value;
16
10
};
17
11
};
18
18
-
19
12
eachChildAttrs = parent: lib.mapAttrsToList (transposeChild parent);
20
13
deconstruct = lib.mapAttrsToList eachChildAttrs;
21
14
reconstruct = lib.foldl accTransposed { };