guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Profiles/manifests-related command line interface enhancements


From: Pierre Neidhardt
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Thu, 31 Oct 2019 12:38:22 +0100

> --8<---------------cut here---------------start------------->8---
> GUIX_PROFILE=/path/to/profile ; . $GUIX_PROFILE/etc/profile
> --8<---------------cut here---------------end--------------->8---

If we want to activate a profile in a subshell, it would be enough to
add a `--profile` argument to `guix environment`, wouldn't it?

--8<---------------cut here---------------start------------->8---
guix environment --profile=/path/to/profile
--8<---------------cut here---------------end--------------->8---

It's simpler and hides the implementation details.

Better: support _multiple profiles_ so that we can compose environments
more easily.

Regarding the shell functions to activate a profile: I think with the
above it would not be really useful beyond the ~/.bash_profile settings.
So documenting the required snippet for ~/.bash_profile would be enough.

I can think of just one case where `guix environment' does not work:
Emacs' Eshell.  Here we could provide an Emacs function (maybe in
emacs-guix.el?) to load a profile.  Note that every eshell has a
let-bound `process-environment`, so activating a profile in an Eshell
only affects the current Eshell.

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]