summary refs log tree commit diff
path: root/pkgs/lib/default.nix
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2008-12-02 12:28:45 +0000
committerMarc Weber <marco-oweber@gmx.de>2008-12-02 12:28:45 +0000
commita7e33ec60c10dd01309c006bfab407f209342971 (patch)
tree2dae85527ed7cca7a2ec210bd73b6044dbb7ea52 /pkgs/lib/default.nix
parent9e7846d21425115a442a8d60c441fa15a70cb249 (diff)
downloadnixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar.gz
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar.bz2
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar.lz
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar.xz
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.tar.zst
nixlib-a7e33ec60c10dd01309c006bfab407f209342971.zip
updates: istanbul starts without errors. But no window appears.
svn path=/nixpkgs/trunk/; revision=13554
Diffstat (limited to 'pkgs/lib/default.nix')
-rw-r--r--pkgs/lib/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index e523e25416b8..358438b6b459 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -57,7 +57,7 @@ rec {
       ( y : y //
         {
           fun = z : applyAndFun f merge (fixed: merge (takeFix fixed) z);
-          funMerge = z : applyAndFun f merge (fixed: let e = takeFix fixed; in e // merge e z);
+          funMerge = z : applyAndFun f merge (fixed: let e = takeFix fixed; in merge e (merge e z));
         } );
   mergeOrApply = merge : x : y : if (__isFunction y) then  y x else merge x y;
 
@@ -732,11 +732,11 @@ rec {
             )
       )
     ];
-  mergeAttrsByFunc = fold mergeAttrByFunc {};
+  mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; };
   # sane defaults (same name as attr name so that inherit can be used)
   mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; }
     listToAttrs (map (n : nv n concatList) [ "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ])
-    // listToAttrs (map (n : nv n mergeAttr) [ "passthru" "meta" ]);
+    // listToAttrs (map (n : nv n mergeAttr) [ "passthru" "meta" "cfg" "flags" ]);
 
   # returns atribute values as a list 
   flattenAttrs = set : map ( attr : builtins.getAttr attr set) (attrNames set);
@@ -779,6 +779,8 @@ rec {
   # additional data from flags depending on config settings
   # It's used in composableDerivation in all-packages.nix. It's also used
   # heavily in the new python and libs implementation
+  #
+  # should we check for misspelled cfg options?
   prepareDerivationArgs = args:
     let args2 = { cfg = {}; flags = {}; } // args;
         flagName = name : "${name}Support";
@@ -793,7 +795,7 @@ rec {
                   else throw "assertion of flag ${a} of derivation ${args.name} failed"
                ) args2.flags );
     in removeAttrs
-      (mergeAttrsByFunc ([args] ++ opts))
+      (mergeAttrsByFuncDefaults ([args] ++ opts))
       ["flags" "cfg" "mergeAttrBy" "fixed" ]; # fixed may be passed as fix argument or such
   # supportFlag functions for convinience
   sFlagEnable = { name, buildInputs ? [], propagatedBuildInputs ? [] } : {