From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Profiles/manifests-related command line interface enhancements Date: Thu, 24 Oct 2019 20:16:53 +0200 Message-ID: <87tv7yt3e2.fsf@ambrevar.xyz> References: <87mudrxvs8.fsf@ambrevar.xyz> <87d0emwm95.fsf@netris.org> <87imoewks8.fsf@ambrevar.xyz> <20191024184246.014d810e@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNhfO-0005Nx-NA for guix-devel@gnu.org; Thu, 24 Oct 2019 14:16:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNhfN-00023U-6j for guix-devel@gnu.org; Thu, 24 Oct 2019 14:16:58 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60171) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNhfM-000223-W8 for guix-devel@gnu.org; Thu, 24 Oct 2019 14:16:57 -0400 In-Reply-To: <20191024184246.014d810e@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Danny Milosavljevic writes: > Hi Pierre, > > On Thu, 24 Oct 2019 11:32:55 +0200 > Pierre Neidhardt wrote: > >> As you suggested `guix-activate` could be a shell function that's >> defined in /etc/profile or anywhere appropriate. > > Yes, but what's the advantage of that as opposed to just doing it like an= yone > else does it: Just start a new shell. If I understand correctly, you are saying we should use `guix environment...` everywhere. Currently, this does not support multiple manifests, so it does not compose. But that's an issue that could (should?) be fixed, as we are discussing below. There can be some benefits in editing the current environment for the running application. Say with EXWM, if I want to enable a profile for the running instance of Emacs. Moreover, I believe this does not work on login, e.g. from your ~/.bash_profile. I'd like to streamline the way profiles are loaded, i.e. it should work the same way on login and from a random shell. > I for one *like* it that the shell environment can't be > modified by random programs. You mean that you prefer running sub-shells instead of changing the current shell environment? >>- The inverse command, =3Dguix deactivate /path/to/profile=3D. >> This can be useful to deactivate a profile that was activated during log= in. > > That is not composable and sounds like a HUGE effort for what would other= wise > one "exit" command. Why isn't it composable? It does not seem too hard: if I'm not mistaken, it boils down to removing all environment entries that match a given profile. This could be brittle though and would need testing. An alternative to this, once we have the ability to compose manifests from command line, is to simply start a new shell with the desired manifests. With a good shell (e.g. Eshell) it's easy to complete against a list of manifests and filter out the few that we don't want. We could also leverage Emacs-Guix for that. >>- All commands that accept manifests should be able to compose manifests >> by passing multiple =3D--manifest FILE=3D options. > > Hmm that would be nice! This simple feature would fix many of the current limitations of Guix. =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2x6pUACgkQm9z0l6S7 zH8A9wf+Kv/jgN4avXW2f7WtdATtgtDfPa3/tLmfiqLrVrL2udtMWS8pQDkYG5VD 4XwP2f8N4PTkI0cpRlfmT+l8Ff7bD9GYv6roPTgyPRz6xVWFBI3eVHSO4G6suaBn AHY+4KvsfoXs6dhe+jcDID9thO+ikRvdhAPaUffkbWzBonGPf7RjonqF5UNf9hNH e/LwkiIE+UUdKdlF/3PufB/FpPCL5VrPekUOBuBl0vTXcgOOWg5hQadGf4jpcUs6 za3sgFKg77vgQxXFyf+2iwj1cspsXaDMQv4tIPENLhHWssxxGA5sm9ixGBMZZGAE 8cBAyRhE6eGqXPVdKYerCql9e+WTvA== =QlWD -----END PGP SIGNATURE----- --=-=-=--