* Fix a comparison of function values (disallowed in the Nix trunk).

Thanks to Nicolas.

svn path=/nixpkgs/trunk/; revision=15734
This commit is contained in:
Eelco Dolstra 2009-05-26 16:00:30 +00:00
parent 3c21e81203
commit 8b52e84e1a

View File

@ -194,16 +194,16 @@ rec {
in cfg3;
getRequire = x: toList (attrByPath ["require"] [] (preprocess x));
getRecusiveRequire = x:
getRecursiveRequire = x:
fold (cfg: l:
if isPath cfg then
[ cfg ] ++ l
else
[ cfg ] ++ (getRecusiveRequire cfg) ++ l
[ cfg ] ++ (getRecursiveRequire cfg) ++ l
) [] (getRequire x);
getRequireSets = x: filter (x: ! isPath x) (getRecusiveRequire x);
getRequirePaths = x: filter isPath (getRecusiveRequire x);
getRequireSets = x: filter (x: ! isPath x) (getRecursiveRequire x);
getRequirePaths = x: filter isPath (getRecursiveRequire x);
rmRequire = x: removeAttrs (preprocess x) ["require"];
inlineRequiredSets = cfgs:
@ -211,9 +211,7 @@ rec {
in
merge "" (
map rmRequire (
inlineRequiredSets (
lib.uniqFlatten getRequirePaths [] [] (toList opts)
)
inlineRequiredSets ((toList opts) ++ lib.uniqFlatten getRequirePaths [] [] (lib.concatMap getRequirePaths (toList opts)))
)
);