about summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2007-11-05 21:27:32 +0000
committerMarc Weber <marco-oweber@gmx.de>2007-11-05 21:27:32 +0000
commit0acef47d44327387aa16154f7f30dde5e6197be9 (patch)
treef3c6202e8ba78350648342db4d7a9f0f55997ed0 /pkgs/lib
parentc7cf206bdd6dbc306d53ae20de492b4acdd32c7e (diff)
downloadnixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar.gz
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar.bz2
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar.lz
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar.xz
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.tar.zst
nixlib-0acef47d44327387aa16154f7f30dde5e6197be9.zip
Is it time to uncomment mkDerivationByConfiguration and start using listToAttrs etc?
Let's try
* fixes attr -> name change in function av of unstable lib

svn path=/nixpkgs/trunk/; revision=9590
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/default-unstable.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/lib/default-unstable.nix b/pkgs/lib/default-unstable.nix
index 84f6a02cb6e2..33fb68f58578 100644
--- a/pkgs/lib/default-unstable.nix
+++ b/pkgs/lib/default-unstable.nix
@@ -187,7 +187,7 @@ rec {
   mapRecordFlatten = f : r : map (attr: f attr (builtins.getAttr attr r) ) (attrNames r);
 
   # to be used with listToAttrs (_a_ttribute _v_alue)
-  av = attr : value : { inherit attr value; };
+  av = name : value : { inherit name value; };
   # attribute set containing one attribute
   avs = attr : value : listToAttrs [ (av attr value) ];
   # adds / replaces an attribute of an attribute set
@@ -203,6 +203,7 @@ rec {
 
   mergeAttrs = fold ( x : y : x // y) {};
 
+  # returns atribute values as a list 
   flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
   mapIf = cond : f :  fold ( x : l : if (cond x) then [(f x)] ++ l else l) [];