From: "Ludovic Courtès" <ludo@gnu.org>
To: Sarah Morgensen <iskarian@mgsn.dev>
Cc: guix-devel@gnu.org
Subject: Re: Named environments
Date: Wed, 06 Oct 2021 15:29:51 +0200 [thread overview]
Message-ID: <87v92ai8mo.fsf@gnu.org> (raw)
In-Reply-To: <86zgshlhbt.fsf@mgsn.dev> (Sarah Morgensen's message of "Sun, 12 Sep 2021 12:33:26 -0700")
Hi!
Sarah Morgensen <iskarian@mgsn.dev> skribis:
> However, an actual `guix env' could do a lot more! Like you allude to, being
> able to essentially save the options of a `guix environment' invocation would
> be great:
>
> $ guix env --edit @test <lots of packages and environment options>
> $ guix env @test -- pytest
Perhaps not as convenient (although that’s a matter of taste), but that
sounds similar to:
guix environment -m test-manifest.scm -- pytest
WDYT? Perhaps there’s 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 coreutils
>
> (environment "@myapp-test"
> (load '("guix.scm"))
> (ad-hoc-packages '("strace" "coreutils" "findutils"))
> (flags '(pure container)))
Like zimoun write, we could make ‘--export-profile’ somehow available to
‘guix environment’.
> 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 exists
> for manifests). So, we could pin the channel used to make the environment:
>
> $ 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"))
> (flags '(pure container))))
>
> which, when evaluated, would internally do what `guix time-machine --channels
> file' does.
While it’s 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’.
next prev parent reply other threads:[~2021-10-06 13:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 23:06 Named environments Ryan Prior
2021-09-11 8:59 ` Domagoj Stolfa
2021-09-12 19:33 ` Sarah Morgensen
2021-09-13 8:08 ` zimoun
2021-10-06 13:29 ` Ludovic Courtès [this message]
2021-09-13 15:48 ` pinoaffe
2021-09-14 2:32 ` Ryan Prior
2021-09-14 6:27 ` Lars-Dominik Braun
2021-09-14 9:58 ` Pjotr Prins
2021-09-14 6:30 ` zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v92ai8mo.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=iskarian@mgsn.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.