[Nix-dev] Re: [PATCH 1/2] t/scons
Peter Simons
simons at cryp.to
Wed Jan 5 12:35:39 CET 2011
Hi Kevin.
> * Marc's patch updated the installed SCons so that when run it would
> automatically read the user's PATH env variable for its internal
> path searching.
Yes. Please note that this patch has been superfluous from the very
beginning, because SCons doesn't have to be patched to accomplish that.
Marc has admitted himself that this patch is unnecessary.
> * Eelco proposed changing it so that the internal path searching was
> set to a set of core tools when SCons was installed.
No. Eelco rejected Marc's patch, and in the same posting went on to
point out that the default path list hard-coded into SCons is useless on
NixOS, because the directories /usr/local/bin, /usr/bin, and /bin don't
exist in our environment. To improve matters, he suggested replacing the
default path list with a set of paths that roughly corresponds to
"stdenv" in NixOS. Now, it might look like that suggestion would be
related to Marc's patch because it's been raised in the context of that
discussion, but the two topics are orthogonal, really. No-one has
suggested that Marc's patch be replaced by something else, because
Marc's patch was unnecessary to begin with. There's no need to replace
it with anything.
> I believe that Marc's patch is along the right direction for using
> SCons in a personal development tree (i.e. outside of a nix
> derivation) [...]
That may or may not be true, but the fact of the matter is that this
question is irrelevant in the context of NixOS. The authors of SCons
have made the conscious decision to ignore the contents of $PATH. It's
not our place to revert that decision, because NixOS is a
*distribution*. We didn't write SCons, we just distribute it. If you
would like to change SCons default behavior, then you are talking to the
wrong group of people. Instead, you should be talking to the authors of
SCons.
If you would like SCons to use $PATH to find build tools, then you can
do that in numerous ways. The documentation recommends adding the lines
import os
env = Environment(ENV = {'PATH' : os.environ['PATH']})
to the SConsfile, which sounds reasonable enough. Furthermore, you are
absolutely welcome create a patched version of SCons in Nix that behaves
the way you want it to, but please don't call it "scons". Instead, call
it "scons-patched" or whatever, so that other users have the chance to
distinguish your version from the pristine one.
Personally, I believe that SCons made a mistake when they provided any
default search path *at all*. The default environment ought to be empty,
really. I realize, though, that other people prefer things differently,
and so I refrain from forcing my preferred view on everyone else.
Instead, I make the necessary changes in my local nixpkgs tree. I would
respectfully request that you and Marc and everyone else who wants SCons
to behave differently than it does to do the same: please make those
changes in such a way that your preferred solution isn't forced on me.
Take care,
Peter
More information about the nix-dev
mailing list