From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Profiles/manifests-related command line interface enhancements Date: Thu, 31 Oct 2019 12:38:22 +0100 Message-ID: <87h83p5emp.fsf@ambrevar.xyz> References: <87mudrxvs8.fsf@ambrevar.xyz> <87d0emwm95.fsf@netris.org> <87imoewks8.fsf@ambrevar.xyz> <20191024184246.014d810e@scratchpost.org> <87tv7yt3e2.fsf@ambrevar.xyz> <875zkevtel.fsf@netris.org> <87o8y5ucyj.fsf@ambrevar.xyz> <87v9sdvnb9.fsf@netris.org> <87ftjhtbp8.fsf@ambrevar.xyz> 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]:50327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQ8md-0004xQ-NZ for guix-devel@gnu.org; Thu, 31 Oct 2019 07:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQ8mY-0002pN-GK for guix-devel@gnu.org; Thu, 31 Oct 2019 07:38:31 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:38423) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iQ8mY-0002p5-A8 for guix-devel@gnu.org; Thu, 31 Oct 2019 07:38:26 -0400 In-Reply-To: <87ftjhtbp8.fsf@ambrevar.xyz> 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: Mark H Weaver Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > --8<---------------cut here---------------start------------->8--- > GUIX_PROFILE=3D/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? =2D-8<---------------cut here---------------start------------->8--- guix environment --profile=3D/path/to/profile =2D-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! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl26x68ACgkQm9z0l6S7 zH/NOwgAoiGjOLVc+RIKmyu1Rw9FtOQGZt03qJQAGfmBwdaPsLKXD+iHGrV00uBE aIJDt6Ff/91XUhXh3EkZpIDF2r9M+PYtlY49xWwTTRY3MCizfn4afQhWdxsqHodF Zpg4YkOzYMt8KcICyQiGi348bXy1F3luEQQbq+aMtGim+S3xqXQDQApl/I/eKWJ8 HKyN4mHNOtxymrazHqIGGwlrRXQ3BawcVoSu1IbErM8tEJLdkniAqPi6fs/S7I+E 60IwxxalacZisF5KR11S24UhrtUVxZ8Sv0BQClHJqVlvCfmTeccvWTnIoPZ2ZIOu 0sRmFNA9d1/V63yG8PnEWS5G2jggbA== =Z1bQ -----END PGP SIGNATURE----- --=-=-=--