David Thompson <dthomps...@worcester.edu> skribis: > I don't think it's something "wrong" with your files, really, but it is > incompatible with the way 'guix environment' currently operates. > > I took another look at nix-build to see how they do things. They create > a bashrc file in a temporary directory and run bash (or whatever > $NIX_BUILD_SHELL is) with the '--rcfile' flag so that the user's bashrc > isn't used. We could do something similar, but right now I don't have > any reason to believe that all shells accept an '--rcfile' option, so it > could easily break other setups.
POSIX specifies the ‘ENV’ environment variable for that: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html So that’s one thing that could be used. Apparently Bash checks ‘BASH_ENV’ instead, unless invoked as ‘sh’ (info "(bash) Bash Startup Files"). In the longer run, another option would be to have a Bash built-in command, in the form of a plug-in loaded with ‘enable FOO.so’, that would modify the environment variables of the running Bash process (recutils has an example of that.) My 2¢, Ludo’.