From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eGwANAOvZGHDIwEAgWs5BA (envelope-from ) for ; Mon, 11 Oct 2021 23:39:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YGjSLQOvZGGZcwAA1q6Kng (envelope-from ) for ; Mon, 11 Oct 2021 21:39:15 +0000 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 8B2E421E89 for ; Mon, 11 Oct 2021 23:39:15 +0200 (CEST) Received: from localhost ([::1]:35440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma30s-0006i0-IR for larch@yhetil.org; Mon, 11 Oct 2021 17:39:14 -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 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633988355; 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; bh=w6DeNccwCrqzN0rWGtGK0qXor1iSkBm109rBNUvtaLc=; b=beeLfNONpMwS4m1oKrFhpnkb4dLzFqBabtAEykkJiDJQd9HbM/fVbRYUWAoIWJ5ntP0igO 3J0iptjKYp8L03I5PjuPfm625WHHlSwNLZyW31JmaNb4NSnPDUYPfq4rqgxA+F1krNLijX zA5JJvVQBgaeEwRvhuFIwMCD3gHRFDmUdVQ0+2jJGy7Yfee8lC67qGhbBEQb4DPTMaxwjV gTFGxDLsYx28+6FTUFz1vvgYac1R1MH+b8UT1vOpKe0SW6FSeAYky/QlXfXD2E453DrBCV olACsL3VXdtNvTxSBpSnLJ3Ijs6D2CZYE9m1Z7s3rjZQ1Krhtiz4MLOihv3a5w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633988355; a=rsa-sha256; cv=none; b=mc1VbSXRa0MUAsZ0KVLtfTwVhajPnEQi6kc2X+rMSUuapU7phYqCh0SCI5SsHU2VC9NvbI GM/hbLh+7tOJVSZcCQymKX4IRf+BNQQZ5G8Fm6PTfjiuPAbdQhNzSFjzVQZUyJ6rfuFL6o n9OpZZM8RYxEYYfg2P1yl1OOeML1SqjT2PO8LwzgWsMwH/NpN5f23XefclPeKmaPk+SkWk MV1s4Sv2ZrKlQ17ga98PW5unhgcPNMuLLcf1kDmw8S2uoXy+7azSMbeZvj65XfscpU4uhe YACXotS4mKJJdB4DlFVC6GCDmHgALOjSx30Cea4fGop6JfAg5Mp8XmFaQqzbzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8B2E421E89 X-Spam-Score: -1.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: PlPAkt+oy71B 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 -- 2.33.0