Fix mkThenElse and mkAlways evaluation.

svn path=/nixpkgs/trunk/; revision=14528
This commit is contained in:
Nicolas Pierron 2009-03-14 07:20:31 +00:00
parent de8bbafb53
commit f624a70ee7

View file

@ -482,12 +482,12 @@ rec {
# evaluate the condition.
if isThenElse p then
if condition then
foldProperty (a: p.thenPart) id content
copyProperties content p.thenPart
else
foldProperty (a: p.elsePart) id content
copyProperties content p.elsePart
# ignore the condition.
else if isAlways p then
foldProperty (a: p.value) id content
copyProperties content p.value
# otherwise (isIf)
else
evalIf content (condition && p.condition) (tail list);