From mboxrd@z Thu Jan 1 00:00:00 1970 From: sirgazil Subject: Re: How can I replace Python venv and pip with Guix? Date: Tue, 04 Feb 2020 13:13:10 -0500 Message-ID: <1701167f4c3.e4e64c8a25038.4576513321829582679@zoho.com> References: <170082257a9.bbf196a73697.871070894081541659@zoho.com> <87y2tiqwlf.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33838) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iz2hM-0007ht-29 for help-guix@gnu.org; Tue, 04 Feb 2020 13:13:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iz2hL-0008An-3M for help-guix@gnu.org; Tue, 04 Feb 2020 13:13:19 -0500 Received: from sender4-pp-o91.zoho.com ([136.143.188.91]:25180) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iz2hK-00088A-S0 for help-guix@gnu.org; Tue, 04 Feb 2020 13:13:19 -0500 In-Reply-To: <87y2tiqwlf.fsf@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Ricardo Wurmus Cc: help-guix ---- On Tue, 04 Feb 2020 09:02:36 -0500 Ricardo Wurmus wrote ---- >=20 > sirgazil writes: >=20 > > =E2=80=A2 Once I deactivate this environment (Ctrl+D), how can I activ= ate it again? >=20 > It=E2=80=99s a matter of evaluating the etc/profile file that is generat= ed for > every Guix profile. Since you passed >=20 > --root=3D/path/to/my-guix-envs/my-project >=20 > to =E2=80=9Cguix environment=E2=80=9D there will be a file >=20 > /path/to/my-guix-envs/my-project/etc/profile >=20 > You can set all the environment variables it defines with >=20 > GUIX_PROFILE=3D/path/to/my-guix-envs/my-project > source $GUIX_PROFILE/etc/profile >=20 > If you want a pure environment you can use =E2=80=9Cenv=E2=80=9D. On ou= r HPC cluster I > provide =E2=80=9Cactivate=E2=80=9D scripts like this one: >=20 > --8<---------------cut here---------------start------------->8--- > #!/bin/bash >=20 > profile=3D/path/to/.guix-profile > prompt=3D'\u@\h:\W \[\e[31;47;1m\][pigx]\[\e[m\] $ ' >=20 > REAL_HOME=3D$HOME > exec /bin/env - PS1=3D"$prompt" \ > HOME=3D$REAL_HOME \ > LANG=3Den_US.UTF-8 \ > GUIX_LOCPATH=3D"$profile/lib/locale" \ > CURL_CA_BUNDLE=3D"/etc/ssl/certs/ca-bundle.crt" \ > /bin/bash --init-file "$profile/etc/profile" > --8<---------------cut here---------------end--------------->8--- >=20 > It sets a few environment variables, recovers some variables that are > important, and then starts a sub-shell that uses the generated > etc/profile file as its init file. >=20 > Something like that might work for you. Thank you, Ricardo :)