nixfmt
nixfmt copied to clipboard
Quotes should be allowed after `inherit`
Consider this default.nix
file:
rec {
first."hello/there" = 123;
second = { inherit (first) "hello/there"; };
}
It is valid:
$ nix-instantiate --eval default.nix -A second.hello/there
123
But with nixfmt
, I get:
$ nixfmt default.nix
default.nix:3:30:
|
3 | second = { inherit (first) "hello/there"; };
| ^
unexpected '"'
expecting expression
I have found a very similar issue to this one. Dollar-sign after inherit:
rec {
first.${"hello"} = 123;
second = { inherit (first) ${"hello"}; };
}
$ nixfmt default.nix
default.nix:3:30:
|
3 | second = { inherit (first) ${"hello"}; };
| ^
unexpected '$'
expecting expression
Another example:
rec {
first."hello.there" = 123;
second = { inherit (first) "hello.there"; };
}
default.nix:3:30:
|
3 | second = { inherit (first) "hello.there"; };
| ^
unexpected '"'
expecting expression