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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to