From 6c0912ee9ce1558bfebcd73a08c6bb8ae42e4676 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Thu, 25 Jun 2009 21:25:33 +0000 Subject: [PATCH] - partition based on the content of the properties. (rmProperties * isOption) - Do not eval properties on option declarations. -> mkIf does not mask option declarations if the condition is evaluated to false. svn path=/nixpkgs/trunk/; revision=16043 --- pkgs/lib/options.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index 11e94507acf..1d6b7061473 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -311,8 +311,8 @@ rec { # Divide the definitions of the attribute "attr" between # declaration (isOption) and definitions (!isOption). - test = partition isOption opts; - decls = test.right; defs = test.wrong; + test = partition (x: isOption (rmProperties x)) opts; + decls = map rmProperties test.right; defs = test.wrong; # Make the option declaration more user-friendly by adding default # settings and some verifications based on the declaration content