[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ~/.guix-profile/manifest usage with "guix package -m [manifest]" / "
From: |
Ludovic Courtès |
Subject: |
Re: ~/.guix-profile/manifest usage with "guix package -m [manifest]" / "guix pack -m [manifest]" etc.. |
Date: |
Mon, 08 Oct 2018 14:26:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Ricardo Wurmus <address@hidden> skribis:
>> My thinking is that if there was an easy way to produce “manifests as
>> passed to ‘guix package -m’” from profiles, it would be a handy: an easy
>> way for someone that has gone down the incremental path to switch to
>> manifests and an easy way to update one's manifest after incremental
>> changes.
>
> Do you mean something like this?
>
> (use-modules (guix profiles)
> (ice-9 match)
> (ice-9 pretty-print))
>
> (match (command-line)
> ((_ where)
> (pretty-print
> `(specifications->manifest
> ',(map manifest-entry-name (manifest-entries (profile-manifest
> where))))))
> (_ (error "Please provide the path to a Guix profile.")))
>
> You can put this in a file “manifest-to-manifest.scm” and run it like
> this from a Guix source checkout:
>
> ./pre-inst-env guile -s manifest-to-manifest.scm /path/to/.guix-profile >
> my-manifest.scm
I like how the script’s name highlights the naming inconsistency. :-)
> You can then proceed to install the generated manifest with:
>
> guix package -m my-manifest.scm -p /path/to/new/.guix-profile
>
> If that’s what you’re looking for I suppose we could find a place for
> something like that under the umbrella of “guix package”.
The problem, as I see it, is that this might give a false impression
that both “manifests” are entirely equivalent, which is not the case.
I sympathize with George’s idea of making it easier to move from the
incremental style to the declarative style, but I wonder if we should go
beyond suggesting to basically copy the package names shown in “guix
package -I” to the manifest file.
Thoughts?
Ludo’.