David Thompson <[email protected]> skribis: > I started working on this. As a test, I wrote a script that loads a > list of packages from a file, builds them, and then outputs the search > paths. One crucial search path is missing though: PATH.
The reason why it’s missing is that, search path specifications are attached to packages, but there’s no obvious package to attach ‘PATH’ to. However, it would be easy, and perhaps desirable, to change ‘search-path-environment-variables’ in package.scm to do that. > Should 'guix environment' create a new profile with all of the > necessary packages in it? IIRC, nix shell doesn't do this, but I > don't fully understand why and how. The thing is, all the packages in question must be registered as GC roots, at least for the duration of the shell session (otherwise they could disappear.) The easiest way to do that is to build a profile, and then register this profile as a GC root (like what ‘guix build -r’ does.) Another option would be to keep the connection to the daemon open (this is possible if and only if ‘guix environment’ spawns the shell by itself.) Not so great, though. HTH, Ludo’.
