[Nix-dev] Re: [PATCH 1/2] t/scons

Marc Weber marco-oweber at gmx.de
Tue Dec 21 22:48:53 CET 2010


Hi Peter,

> this patch changes SCons' documented behavior. The authors of the tool have
> made the conscious choice to ignore the user's shell environment, as the manual [..]

Try thinking about it in a different way:
In the past mathematicians learned about negative numbers. New case - new ways
to think about existing laws.

scons devs surely didn't know about nixos. So while writing:
  PATH= ['/usr/local/bin', '/bin', '/usr/bin']
Their intention could have been:
Allow anything which is installed using usual tools (such as apt-get).

However - there is no default location in nixos. There is no default PATH.
Thus if you read (and interpret) the documentation that way (allow any tools
which are system defaults) you have trouble to implement this intention using
NixOS.

Now we could ask the authors of the documentation what their real intention was.

My interpretation is that allowing $PATH is closer than keeping the documented
default which doesn't work at all on NixOS and is impure.

I agree that this is a subject of interpretation. If there are choices I
usually try to follow the "is more likely to work for everybody" way.
And that's not the scons default.
 
Do you personally have any use case for the default where using $PATH would
hurt?
I ask this question because if there was a wrapper - we should decide on
whether it should be the default or not.

In the end we all want to get our jobs done. Following documentation which
doesn't apply won't serve anybody - it will only waste our time.

So if you have a case which depends on the documented behaviour (PATH being
[/bin, ..] you should talk about it so that we can document it - so that nobody
is going to propose a patch (without wrapper) the way I did again.
 
If "following documentation without interpretation rather than making it
work" is common sense here I should fork and clearly write about my
vision which is make things work with least effort (which in this case
means don't add wrappers for the sake of adding wrappers only - because
they have to be learned and read about and they have to be maintained).
 
Take care as well.

Marc Weber



More information about the nix-dev mailing list