mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
- 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:
parent
b12683e174
commit
6c0912ee9c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user