[Nix-dev] Re: [PATCH 1/2] t/scons
Peter Simons
simons at cryp.to
Mon Jan 3 15:02:18 CET 2011
Hi Kevin,
>> The exact list of paths would be passed to the expression as a
>> parameter, so that these settings can be overridden easily. That
>> would allow us to instantiate many different variants of scons that
>> use different tools by default.
>
> This [doesn't work] if you are simply running it in a dev tree for a
> local project that does not have a nix derivation.
it appears that you have misunderstood how that solution would work. You
seem to assume that SCons would be passed a search path every time it is
run. In fact, however, SCons would be passed that search path at the time
SCons itself is being built. Those paths are subsequently hard-coded into
the SCons binary to ensure that they are set every time SCons is run. This
solution guarantees deterministic behavior regardless of whether SCons is
being run from Nix or from any other context. In particular, you'd be free
to configure SCons to search for tools in "$HOME/.nix-profile/bin", which is
what you suggested.
In other words, the solution Eelco proposed can trivially emulate yours, but
your suggestion cannot emulate Eelco's. Consequently, the approach suggested
above seems to be strictly more powerful, and thus preferable.
Take care,
Peter
More information about the nix-dev
mailing list