permit otherAttrs

This commit is contained in:
Emile Clark-Boman 2026-02-09 17:51:15 +10:00
parent fdc85fb3ff
commit 42ac41ae15
2 changed files with 30 additions and 21 deletions

View file

@ -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

View file

@ -3,6 +3,12 @@
nt, nt,
... ...
}: let }: let
inherit
(builtins)
attrNames
removeAttrs
;
inherit inherit
(this) (this)
mkIncludes mkIncludes
@ -15,11 +21,7 @@
; ;
in { in {
newMixture = inputs: modBuilder: let newMixture = inputs: modBuilder: let
# parse mixture declaration structure templateDecl = {
decl =
modBuilder mixture.private
|> projectOnto
{
isolated = false; isolated = false;
includes = { includes = {
@ -37,6 +39,12 @@ in {
# config = 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
then inputs // {this = mixture;} then inputs // {this = mixture;}
@ -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;