- 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
This commit is contained in:
Nicolas Pierron 2009-06-25 21:25:33 +00:00
parent b12683e174
commit 6c0912ee9c

View File

@ -311,8 +311,8 @@ rec {
# Divide the definitions of the attribute "attr" between # Divide the definitions of the attribute "attr" between
# declaration (isOption) and definitions (!isOption). # declaration (isOption) and definitions (!isOption).
test = partition isOption opts; test = partition (x: isOption (rmProperties x)) opts;
decls = test.right; defs = test.wrong; decls = map rmProperties test.right; defs = test.wrong;
# Make the option declaration more user-friendly by adding default # Make the option declaration more user-friendly by adding default
# settings and some verifications based on the declaration content # settings and some verifications based on the declaration content