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
testing
oeiuwq.com
3 months ago
81728e79
b9d4d5ca
1/1
mirror.yml
success
3s
+46
1 changed file
expand all
collapse all
unified
split
checkmate
modules
tests
aspect_assignment.nix
+46
checkmate/modules/tests/aspect_assignment.nix
reviewed
···
1
1
+
# test that an aspect tree can be used in a consumer flake
2
2
+
{ lib, targetLib, ... }:
3
3
+
{
4
4
+
5
5
+
flake.tests."test aspects can be assigned across flakes" =
6
6
+
let
7
7
+
flake-aspects-lib = import targetLib lib;
8
8
+
9
9
+
# first eval is like evaling the source flake
10
10
+
first = lib.evalModules {
11
11
+
modules = [
12
12
+
(flake-aspects-lib.new-scope "ns") # namespace
13
13
+
{
14
14
+
ns.aspects.a._.b._.c.nixos.x = [ "first" ];
15
15
+
}
16
16
+
];
17
17
+
};
18
18
+
19
19
+
# second eval is like evaling flake consuming source
20
20
+
second = lib.evalModules {
21
21
+
modules = [
22
22
+
(flake-aspects-lib.new-scope "ns") # same namespace
23
23
+
{
24
24
+
ns = first.config.ns;
25
25
+
}
26
26
+
];
27
27
+
};
28
28
+
29
29
+
third = lib.evalModules {
30
30
+
modules = [
31
31
+
(flake-aspects-lib.new-scope "ns") # same namespace
32
32
+
{
33
33
+
ns = second.config.ns;
34
34
+
}
35
35
+
];
36
36
+
};
37
37
+
38
38
+
expr = third.config.ns;
39
39
+
expected = first.config.ns;
40
40
+
in
41
41
+
builtins.break
42
42
+
{
43
43
+
inherit expected expr;
44
44
+
};
45
45
+
46
46
+
}