From dc8f469349bb2096865a1ae9ed89c52f98cc3cfc Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sun, 20 Sep 2009 10:29:06 +0000 Subject: [PATCH] Fix the merge function of the "attrsOf" type: handle multiple of the same attribute name. svn path=/nixpkgs/trunk/; revision=17297 --- pkgs/lib/types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/lib/types.nix b/pkgs/lib/types.nix index 7e164f30764c..d3cd99847dbc 100644 --- a/pkgs/lib/types.nix +++ b/pkgs/lib/types.nix @@ -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 + ".");