Fix the merge function of the "attrsOf" type: handle multiple of the same
attribute name. svn path=/nixpkgs/trunk/; revision=17297
This commit is contained in:
parent
8515a7fa68
commit
dc8f469349
@ -87,7 +87,7 @@ rec {
|
||||
name = "attribute set of ${elemType}s";
|
||||
check = x: lib.traceValIfNot builtins.isAttrs x
|
||||
&& fold (e: v: v && elemType.check e) true (lib.attrValues x);
|
||||
merge = fold lib.mergeAttrs {};
|
||||
merge = lib.zip elemType.merge;
|
||||
iter = f: path: set: lib.mapAttrs (name: elemType.iter f (path + "." + name)) set;
|
||||
fold = op: nul: set: fold (e: l: elemType.fold op l e) nul (lib.attrValues set);
|
||||
docPath = path: elemType.docPath (path + ".<name>");
|
||||
|
Loading…
Reference in New Issue
Block a user