diff options
Diffstat (limited to 'nixpkgs/lib/types.nix')
-rw-r--r-- | nixpkgs/lib/types.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixpkgs/lib/types.nix b/nixpkgs/lib/types.nix index a0be2ff3a452..c2532065d7ea 100644 --- a/nixpkgs/lib/types.nix +++ b/nixpkgs/lib/types.nix @@ -192,6 +192,12 @@ rec { else (listOf anything).merge; # This is the type of packages, only accept a single definition stringCoercibleSet = mergeOneOption; + lambda = loc: defs: arg: anything.merge + (loc ++ [ "<function body>" ]) + (map (def: { + file = def.file; + value = def.value arg; + }) defs); # Otherwise fall back to only allowing all equal definitions }.${commonType} or mergeEqualOption; in mergeFunction loc defs; |