3
0
Fork 0
forked from mirrors/nixpkgs

- 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
# 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