From mboxrd@z Thu Jan 1 00:00:00 1970 From: mlell@posteo.de Subject: Re: How can I replace Python venv and pip with =?UTF-8?Q?Guix=3F?= Date: Tue, 04 Feb 2020 15:31:07 +0100 Message-ID: <6246e5281a43e838e35347f8413d6ed4@posteo.de> References: <170082257a9.bbf196a73697.871070894081541659@zoho.com> <04CB4E79-C00C-41D8-BCAD-E188832D63EE@posteo.de> <1701049401d.1293b0e6720556.5375911807886978669@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34426) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyzEP-00080G-CY for help-guix@gnu.org; Tue, 04 Feb 2020 09:31:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyzEN-0001xr-7W for help-guix@gnu.org; Tue, 04 Feb 2020 09:31:13 -0500 Received: from mout01.posteo.de ([185.67.36.65]:60049) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyzEM-0001sE-Mr for help-guix@gnu.org; Tue, 04 Feb 2020 09:31:11 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E6276160061 for ; Tue, 4 Feb 2020 15:31:08 +0100 (CET) In-Reply-To: <1701049401d.1293b0e6720556.5375911807886978669@zoho.com> 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: sirgazil Cc: help-guix Hi sirgazil, > Well, the profile is created and persists, but, after deactivating the > environment, how do I start an environment that uses that profile? > If you want to use the isolation features of `guix environment`, like running inside a container, you can just use the same command that you used for creating the profile. Guix will not rebuild anything because all derivations are already in the store from the first time you executed this, so guix environment --pure --manifest=guix.scm --root=/path/to/my-guix-envs/my-project Otherwise, you can use the standard way that you can use to load any GUIX profile: You source the /etc/profile file into your shell: GUIX_PROFILE="/path/to/my-guix-envs/my-project"; . "$GUIX_PROFILE"/etc/profile The dot is the shell command `source`. It defines the nessecary environment variables like PATH. Defining the variable GUIX_PROFILE has the effect thatyou always access the newest generation of the profile. If you update your profile while your shell is running, you automatically access the files of the new generation. Read the source code of $GUIX_PROFILE/etc/profile for more info. As a general note, the use case of `guix environment` is to debug how a specific program is built by GUIX. For example, if you want to enter the environment that GUIX creates for the building of GNU hello, you call `guix environment hello`. You enter a profile with the *dependencies* of hello which you can then try to build yourself. If you just want to create a profile following a manifest file, just use guix package --manifest="your-manifest.scm" -p /path/to/profile-folder That said, the containerization features of `guix environment` can be handy in other cases, too. Cheers, Moritz