From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wAQXEGxLLmKFrAAAgWs5BA (envelope-from ) for ; Sun, 13 Mar 2022 20:52:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qO2JCGxLLmIIawEAG6o9tA (envelope-from ) for ; Sun, 13 Mar 2022 20:52:12 +0100 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 858594587E for ; Sun, 13 Mar 2022 20:52:11 +0100 (CET) Received: from localhost ([::1]:37300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTUGA-0005j5-EI for larch@yhetil.org; Sun, 13 Mar 2022 15:52:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTUG3-0005iv-Dc for guix-patches@gnu.org; Sun, 13 Mar 2022 15:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTUG2-0007A7-5c for guix-patches@gnu.org; Sun, 13 Mar 2022 15:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTUG2-0002PP-4C for guix-patches@gnu.org; Sun, 13 Mar 2022 15:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54375] Mutable guix shell environments Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Mar 2022 19:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54375 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Charles , 54375@debbugs.gnu.org Received: via spool by 54375-submit@debbugs.gnu.org id=B54375.16472011149244 (code B ref 54375); Sun, 13 Mar 2022 19:52:02 +0000 Received: (at 54375) by debbugs.gnu.org; 13 Mar 2022 19:51:54 +0000 Received: from localhost ([127.0.0.1]:43312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTUFt-0002P0-QQ for submit@debbugs.gnu.org; Sun, 13 Mar 2022 15:51:54 -0400 Received: from mail-ej1-f67.google.com ([209.85.218.67]:45779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTUFs-0002Om-Aq for 54375@debbugs.gnu.org; Sun, 13 Mar 2022 15:51:52 -0400 Received: by mail-ej1-f67.google.com with SMTP id qa43so29561415ejc.12 for <54375@debbugs.gnu.org>; Sun, 13 Mar 2022 12:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=sTYtV0CU1anjVP0vkj8BN+8AmNuDgCAqy0xQygfLTa8=; b=Cyc3H6Y5l1+UtEB2IOZApfBKaEcK62IsxEd41fHEi5xS2tSCCUXOvfk04ZnuMEqbHA 4O6EJOOhSh+xOqIJTqj6YHgxUddYQ965IkRpSlZ+Oa1KwfrCMqiblt2QMwjNJtqNz8vn kzoeYdQngrdeEdaFaRjPAGBemjnE8ojWkA6lawJTlDWNZlSrRQZwyN3AeVnKWfrPvtnC vKLPkxrqVQkSe0Lh5HTT/f9pb9vigmhmH/N1kQdsjzqIt9kqqYKUe1h48SZkDGC7aDym 4aXWsHjpelg1y8s5tXfntbo6xsptQ29XZfnMeP9T2EpK0iCtzCVKBGpgXcPMqLKpBA0p GMsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=sTYtV0CU1anjVP0vkj8BN+8AmNuDgCAqy0xQygfLTa8=; b=0xZKnuxUHmlXCkRKJPF6acZlzG302iom6fS8J1+vJmqBQBUZn6BLI2FbiOWu6iv504 stoR5cNqz+E4FXNhZniwtPk/bLwQd4iCIcpIoukLsq3N2AXes1TzqlUG62pbtMdBRI2S NIlTNDrAOlgmzRncFp2Z3Ubm1E4XtiBGUz255Ahfq/EWgXAnSOU4r95H3Hxt09oe6VW4 SuEdpe50Ge1aX6OUaTRmZTrjy0M6KMGVBQx5CODlF5FdJqUgqxfTvSKRKzSWFNokkyYZ tiSosdebwciBytnS18FOSv5WkVwSruq4VkjzIamhDiQ3BdToj4oAolmH3v7x/EpGKwzE Xjjw== X-Gm-Message-State: AOAM5309CaSXjDe79aeUH//VGMFhthhvXE0IgqaGZ6MERUw53J/4Fias xZCGlQ1C7RfOpTGMYqsv1Ps= X-Google-Smtp-Source: ABdhPJwL4GC26r7Sy1a5LBgUKyKeCwqCl9AN+v1iHmAcjKNIpOUZwrdrQGNUUoAUZq2hIALRKHvoOQ== X-Received: by 2002:a17:907:971c:b0:6d6:e503:131b with SMTP id jg28-20020a170907971c00b006d6e503131bmr15864667ejc.121.1647201106088; Sun, 13 Mar 2022 12:51:46 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id p14-20020aa7cc8e000000b0040f13865fa9sm6734809edt.3.2022.03.13.12.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Mar 2022 12:51:45 -0700 (PDT) Message-ID: <68a3e146199e408d50e4ed751e1b7000364704f5.camel@gmail.com> From: Liliana Marie Prikler Date: Sun, 13 Mar 2022 20:51:43 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647201131; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=sTYtV0CU1anjVP0vkj8BN+8AmNuDgCAqy0xQygfLTa8=; b=oMZp6JH+IgzQuNygerCGwLfQdGbRcnkSpb6a8dtQbOfjfb9OvGJEoAH3EP8xCzKAOVTkTg lf1dZzteHoWFqC5LWXOi02e+vgmglqB9kq/+79qsj5VX6qmKQQaywvyclBnZYuVPn7V8ON gFw7XXXzWMfkvhUsjOrJttxmRoUt+YeNDLdcKrrAWiUTQwDp6VEplvHxviUyA9X5msa6U6 VI2tXUACx4aDAKoLWdcwdkUcFHrIxIJfrdnfH/fXpGsrHCwRUIvJ5Ub0OahDpTOp6UwlR4 AORqCublIh/LDyYuaLDDNoiR3wrc4N67y7iVfEBcjAEb4o8DhX17HXFTWBPs4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647201131; a=rsa-sha256; cv=none; b=chS+rozY3OTnbRj8sQYGn/BXmaRthhPHJfLir0cZr4ORUrFvHNt1vdQDs2Yttue6fwcOe/ jDaG/Z3DdimM2JUJgyICZ7iQ4jnq5Q1sHlwaAttTdBY1raxBvLF7IDNRMi83z5nOrhUrhA 282jWstz4kMagE069DkpAQFz5Md7SMHK+Ka54ABd18TxLYhLHsR9FpDToZu4hr3DeRvmDI RF7xyqxpS3vP+Ez5DIvjlRipR8kh0dsOsHG11TNMF+Y5s1Rff8ewzQfDRmfdIhKnQbRl/t yrJ+mjBn0UDI4vyNYiINFlOeenHs+Oc+9kw7DskyxlmwtDIjz6AW5HtOdWSsjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Cyc3H6Y5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 5.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Cyc3H6Y5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: 858594587E X-Spam-Score: 5.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: OthvzH5fJHL7 Am Sonntag, dem 13.03.2022 um 18:21 +0000 schrieb Charles: > Subject: [PATCH 2/2] guix: shell: Implicitly use a .guix-profile as - > -profile option. > > * guix/scripts/shell.scm (auto-detect-manifest): Add ".guix-profile" > to matches as --profile option This one LGTM and it even avoids some problems we're having with caches. I'll keep it open for bikeshedding suggestions w.r.t. the name of the directory to detect, though. > Subject: [PATCH 1/2] guix: environment: Enable mutable environments. > > * guix/scripts/environment.scm (launch-environment launch- > environment/fork > launch-environment/container guix-environment*): Add #:set-profile? > parameter set GUIX_PROFILE > when --profile option is used. > * guix/scripts/environment.scm (guix-environment*): Profile could > point to a > profile directory instead of a store directory. This one not so much. You already have GUIX_ENVIRONMENT set, which should be enough for lookup purposes. If it's about manipulating PATH and other environment variables, I think it'd better to do this manually – you could even spawn a lightweight shell on your own by simply doing the following: $ $SHELL $ GUIX_PROFILE=/path/to/profile $ source $GUIX_PROFILE/etc/profile If you want mutable environments, that's the easiest and imho best way of achieving such a thing. Guix is functional by design and we should not compromise on that. As far as using $GUIX_PROFILE together with `guix shell' is concerned, if anything is even holding it back, it's that we don't respect GUIX_PROFILE in the Scheme code that adds those variables. Which to be fair might be for the best, as GUIX_PROFILE is not guaranteed to correspond to this invocation of `guix shell' when people are careless. That's not to say that support for this couldn't be added, but at the very least we'd have to be more careful about it. Cheers