[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to "guix pack" a profile?

From: elaexuotee
Subject: Re: how to "guix pack" a profile?
Date: Thu, 18 Jun 2020 18:20:36 +0900
User-agent: mblaze/0.7

Zimoun, thank you for taking the time to closely read my long emails.

> Well, if I re-read correctly the emails and proposal, they are 2 points:
>  1. Easily share a profile via "guix pack"
>  2. A mean via recreating "manifest.scm" files

Hrm. I agree that point 1 is the immediate goal I have and what prompted me to
create this issue. However, my proposal is more general and orthogonal to point

> From my understanding, the way to go is the declarative via manifest.scm

Perhaps I am using terminology incorrectly. I completely agree that declarative
management of a `user profile' is the way to go. But before I go any further,
let me distinguish some terms:

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).

(Do the above two concepts have established nomenclature?)

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'

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*.

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

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.

So, what do you say? Are "first class profiles" a coherent and interesting
concept? What about practicality?

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]