Fis Trivial writes: > * Problem > The exported environment variables can cause various problems in foreign > distribution(1)(2). And besides, The long list of environment variables(4) > injected into user's login shell makes the user's environment impure. A lot of software is intended to be dynamically composed with other software at run-time through the use of mechanisms like environment variables. Other mechanisms of dynamic composition at run-time also exist, such as configuration files (e.g., ~/.emacs). Consider the EDITOR environment variable, which is traditionally used to indicate the user's default text editor. We COULD try to control the EDITOR environment variable with Guix, but then you would have to update your Guix profile every time you wanted to change your default text editor. It would be "more pure," but less convenient. To a certain extent, I think it is desirable (and unavoidable?) to use these mechanisms to dynamically configure and compose software. However, sometimes you can still let Guix control the environment variables without making it inconvenient, and without letting the environment variables set by Guix "leak" into the user's environment. For example, you can wrap programs in a script that sets their environment variables explicitly, rather than relying on the environment variables being set correctly by the user. Guix does this already for a variety of packages (see the "asunder" package for a simple example). For more information, check out section 7.1.1 "Principles" of the the Nix thesis [1]. The entire section surrounding that phrase is also relevant and interesting. Footnotes: [1] https://nixos.org/~eelco/pubs/phd-thesis.pdf -- Chris