[Nix-dev] Can recursive attribute sets refer to quoted attributes?

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Jan 26 12:58:01 CET 2015


Hi,

On 26/01/15 10:55, Peter Simons wrote:

> consider the following recursive attribute set:
> 
>     rec
>     {
>       "foo.bar" = "test";
>     }
> 
> Is there any way to refer to "foo.bar" within that set? 

No, except by giving the entire set a name, e.g.

  let attrs = rec { "foo.bar" = ...; x = attrs."foo.bar"; }; in attrs

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list