Fix NixOS evaluation. As I understand, configuration gets added to the list of modules as an attrSet (not as a file name). Just add a trivial check to passthrough such modules.

svn path=/nixpkgs/trunk/; revision=17116
This commit is contained in:
Michael Raskin 2009-09-14 20:10:41 +00:00
parent da09a4e950
commit b98b622ef0

View File

@ -64,8 +64,10 @@ rec {
moduleClosure = initModules: args:
let
moduleImport = m: lib.addErrorContext "Import module ${m}." (
(unifyModuleSyntax (applyIfFunction (import m) args)) // {
moduleImport = m: lib.addErrorContext
"Import module ${(if builtins.isAttrs m then "{...}" else m)}." (
(unifyModuleSyntax (applyIfFunction
(if builtins.isAttrs m then m else import m) args)) // {
# used by generic closure to avoid duplicated imports.
key = m;
paths = [ m ];
@ -88,4 +90,4 @@ rec {
[ m ]
) modules;
}
}