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

update checkmate (#17)

authored by oeiuwq.com and committed by

GitHub c929345a 9efdc393

+12 -17
+10 -7
checkmate.nix checkmate/modules/tests.nix
··· 3 perSystem = 4 { lib, ... }: 5 let 6 - transpose = import ./nix { inherit lib; }; 7 8 mkFlake = 9 mod: ··· 14 { 15 systems = [ ]; 16 imports = [ 17 - ./nix/flakeModule.nix 18 inputs.flake-parts.flakeModules.modules 19 mod 20 (fooMod "aspectOne") ··· 75 76 new-scope."test usage without flakes" = 77 let 78 - flake-aspects-lib = import ./nix/lib.nix lib; 79 # first eval is like evaling the flake. 80 first = lib.evalModules { 81 modules = [ ··· 124 { 125 systems = [ ]; 126 imports = [ 127 - ./nix/flakeModule.nix 128 inputs.flake-parts.flakeModules.modules 129 ]; 130 }; ··· 424 aspect.name 425 message 426 class 427 - ] ++ (lib.map (x: x.name) aspect-chain); 428 }; 429 aspectTwo.classOne.bar = [ "itself not included" ]; 430 }; ··· 455 __functor = aspect: { 456 includes = [ 457 { classOne.bar = [ "from-functor" ]; } 458 - ] ++ map (f: f { message = "hello"; }) aspect.includes; 459 }; 460 }; 461 aspectTwo.__functor = ··· 489 __functor = aspect: { 490 includes = [ 491 { classOne.bar = [ "from-functor" ]; } 492 - ] ++ map (f: f { message = "hello"; }) aspect.includes; 493 }; 494 }; 495 aspectTwo =
··· 3 perSystem = 4 { lib, ... }: 5 let 6 + transpose = import ../../nix { inherit lib; }; 7 8 mkFlake = 9 mod: ··· 14 { 15 systems = [ ]; 16 imports = [ 17 + ../../nix/flakeModule.nix 18 inputs.flake-parts.flakeModules.modules 19 mod 20 (fooMod "aspectOne") ··· 75 76 new-scope."test usage without flakes" = 77 let 78 + flake-aspects-lib = import ../../nix/lib.nix lib; 79 # first eval is like evaling the flake. 80 first = lib.evalModules { 81 modules = [ ··· 124 { 125 systems = [ ]; 126 imports = [ 127 + ../../nix/flakeModule.nix 128 inputs.flake-parts.flakeModules.modules 129 ]; 130 }; ··· 424 aspect.name 425 message 426 class 427 + ] 428 + ++ (lib.map (x: x.name) aspect-chain); 429 }; 430 aspectTwo.classOne.bar = [ "itself not included" ]; 431 }; ··· 456 __functor = aspect: { 457 includes = [ 458 { classOne.bar = [ "from-functor" ]; } 459 + ] 460 + ++ map (f: f { message = "hello"; }) aspect.includes; 461 }; 462 }; 463 aspectTwo.__functor = ··· 491 __functor = aspect: { 492 includes = [ 493 { classOne.bar = [ "from-functor" ]; } 494 + ] 495 + ++ map (f: f { message = "hello"; }) aspect.includes; 496 }; 497 }; 498 aspectTwo =
-1
checkmate/.gitignore
··· 1 - flake.lock
···
-7
checkmate/flake.nix
··· 1 - { 2 - inputs.target.url = "path:.."; 3 - inputs.checkmate.url = "github:vic/checkmate"; 4 - inputs.checkmate.inputs.target.follows = "target"; 5 - inputs.flake-parts.url = "github:hercules-ci/flake-parts"; 6 - outputs = inputs: inputs.checkmate.lib.newFlake; 7 - }
···
+2 -2
nix/types.nix
··· 93 type = lib.types.functionTo providerType; 94 default = 95 aspect: 96 - # deadnix: skip 97 { class, aspect-chain }: 98 - aspect; 99 }; 100 options.modules = lib.mkOption { 101 internal = true;
··· 93 type = lib.types.functionTo providerType; 94 default = 95 aspect: 96 { class, aspect-chain }: 97 + # silence nixf-diagnose :/ 98 + if true || (class aspect-chain) then aspect else aspect; 99 }; 100 options.modules = lib.mkOption { 101 internal = true;