[Nix-dev] Re: ${out}

Yury G. Kudryashov urkud+nix at ya.ru
Sun Apr 11 14:56:25 CEST 2010


Yury G. Kudryashov wrote:

> Hi!
> 
> Currently if I write configureParams="--some-param=\${out}/subpath", it
> results in ./configure '--some-param=${out}/subpath' call. Sometimes it
> leads to unexpanded ${out} strings in the binary.
> 
> What do you think about expanding ${out} (or @out@) in all environment
> strings that Nix passes to the builder?

Somebody have answered to me instead of list. Sorry, I've removed the e-mail 
before reading From: field (I thought that he answered both to me and to the 
list, and I'll read the answer in gmane).

OTOH, I've read the message body:
> ${out} is a builder environment variable, not nix expression variable.
I know this. But when Nix creates the environment for the builder, it 
already knows the value of ${out}, and Nix can replace all occurences of 
${out} or @out@ in the environment with the actual /nix/store/hash-name-
version string. This is my proposal.

In this case configureFlags="\${out}" will result in configureFlags="${out}" 
in .drv file, and will be replaces with /nix/store/path in the environment.




More information about the nix-dev mailing list