[Nix-dev] Re: [Nix-commits] SVN commit: nix - 22084 - eelco - nixpkgs/trunk/pkgs/lib
Nicolas Pierron
nicolas.b.pierron at gmail.com
Tue Jun 1 17:43:57 CEST 2010
Hi,
On Tue, Jun 1, 2010 at 16:24, Eelco Dolstra <e.dolstra at tudelft.nl> wrote:
> Author: eelco
> Date: 2010-06-01 14:24:16 +0000 (Tue, 01 Jun 2010)
> New Revision: 22084
>
> You can view the changes in this commit at:
> https://svn.nixos.org/viewvc/nix?rev=22084&view=rev
>
> Modified:
> nixpkgs/trunk/pkgs/lib/options.nix
>
> Log:
> * Remove the mysterious `_args' attribute because it screws up the
> manual generation (causes `nixos-rebuild build-vm' evaluation to
> fail in the `networking.ifaces' option).
"_args" is used to pass the attribute set argument inside the result
of sub-options. It contains the "option" and "config" attributes and
are useful to manipulate option declarations of sub-options, like
knowing the merge function. In particular this was used in a branch
of NixOS as an attempt.
> Changes:
>
> Modified: nixpkgs/trunk/pkgs/lib/options.nix
> ===================================================================
> --- nixpkgs/trunk/pkgs/lib/options.nix 2010-06-01 12:13:59 UTC (rev 22083)
> +++ nixpkgs/trunk/pkgs/lib/options.nix 2010-06-01 14:24:16 UTC (rev 22084)
> @@ -284,7 +284,7 @@
> scrubOptionValue = x:
> if isDerivation x then { type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; }
> else if isList x then map scrubOptionValue x
> - else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) x
> + else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) (removeAttrs x ["_args"])
> else x;
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
More information about the nix-dev
mailing list