From patchwork Mon Oct 11 21:37:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 386 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D58A27BBE3; Mon, 11 Oct 2021 22:39:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CFB5827BBE1 for ; Mon, 11 Oct 2021 22:39:18 +0100 (BST) Received: from localhost ([::1]:35440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma30v-0006i0-U9 for patchwork@mira.cbaines.net; Mon, 11 Oct 2021 17:39:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ma30g-0006aF-PH for guix-patches@gnu.org; Mon, 11 Oct 2021 17:39:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ma30g-0004pw-3e for guix-patches@gnu.org; Mon, 11 Oct 2021 17:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ma30f-0001PL-WD for guix-patches@gnu.org; Mon, 11 Oct 2021 17:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50960] [PATCH v2 00/11] 'guix shell' strikes again Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Oct 2021 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50960 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50960@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 50960-submit@debbugs.gnu.org id=B50960.16339883165289 (code B ref 50960); Mon, 11 Oct 2021 21:39:01 +0000 Received: (at 50960) by debbugs.gnu.org; 11 Oct 2021 21:38:36 +0000 Received: from localhost ([127.0.0.1]:32894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma30C-0001Mq-JH for submit@debbugs.gnu.org; Mon, 11 Oct 2021 17:38:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma307-0001Lw-7v for 50960@debbugs.gnu.org; Mon, 11 Oct 2021 17:38:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40562) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma301-0004Ul-42; Mon, 11 Oct 2021 17:38:21 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53321 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ma300-0007Y0-R0; Mon, 11 Oct 2021 17:38:21 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 11 Oct 2021 23:37:58 +0200 Message-Id: <20211011213809.17482-1-ludo@gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002102116.27726-1-ludo@gnu.org> References: <20211002102116.27726-1-ludo@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Guix! Here’s a v2 with the following changes: • ‘guix.scm’ and ‘manifest.scm’ only loaded in interactive mode, as suggested by Konrad. • Auto-loading happens if and only if the containing directory is listed in ~/.config/guix/shell-authorized-directories, as suggested by Florian. When a file is found but not authorized, a hint is displayed explaining what to do. • ‘-q’ inhibits auto-loading. • Auto-detection of ‘guix.scm’ and ‘manifest.scm’ uses lexical “..” resolution and does not cross device boundaries. • Long version of ‘-f’ is now ‘--file’, like for ‘guix build’. • Caching also works with files explicitly specified with ‘-m’ or ‘-f’. That way, ‘guix shell -f guix.scm -- make’ benefits from it. • Cache key does not include file name, to avoid cache misses given that the file name is not canonicalized (see discussion with Maxime). • Documentation, including a tentative EOL date for ‘guix environment’ (“supported until at least May 1st, 2023”). The intention is to give an incentive to switch while reassuring that it won’t disappear overnight. How does that sound? :-) Ludo’. Ludovic Courtès (11): packages: Add 'package-development-inputs'. profiles: Add 'package->development-manifest'. Add 'guix shell'. DRAFT shell: By default load the local 'guix.scm' or 'manifest.scm' file. DRAFT shell: Honor in ~/.config/guix/shell-authorized-directories. environment: Add tests for '--profile'. environment: Skip derivation computation when '--profile' is used. environment: Do not connect to the daemon when '--profile' is used. environment: Autoload some modules. cache: Gracefully handle non-existent cache. shell: Maintain a profile cache. Makefile.am | 2 + doc/contributing.texi | 8 +- doc/guix.texi | 443 ++++++++++++++++++++++++++-- guix/cache.scm | 10 +- guix/packages.scm | 10 + guix/profiles.scm | 19 ++ guix/scripts/environment.scm | 260 ++++++++-------- guix/scripts/shell.scm | 355 ++++++++++++++++++++++ po/guix/POTFILES.in | 1 + tests/guix-environment-container.sh | 8 + tests/guix-environment.sh | 7 + tests/guix-shell.sh | 100 +++++++ tests/packages.scm | 14 + tests/profiles.scm | 7 + 14 files changed, 1098 insertions(+), 146 deletions(-) create mode 100644 guix/scripts/shell.scm create mode 100644 tests/guix-shell.sh