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
cleanup
oeiuwq.com
4 months ago
55e9b8a3
7a945c85
+13
-13
2 changed files
expand all
collapse all
unified
split
checkmate.nix
nix
types.nix
+9
-11
checkmate.nix
···
401
401
flake.aspects =
402
402
{ aspects, ... }:
403
403
{
404
404
-
aspectOne =
405
405
-
{ aspect, ... }:
406
406
-
{
407
407
-
classOne.bar = [ "should-not-be-present" ];
408
408
-
includes = [ aspects.aspectTwo ];
409
409
-
__functor = _: {
410
410
-
includes = [
411
411
-
{ classOne.bar = [ "from-functor" ]; }
412
412
-
] ++ map (f: f { message = "hello"; }) aspect.includes;
413
413
-
};
404
404
+
aspectOne = {
405
405
+
classOne.bar = [ "should-not-be-present" ];
406
406
+
includes = [ aspects.aspectTwo ];
407
407
+
__functor = aspect: {
408
408
+
includes = [
409
409
+
{ classOne.bar = [ "from-functor" ]; }
410
410
+
] ++ map (f: f { message = "hello"; }) aspect.includes;
414
411
};
412
412
+
};
415
413
aspectTwo.__functor =
416
416
-
_:
414
414
+
_aspect:
417
415
{ message }:
418
416
{
419
417
classOne.bar = [ message ];
+4
-2
nix/types.nix
···
82
82
visible = false;
83
83
description = "Functor to default provider";
84
84
type = lib.types.functionTo providerType;
85
85
-
default = _: aspect.provides.itself;
85
85
+
default = aspect: aspect.provides.itself;
86
86
};
87
87
options.resolve = lib.mkOption {
88
88
internal = true;
···
95
95
class,
96
96
aspect-chain ? [ ],
97
97
}:
98
98
-
resolve class aspect-chain (aspect.__functor aspect { inherit class aspect-chain; });
98
98
+
resolve class aspect-chain (aspect {
99
99
+
inherit class aspect-chain;
100
100
+
});
99
101
};
100
102
}
101
103
);