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

Eelco Dolstra eelco.dolstra at logicblox.com
Tue Jan 27 17:02:25 CET 2015


Hi,

On 27/01/15 16:58, Wout Mertens wrote:

> Nix could be extended to accept `rec { "foo.bar" = "test"; bar = ${"foo.bar"};}'?

Well, it was probably a mistake to allow string syntax for variable names in the
first place. It might be better to allow '.' to be escaped in variables names:

rec {
  foo\.bar = "test";
  bar = foo\.bar;
}

> Is this an important use case?

No, we probably don't want to promote using dots in variable names at all :-)

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


More information about the nix-dev mailing list