Hi Ludo, >>> At the API level, there’s ‘inferior-for-channels’ which does that + >>> registers a GC root + maintains a cache so that the second time you use >>> a given instance of Guix it’s immediately available. >> >> Just what I need... > > Awesome, let us know how it goes!
Not so well... If I run "guix environment" in the inferior, it's the inferior that forks and runs the specified command in the newly created environment. But the inferior doesn't have access to the tty, so this is bound to fail for running interactive commands. Unless there is some Linux magic that I am not aware of for transferring the tty temporarily to another process, the fork would thus have to happen in the main Guix process rather than in the inferior. But any scheme I can come up with for creating a profile in the inferior and using it in the main process ends up generating the same problem that I am trying to solve: the need for a temporary reference (profile or GC root) that must later be removed. Cheers, Konrad.