Use __functor to simplify combinators
By using `__functor` combinators can call each other directly by using `rec` rather than needing to mapAttrs over all of the combinators to inject them into each one.
This commit is contained in:
parent
313d10b952
commit
fce1224bdd
3 changed files with 42 additions and 44 deletions
4
lib.nix
4
lib.nix
|
|
@ -6,9 +6,7 @@
|
|||
dataDirSubPath = subPath: "${dataDir}/${combinators.escape subPath}";
|
||||
};
|
||||
|
||||
combinators = lib.mapAttrs
|
||||
(_: v: v.impl combinators)
|
||||
(import ./combinators.nix { inherit pkgs lib helpers; });
|
||||
combinators = import ./combinators.nix { inherit pkgs lib helpers; };
|
||||
|
||||
initial-state = {
|
||||
name = name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue