[Nix-dev] nix-env --arg

Vladimír Čunát vcunat at gmail.com
Thu Jun 13 20:25:59 CEST 2013


Hi.

On 06/13/2013 01:58 PM, raffalli at univ-savoie.fr wrote:
> I am trying to add an optional arguments "withKerberos" to openssh and there is something I do not understand with nix-env.
>
> If I first to "nix-env -i openssh --arg withKerberos false"
>
> and then "nix-env -i openssh --arg withKerberos true"
>
> Then openssh is not replaced. It seems that the hash do not depends on argument ?
> How can I fix this ?

I think that "nix-env -iA openssh --arg withKerberos false" should be 
the way. IMO --arg only makes sense with attribute paths.

> Another related question: how should we make this kind of options visible from the end user ?
> Adding something in all-packages.nix ?

One could add the other version to all-packages.nix, but that's probably 
redundant. Most people will be satisfied by a well-chosen default, and 
the rest can override it in ~/.nixpkgs/config.nix or similar.


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/20130613/323ff3d8/attachment-0001.bin 


More information about the nix-dev mailing list