permit otherAttrs
This commit is contained in:
parent
fdc85fb3ff
commit
42ac41ae15
2 changed files with 30 additions and 21 deletions
|
|
@ -72,7 +72,7 @@ in rec {
|
|||
then unwrapTerminal target
|
||||
# ATTRS
|
||||
else if isAttrs target
|
||||
then target |> mapAttrs (_: value: delegate value)
|
||||
then target
|
||||
# FUNCTION (OR FAIL)
|
||||
else
|
||||
assert isFunction target
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@
|
|||
nt,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
removeAttrs
|
||||
;
|
||||
|
||||
inherit
|
||||
(this)
|
||||
mkIncludes
|
||||
|
|
@ -15,27 +21,29 @@
|
|||
;
|
||||
in {
|
||||
newMixture = inputs: modBuilder: let
|
||||
# parse mixture declaration structure
|
||||
decl =
|
||||
modBuilder mixture.private
|
||||
|> projectOnto
|
||||
{
|
||||
isolated = false;
|
||||
templateDecl = {
|
||||
isolated = false;
|
||||
|
||||
includes = {
|
||||
public = [];
|
||||
private = [];
|
||||
protected = [];
|
||||
};
|
||||
submods = {
|
||||
public = [];
|
||||
private = [];
|
||||
protected = [];
|
||||
};
|
||||
# XXX: TODO: are these needed?
|
||||
# options = Terminal {};
|
||||
# config = Terminal {};
|
||||
includes = {
|
||||
public = [];
|
||||
private = [];
|
||||
protected = [];
|
||||
};
|
||||
submods = {
|
||||
public = [];
|
||||
private = [];
|
||||
protected = [];
|
||||
};
|
||||
# XXX: TODO: are these needed?
|
||||
# options = Terminal {};
|
||||
# config = Terminal {};
|
||||
};
|
||||
|
||||
# parse mixture declaration structure
|
||||
decl' = modBuilder mixture.private;
|
||||
decl = decl' |> projectOnto templateDecl;
|
||||
|
||||
otherAttrs = removeAttrs decl' (attrNames templateDecl);
|
||||
|
||||
inputBuilder = mixture:
|
||||
if decl.isolated
|
||||
|
|
@ -61,7 +69,8 @@ in {
|
|||
mixture = {
|
||||
public =
|
||||
includes.public
|
||||
// submods.public;
|
||||
// submods.public
|
||||
// otherAttrs;
|
||||
protected =
|
||||
includes.protected
|
||||
// submods.protected;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue