[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17116 - raskin - nixpkgs/trunk/pkgs/lib

Nicolas Pierron nicolas.b.pierron at gmail.com
Mon Sep 14 22:33:32 CEST 2009


On Mon, Sep 14, 2009 at 22:10, Michael Raskin <7c6f434c at mail.ru> wrote:
> 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.

There is nothing to fix here !

Configurations are no longer plain attribute set because attribute set
cannot be compared safely even as pointer as it was done first.

> Modified: nixpkgs/trunk/pkgs/lib/modules.nix
> ===================================================================
> --- nixpkgs/trunk/pkgs/lib/modules.nix  2009-09-14 19:14:56 UTC (rev 17115)
> +++ nixpkgs/trunk/pkgs/lib/modules.nix  2009-09-14 20:10:41 UTC (rev 17116)
> @@ -64,8 +64,10 @@
>
>   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 ];




-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
A borderless war is along the way! Do you copy?



More information about the nix-dev mailing list