mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
fix of warning. It should be correct now
svn path=/nixpkgs/trunk/; revision=16813
This commit is contained in:
parent
024d1b7851
commit
3235c889b9
@ -52,20 +52,23 @@ rec {
|
||||
|
||||
textClosureList = predefined: arg:
|
||||
let
|
||||
warn = map (x : if isAttrs x
|
||||
then builtins.trace "warning, passing attrs to textClosureList instead of dep entry names is depreceated and may cause failure" x
|
||||
else x );
|
||||
|
||||
f = done: todo:
|
||||
if todo == [] then {result = []; inherit done;}
|
||||
else
|
||||
let entry = head todo; in
|
||||
if isAttrs entry then
|
||||
builtins.trace "warning, passing attrs to textClosureList instead of dep entry names is depreceated and may cause failure" (
|
||||
let x = f done entry.deps;
|
||||
let x = f done (warn entry.deps);
|
||||
y = f x.done (tail todo);
|
||||
in { result = x.result ++ [entry.text] ++ y.result;
|
||||
done = y.done;
|
||||
})
|
||||
}
|
||||
else if hasAttr entry done then f done (tail todo)
|
||||
else f (done // listToAttrs [{name = entry; value = 1;}]) ([(builtins.getAttr entry predefined)] ++ tail todo);
|
||||
in (f {} arg).result;
|
||||
in (f {} (warn arg)).result;
|
||||
|
||||
textClosureMap = f: predefined: names:
|
||||
concatStringsSep "\n" (map f (textClosureList predefined names));
|
||||
|
Loading…
Reference in New Issue
Block a user