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
|
then unwrapTerminal target
|
||||||
# ATTRS
|
# ATTRS
|
||||||
else if isAttrs target
|
else if isAttrs target
|
||||||
then target |> mapAttrs (_: value: delegate value)
|
then target
|
||||||
# FUNCTION (OR FAIL)
|
# FUNCTION (OR FAIL)
|
||||||
else
|
else
|
||||||
assert isFunction target
|
assert isFunction target
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@
|
||||||
nt,
|
nt,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit
|
||||||
|
(builtins)
|
||||||
|
attrNames
|
||||||
|
removeAttrs
|
||||||
|
;
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
(this)
|
(this)
|
||||||
mkIncludes
|
mkIncludes
|
||||||
|
|
@ -15,27 +21,29 @@
|
||||||
;
|
;
|
||||||
in {
|
in {
|
||||||
newMixture = inputs: modBuilder: let
|
newMixture = inputs: modBuilder: let
|
||||||
# parse mixture declaration structure
|
templateDecl = {
|
||||||
decl =
|
isolated = false;
|
||||||
modBuilder mixture.private
|
|
||||||
|> projectOnto
|
|
||||||
{
|
|
||||||
isolated = false;
|
|
||||||
|
|
||||||
includes = {
|
includes = {
|
||||||
public = [];
|
public = [];
|
||||||
private = [];
|
private = [];
|
||||||
protected = [];
|
protected = [];
|
||||||
};
|
|
||||||
submods = {
|
|
||||||
public = [];
|
|
||||||
private = [];
|
|
||||||
protected = [];
|
|
||||||
};
|
|
||||||
# XXX: TODO: are these needed?
|
|
||||||
# options = Terminal {};
|
|
||||||
# config = Terminal {};
|
|
||||||
};
|
};
|
||||||
|
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:
|
inputBuilder = mixture:
|
||||||
if decl.isolated
|
if decl.isolated
|
||||||
|
|
@ -61,7 +69,8 @@ in {
|
||||||
mixture = {
|
mixture = {
|
||||||
public =
|
public =
|
||||||
includes.public
|
includes.public
|
||||||
// submods.public;
|
// submods.public
|
||||||
|
// otherAttrs;
|
||||||
protected =
|
protected =
|
||||||
includes.protected
|
includes.protected
|
||||||
// submods.protected;
|
// submods.protected;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue