From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MAnWCVMwLWUabgAA9RJhRA:P1 (envelope-from ) for ; Mon, 16 Oct 2023 14:45:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MAnWCVMwLWUabgAA9RJhRA (envelope-from ) for ; Mon, 16 Oct 2023 14:45:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BE4E445470 for ; Mon, 16 Oct 2023 14:45:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=fASC7vZd; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697460307; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=d3oi5uupG96JyFR1gLHUQV0Id0gOlZzFwqDJ5qByVM0=; b=Hs1iUMHjJbNNfa+oWWc1ftiqhxTxjYSXw9UiSpsd74T1TI9+5oGQeAuZiPcXQJtrS8BhGv 6EUviv96xLRyMIkaTVsAY9sPYgoHDTdg1yLxWptFHsiypPS8LBLKrrGy7zNuTMjMd+J1Cp RADRh+21pz9cj9vvBpw+k5DwHRg/DeZXW02WbPhPK//yA9gbclm+ywXhTYVy3oApWI9ncJ fGZlY+yju+jB6Pxv64MsPADq+6b7N+bfvdWLZ22K53ILnjBTk3WE5P/WvupUsEWEXF3S9S h9yrVb4AvQTltm+l3Km/Y+FxoHvx7znya5Xk858LpizFJy84ubK73KYfIxRFHg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697460307; a=rsa-sha256; cv=none; b=ogPax5LVuJAHFmfZ/SpMSBr4Z0/ERH4yMX0SHYjLNCC8VdYQbkPC0xvRLfimjU6rVpSSf7 G1m4xhlM/3c+XTe24RdgVnMO/ziyZ8lBaBIQnxlswZaw97H7Xtw92OTwvV4mSKvWrY88pW 2FmlNqBj8GcOvheCKxqtsUt4Ksj47DaMaw/PUPw0NMSNEMT+lxfhWAkH/m0SDp53kAGe9m R3lGiBgxvWNsT7PLTroyqbywSqADCWEtpZNhJzXZtjSl6YlnI6PC7h9WHsUnuANY1EsBoh PqG4GL9sbA1dyZqkMxgOv/9yODt/3P26P2QsKcmb8RwwMfKR0FobGEHip1RvDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=fASC7vZd; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsMxl-0006dM-TR; Mon, 16 Oct 2023 08:44:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMxb-0006aT-3U for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:40 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsMxa-0007JO-6v for guix-patches@gnu.org; Mon, 16 Oct 2023 08:44:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsMxy-0008Mh-VO for guix-patches@gnu.org; Mon, 16 Oct 2023 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66577] [PATCH 3/4] doc: cookbook: Suggest =?UTF-8?Q?=E2=80=98guix_?= =?UTF-8?Q?shell=E2=80=99?= as an alternative to multiple profiles. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Oct 2023 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66577@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 66577-submit@debbugs.gnu.org id=B66577.169746026832075 (code B ref 66577); Mon, 16 Oct 2023 12:45:02 +0000 Received: (at 66577) by debbugs.gnu.org; 16 Oct 2023 12:44:28 +0000 Received: from localhost ([127.0.0.1]:55467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxP-0008LB-J7 for submit@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsMxN-0008Kr-9W for 66577@debbugs.gnu.org; Mon, 16 Oct 2023 08:44:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsMwg-000784-8z; Mon, 16 Oct 2023 08:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=d3oi5uupG96JyFR1gLHUQV0Id0gOlZzFwqDJ5qByVM0=; b=fASC7vZdpBNo8vwR+4QB XnM1+Q6bfvfniWLgGcow/njBbNH2CplrFQqmiBp1AbC3VmBNbhY0rKdWc/lAXwl9DPtQKgQD+B2KE c27fNJGUsaiR6stg5olafO8sMMLB2p+O7y37QQ2/j+T/IHaVjs/xsqfpr03paqhXp6+e51IOx5Ntp yJOA1rlJFHUJoTO/8SlG3Ysv5bSVXBDCqIl/hCEudWbwler+m1QljGjhNAwrHSUxUv4rcZNwMLp83 PR3/1WpbjiLsLRmqEn5IjMnL8UZkBhQ7wwt/rCrUWEnO3fJmf7dwXB/9zUH5Smlj0OtLMdKkwo+PT u5SIxc0FYAm8vw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 16 Oct 2023 14:43:02 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -5.87 X-Migadu-Queue-Id: BE4E445470 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -5.87 X-TUID: cK2SCb68el6R Multiple profiles are relatively hard to set up and maintain, especially for newcomers. Thus, suggest ‘guix shell’ as an alternative. * doc/guix-cookbook.texi (Guix Profiles in Practice): Add note linking to ‘guix shell’. (The benefits of manifests): Remove outdated info about ‘guix environment’ and profiles that may be GC’d. Update. --- doc/guix-cookbook.texi | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 712c131a51..1259f6aac7 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -3714,7 +3714,7 @@ Guix Profiles in Practice @section Guix Profiles in Practice Guix provides a very useful feature that may be quite foreign to newcomers: -@emph{profiles}. They are a way to group package installations together and all users +@dfn{profiles}. They are a way to group package installations together and all users on the same system are free to use as many profiles as they want. Whether you're a developer or not, you may find that multiple profiles bring you @@ -3722,6 +3722,16 @@ Guix Profiles in Practice @emph{traditional package managers}, they are very convenient to use once you've understood how to set them up. +@quotation Note +This section is an opinionated guide on the use of multiple profiles. +It predates @command{guix shell} and its fast profile cache +(@pxref{Invoking guix shell,,, guix, GNU Guix Reference Manual}). + +In many cases, you may find that using @command{guix shell} to set up +the environment you need, when you need it, is less work that +maintaining a dedicated profile. Your call! +@end quotation + If you are familiar with Python's @samp{virtualenv}, you can think of a profile as a kind of universal @samp{virtualenv} that can hold any kind of software whatsoever, not just Python software. Furthermore, profiles are self-sufficient: they capture @@ -4034,29 +4044,12 @@ The benefits of manifests they ``pin'' packages in the store, which prevents them from being garbage-collected (@pxref{Invoking guix gc,,, guix, GNU Guix Reference Manual}) and ensures that they will still be available at any point in -the future. +the future. The @command{guix shell} command also protects +recently-used profiles from garbage collection; profiles that have not +been used for a while may be garbage-collected though, along with the +packages they refer to. -Let's take an example: - -@enumerate -@item -We have an environment for hacking on a project for which there isn't a Guix -package yet. We build the environment using a manifest, and then run @code{guix - environment -m manifest.scm}. So far so good. - -@item -Many weeks pass and we have run a couple of @code{guix pull} in the mean time. -Maybe a dependency from our manifest has been updated; or we may have run -@code{guix gc} and some packages needed by our manifest have been -garbage-collected. - -@item -Eventually, we set to work on that project again, so we run @code{guix shell - -m manifest.scm}. But now we have to wait for Guix to build and install -stuff! -@end enumerate - -Ideally, we could spare the rebuild time. And indeed we can, all we need is to +To be 100% sure that a given profile will never be collected, install the manifest to a profile and use @code{GUIX_PROFILE=/the/profile; . "$GUIX_PROFILE"/etc/profile} as explained above: this guarantees that our hacking environment will be available at all times. -- 2.41.0