about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2008-08-27 13:58:36 +0000
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2008-08-27 13:58:36 +0000
commitae163f596e369abb9679d0efd2b1a782979a6cb1 (patch)
treea1b3946a43ac2078616cc64ef4f4e6c2cc767237
parent649ccdd2db16b209338b1903766fd86800bee27a (diff)
downloadnixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar.gz
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar.bz2
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar.lz
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar.xz
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.tar.zst
nixlib-ae163f596e369abb9679d0efd2b1a782979a6cb1.zip
Replace "finalReference" prefix by "fix".
svn path=/nixpkgs/trunk/; revision=12740
-rw-r--r--pkgs/lib/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index 8b5548bd6d82..c9bb59875d5d 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -324,9 +324,11 @@ rec {
     ) { right = []; wrong = []; };
 
   # Take a function and evaluate it with its own returned value.
-  finalReference = f:
+  fix = f:
     (rec { result = f result; }).result;
 
+  finalReference = fix; # bad name
+
   # flatten a list of sets returned by 'f'.
   # f      : function to evaluate each set.
   # attr   : name of the attribute which contains more values.
@@ -427,7 +429,7 @@ rec {
   # Evaluate a list of option sets that would be merged with the
   # function "merge" which expects two arguments.  The attribute named
   # "require" is used to imports option declarations and bindings.
-  finalOptionSetsFun = merge: pkgs: opts:
+  fixOptionSetsFun = merge: pkgs: opts:
     let optionSet = final: configFun:
       if __isFunction configFun then configFun pkgs final
       else configFun; # backward compatibility.
@@ -437,8 +439,11 @@ rec {
           (uniqFlattenAttr (optionSet final) "require" [] (toList opts))
         );
 
-  finalReferenceOptionSets = merge: pkgs: opts:
-    finalReference (finalOptionSetsFun merge pkgs opts);
+  fixOptionSets = merge: pkgs: opts:
+    fix (fixOptionSetsFun merge pkgs opts);
+
+  finalOptionSetsFun = fixOptionSetsFun;
+  finalReferenceOptionSets = fixOptionSets;
 
   optionAttrSetToDocList = (l: attrs:
     (if (getAttr ["_type"] "" attrs) == "option" then