Excerpts from Yury G. Kudryashov's message of Thu Dec 23 10:21:52 +0100 2010:
> > Then you have to look it up. Then you try to write your first scons
> > build script and the result will be "gcc not found".
> No since NIX_SCONS_PATH is set to NIX_PROFILES/bin:NIX_PROFILES/sbin.
So you have to create two wrappers:
1) is installed into your user env (which would set NIX_SCONS_PATH to
NIX_PROFILES the way you suggested)
2) is to be used in derivations (eg for building blender or the like).
In this case you don't want to point to /var/run/current-system (which
is part of NIX_PROFILES !)
Looking at bashrc.sh (nixos)
for i in $NIX_PROFILES; do # !!! reverse
export PATH=$i/bin:$i/sbin:$i/lib/kde4/libexec${PATH:+:}$PATH
reveals that your suggestion is very close to using $PATH in the first
place .. and that is what the patch was about.
So if you introduced NIX_SCONS_PATH it should default to PATH so that
you don't have to create those wrappers. And then setting it is as much
work as wrapping scons by scons_clean(){ ( PATH= ... ~/.nix-profile/scons "$@";
); }
So I still think that the additional env var only adds code nobody would
be using.
Marc Weber
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev