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
wip/yesman
Michael Raskin 15 years ago
parent da09a4e950
commit b98b622ef0
  1. 8
      pkgs/lib/modules.nix

@ -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;
}
}

Loading…
Cancel
Save