guix-devel
[Top][All Lists]
Advanced

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

Re: ~/.guix-profile/manifest usage with "guix package -m [manifest]" / "


From: George Clemmer
Subject: Re: ~/.guix-profile/manifest usage with "guix package -m [manifest]" / "guix pack -m [manifest]" etc..
Date: Tue, 02 Oct 2018 17:35:21 -0400
User-agent: mu4e 1.0; emacs 26.1

Ricardo Wurmus <address@hidden> writes:

> Hi George,
>
>> 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?
>
> --8<---------------cut here---------------start------------->8---
> (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.")))
> --8<---------------cut here---------------end--------------->8---
>
> 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
>
> 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”.

Hi Ricardo,

Nice! Yes, this is the idea and it worked here for me, thank you.

Ideally this would recover additional package specification details when
needed. E.g., I did 'guix package -i address@hidden:debug' but only "guile"
was added to my-manifest.scm.

TIA! - George



reply via email to

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