From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yEA9LeGkXWEJPgAAgWs5BA (envelope-from ) for ; Wed, 06 Oct 2021 15:30:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qFfcKOGkXWE5LQAAB5/wlQ (envelope-from ) for ; Wed, 06 Oct 2021 13:30:09 +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 1F6B38A37 for ; Wed, 6 Oct 2021 15:30:09 +0200 (CEST) Received: from localhost ([::1]:43886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mY6zn-0008KF-Qx for larch@yhetil.org; Wed, 06 Oct 2021 09:30:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY6zb-0008IO-Cw for guix-devel@gnu.org; Wed, 06 Oct 2021 09:29:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50760) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mY6zZ-0002Ox-M2; Wed, 06 Oct 2021 09:29:53 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59146 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY6zZ-00065Q-CS; Wed, 06 Oct 2021 09:29:53 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarah Morgensen Subject: Re: Named environments References: <86zgshlhbt.fsf@mgsn.dev> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?utf-8?Q?Vend=C3=A9miaire?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 06 Oct 2021 15:29:51 +0200 In-Reply-To: <86zgshlhbt.fsf@mgsn.dev> (Sarah Morgensen's message of "Sun, 12 Sep 2021 12:33:26 -0700") Message-ID: <87v92ai8mo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633527009; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sNaJoY/vTH8XsSMLJE00gZfgKqPxkGVB7jAa43KFv70=; b=MkcCI4dpM6ZshuslsPOzewI+NimyJJzzVpXju+oUVVm3wyZy7fwS9+/Qu6M57LLcjNRHmx zMNOvke9KEkKaVEyFFs3UyGrv5W3aJIeXvw9q8aaKn6ps3wHdBM16Jz6d8HICoi0ekXTRE k8yHPUsPcqM3QFygNTZPmRzq4sS0lwraIMIcFznyy2Lwrxii/A0ELwKR5SdtolEXYzZwLf tXq8i9oQoC5noYXtDIJplldWtGpRCxThjisb2vHM3b+Gf4Pnr5kRRjStSvjaxrPBFvsBi0 Y+LL+2gnD2jEax4dz8j+lpTnrNRxPTs5Z9bl5Sx0ZWhhHZvlq2zaPSUuyNl60g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633527009; a=rsa-sha256; cv=none; b=rE6eIuzDgwVHWZzBHDIoXROfkENj+Cvx4igLZkzurX0heRhdf2gYpDxQcfc3MM6erMf89v oh9at0/Dv2AHa5CXUmpLOVDSlt0h99ou86DV7G60JeDrjYYrNr6LmrDkYDaqB96LaFpcT1 Iamv/DD3fQPYSFJmCUmLeUHey0L+6rHrDnbJ6j0/SHwGQg00Fv9Ico2NC1dV18yd2LdLZ/ OB5L7ELG4SGH4mikXRtXYF/AMz9ZiGUv83ysfopb0Br6LtF0vDSBCmJU5VoWyyrQwhXtRy Opba3oAjRlYHWUJpLilhfQd6e9cR/W6qAJlYSp5qei42pfdtji/9z3pfuT1wGA== 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-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 1F6B38A37 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: ca3dTQXp/06l Hi! Sarah Morgensen skribis: > However, an actual `guix env' could do a lot more! Like you allude to, b= eing > able to essentially save the options of a `guix environment' invocation w= ould > be great: > > $ guix env --edit @test > $ guix env @test -- pytest Perhaps not as convenient (although that=E2=80=99s a matter of taste), but = that sounds similar to: guix environment -m test-manifest.scm -- pytest WDYT? Perhaps there=E2=80=99s a need for a more lightweight CLI? > But also imagine portable environments (used, for example, for project dev > environments, checked in with the source): > > $ guix env --export @myapp-test --pure -C -f guix.scm --ad-hoc strace cor= eutils > > (environment "@myapp-test" > (load '("guix.scm")) > (ad-hoc-packages '("strace" "coreutils" "findutils"))=20 > (flags '(pure container))) Like zimoun write, we could make =E2=80=98--export-profile=E2=80=99 somehow= available to =E2=80=98guix environment=E2=80=99. > Of course, this isn't entirely reproducible, as packages could change as = you > update your Guix, even if you give a version spec (the same issue that ex= ists > for manifests). So, we could pin the channel used to make the environmen= t: > > $ guix env --export @myapp-test --pin-channels ... > > (environment "@myapp-test" > (channels (list (channel (name 'guix) > (url ...) > (commit ...))) > (load '("guix.scm")) > (ad-hoc-packages '("strace" "coreutils" "findutils"))=20 > (flags '(pure container)))) > > which, when evaluated, would internally do what `guix time-machine --chan= nels > file' does. While it=E2=80=99s tempting to do both at once, I think channels and environments should remain separate things, at least for now, because the implications and cost differ significantly. Thanks, Ludo=E2=80=99.