From: zimoun <zimon.toutoune@gmail.com>
To: elaexuotee@wilsonb.com
Cc: guix-devel@gnu.org
Subject: Re: how to "guix pack" a profile?
Date: Fri, 19 Jun 2020 01:49:24 +0200 [thread overview]
Message-ID: <861rmcvssb.fsf@gmail.com> (raw)
In-Reply-To: <35VODTGT3A8OP.2ZYCBD56EYVPN@wilsonb.com>
Dear,
On Thu, 18 Jun 2020 at 18:20, elaexuotee@wilsonb.com wrote:
> By `profile', I mean any store output named like /gnu/store/<hash>-profile.
> These outputs are created by `guix package' invocations as well as `guix
> environment' ones.
>
> By `user profile', I mean the (non-static) contents pointed to by
> ~/.guix-profile. These contents get updated on `guix package' invocations (by
> updating the ~/.guix-profile symlink).
Well, from my understanding, any profile point to /gnu/store/<hash>-profile.
--8<---------------cut here---------------start------------->8---
$ readlink -f ~/.guix-profile
/gnu/store/192k3kck2w3g2ms43dry41la9lwrqf37-profile
$ guix package -i hello -p /tmp/hello
$ readlink -f /tmp/hello
/gnu/store/p196x4m6ix33mgsbfacvqaw60129pndw-profile
--8<---------------cut here---------------end--------------->8---
> Using this terminology, we both agree than managing your `user profile' via
> "manifest.scm" (and "channels.scm") is the way to go. Those two files provide a
> specification which guix *resolves* into a concrete `profile'.
>
> The imminently practical issue that you, Ludo, and Pierre seem to be working on
> is a way of easing the transition from imperative to declarative `user profile'
> management.
>
> In contrast, I am proposing making `profiles' first class. By this I mean a
> file under /gnu/store/<hash>-profile that contains the code capable of
> completely and deterministically rebuilding that exact profile, and that
> profile *only*.
For which use case?
Well, let say there is a profile which could be a mess and I only see
two usages currently uncovered:
1. create an environment based on this profile; either to temporarily
extend it (which is AFAIK already more or less covered), either to
isolate it,
2. pack it for sharing with your colleague.
> Just for the sake of argument, let's call this file "recipe.scm", and let's
> choose a profile, /gnu/store/123abc-profile. Then the following should be true:
>
> $ guix package --manifest /gnu/store/123abc-profile/recipe.scm
> $ readlink -f ~/guix-profile
> /gnu/store/123abc-profile
>
> I.e. that `guix package' invocation would have the effect of setting the
> current user generation to that exact profile.
>
> Of course, if we had such a "recipe.scm" then the following would Just Work:
>
> # Containerize a profile.
> $ guix pack --manifest /gnu/store/123abc-profile/recipe.scm
>
> # Share profiles with your Guix friends.
> $ guix environment --manifest ~/downloads/friends-awesome-profile.scm
>
> And it plays well with potential future features:
>
> # Copy whole profiles between Guix stores
> $ guix archive --manifest /gnu/store/123abc-profile/recipe.scm
>
> Hopefully my generalized idea is clearer now.
What you describe here is exactly what Pierre and other have proposed.
And the work-to-do is to prototype the format of what you called
"recipe.scm", which means equivalently in the previous emails change the
format of <profile>/manifest.
All the best,
simon
next prev parent reply other threads:[~2020-06-18 23:49 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 1:40 Using --manfistest with <profile>/manifest files elaexuotee
2020-06-13 20:36 ` Ludovic Courtès
2020-06-14 10:17 ` Pierre Neidhardt
2020-06-14 15:24 ` Ludovic Courtès
2020-06-15 7:52 ` Pierre Neidhardt
2020-06-16 9:44 ` Ludovic Courtès
2020-06-15 8:08 ` zimoun
2020-06-16 9:46 ` Ludovic Courtès
2020-06-16 11:33 ` elaexuotee
2020-06-16 13:42 ` zimoun
2020-06-17 0:45 ` elaexuotee
2020-06-17 7:58 ` how to "guix pack" a profile? zimoun
2020-06-18 9:20 ` elaexuotee
2020-06-18 23:49 ` zimoun [this message]
2020-06-19 2:52 ` elaexuotee
2020-06-19 8:30 ` zimoun
2020-06-19 12:34 ` elaexuotee
2020-06-19 15:38 ` zimoun
2020-06-19 10:00 ` zimoun
2020-06-19 12:16 ` elaexuotee
2020-06-19 20:40 ` Ludovic Courtès
2020-06-19 20:35 ` Ludovic Courtès
2020-06-16 2:51 ` Using --manfistest with <profile>/manifest files George Clemmer
2020-06-16 4:27 ` elaexuotee
2020-06-17 19:09 ` George Clemmer
2020-06-16 9:38 ` zimoun
2020-06-16 14:03 ` George Clemmer
2020-06-16 15:09 ` zimoun
2020-06-16 9:50 ` Ludovic Courtès
2020-06-15 7:54 ` zimoun
2020-06-15 10:08 ` elaexuotee
2020-06-16 9:09 ` 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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861rmcvssb.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=elaexuotee@wilsonb.com \
--cc=guix-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).