[Nix-dev] Nix syntax surprise.

Kevin Cox kevincox at kevincox.ca
Fri Jun 24 13:49:47 CEST 2016


On 24/06/16 05:58, Guillaume Maudoux (Layus) wrote:
> Hi,
> 
> Does someone understand why the following nix expression is invalid ?
> 
> |[ let a = 10; in { b = "a = ${a}"; } ] |
> 
> Running |nix-instantiate --eval ./bug.nix --strict| gives |error: syntax
> error, unexpected ID, expecting '{', at /home/layus/bug.nix:3:5|.
> 
> The manual says nothing about this in the “let expressions” section.
> 

Most often if you have non-trivial expressions in a list you need to put
them in brackets. I know this doesn't specifically answer your question
but I consider it a good practice.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160624/e5181e2c/attachment.sig>


More information about the nix-dev mailing list