summary refs log tree commit diff
path: root/pkgs/lib/misc.nix
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2009-09-24 18:22:33 +0000
committerMarc Weber <marco-oweber@gmx.de>2009-09-24 18:22:33 +0000
commit15afc2fa04e8f71796ae9081bd5139dde160179e (patch)
tree50a93279b6fbd3476341efe87619cc384e69c5f5 /pkgs/lib/misc.nix
parent4d41884f8eed6ec912321c3800608f8f10c6ef8f (diff)
downloadnixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar.gz
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar.bz2
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar.lz
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar.xz
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.tar.zst
nixpkgs-15afc2fa04e8f71796ae9081bd5139dde160179e.zip
fix mergeAttrsWithFunc (also merge in names which are only in the snd attrs)
svn path=/nixpkgs/trunk/; revision=17406
Diffstat (limited to 'pkgs/lib/misc.nix')
-rw-r--r--pkgs/lib/misc.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix
index f09ab33f721..fc3bf2ce7cc 100644
--- a/pkgs/lib/misc.nix
+++ b/pkgs/lib/misc.nix
@@ -264,7 +264,7 @@ rec {
     fold (n: set : if (__hasAttr n set) 
                         then setAttr set n (f (__getAttr n set) (__getAttr n set2))
                         else set )
-           set1 (__attrNames set2);
+           (set2 // set1) (__attrNames set2);
 
   # merging two attribute set concatenating the values of same attribute names
   # eg { a = 7; } {  a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }