From 13f467fc842b0e0f0abed77aa63ad2e565c2c61c Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sat, 26 Sep 2009 23:01:35 +0000 Subject: 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 --- pkgs/lib/modules.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkgs/lib/modules.nix') diff --git a/pkgs/lib/modules.nix b/pkgs/lib/modules.nix index 9716696cc0b..c29d2870d98 100644 --- a/pkgs/lib/modules.nix +++ b/pkgs/lib/modules.nix @@ -211,14 +211,15 @@ rec { declarations = map (m: { source = m.key; - value = m.options; }) (declarationsOf name); definitions = map (m: { source = m.key; - value = m.config; }) (definitionsOf name); + + config = builtins.tryEval + (lib.getAttr name result.config); } else if all isAttrs values then (recurseInto name modules).options -- cgit 1.4.1