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