[Nix-dev] $out in configureFlags is not expanded

Lluís Batlle i Rossell viric at viric.name
Tue May 21 14:11:46 CEST 2013


On Tue, May 21, 2013 at 12:57:10PM +0200, Peter Simons wrote:
> Hi Lluís,
> 
>  >> Maybe it would be sufficient to document the current behavior in
>  >> more detail?
>  >
>  > Many people hit this problem, when they started using mkDerivation.
> 
> yes, that is true. I'm just not convinced that changing the semantics of
> configureFlags is the best solution for this issue. IMHO, documentation
> can improve the status quo, too, without requiring an intrusive change
> to the default builder.

Mh I think the manual mainly helps to tell people "please read the manual", when
they ask the question. ;)

>  > Can you describe what breaking cases you have in mind with that 'eval'?
> 
> For example:
> 
>   configureFlags = "--whoami-expression=$USER";
> 
>   configureFlags = "--initial-array=( 'state 1' 'state 5' )";

Are these real cases? :)

> Please don't get me wrong, though: I know that all of those problems can
> be addressed in one way or another, and we probably don't have many
> packages that use such pathological constructs. Still, I'm just not
> convinced that the issue is significant enough to warrant a change to
> the default builder.

Ok; I wouldn't mind the change; I think that few people would expect "$USER" to
not to expand to the env var value, in your first example.

And I'm not sure what would the writer of the 2nd example expect to happen.

Regards,
Lluís.


More information about the nix-dev mailing list