[Nix-dev] quoted vs unquoted urls in Nix expressions
Vladimír Čunát
vcunat at gmail.com
Sun Feb 17 15:23:39 CET 2013
On 02/17/2013 03:16 PM, Marc Weber wrote:
>> What is the difference between quoted and unquoted URLs in Nix
>> expressions? In nixpkgs the fetchurl urls are sometimes quoted and
>> sometimes not.
>
> nix has urls as native type AFAIK.
> let str = 'foo'
> let url= http://bar
>
> The latter catches typos such as http:/bar, because its not a valid URL.
> However invalid urls will be caught be the build anyway usually.
>
> Common usage interpolation is only possible with strings AFAIK:
> let url = "http://fooo-${version}";
>
> Does it make a difference? In the end: No because AFAIK nix passes urls
> and strings the same way as env vars to the builder.
>
> For completness let's also compare with file paths:
> ./bar will be turned into an absolute path. However the path is not
> passed to the builder, instead bar is copied to the store, and that
> store file is passed to the builder so that everything works as expected
> also in chroot builds (which are default now AFAIK)
Yes, these are exactly my understanding as well.
Vlada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20130217/1a883350/attachment.bin
More information about the nix-dev
mailing list