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

testing

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