Remove values coming from the original sources because this may cause the evaluation of unsafe code.

Instead add the computed value under tryEval to catch bad evaluations.

svn path=/nixpkgs/trunk/; revision=17453
This commit is contained in:
Nicolas Pierron 2009-09-26 23:01:35 +00:00
parent b642db4d0e
commit 13f467fc84
1 changed files with 3 additions and 2 deletions

View File

@ -211,14 +211,15 @@ rec {
declarations = declarations =
map (m: { map (m: {
source = m.key; source = m.key;
value = m.options;
}) (declarationsOf name); }) (declarationsOf name);
definitions = definitions =
map (m: { map (m: {
source = m.key; source = m.key;
value = m.config;
}) (definitionsOf name); }) (definitionsOf name);
config = builtins.tryEval
(lib.getAttr name result.config);
} }
else if all isAttrs values then else if all isAttrs values then
(recurseInto name modules).options (recurseInto name modules).options