help-guix
[Top][All Lists]
Advanced

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

Re: How do I install packages from a file without removing currently ins


From: Giovanni Biscuolo
Subject: Re: How do I install packages from a file without removing currently installed packages?
Date: Sat, 11 May 2019 10:30:34 +0200

Hello sirgazil,

sirgazil <address@hidden> writes:

[...]

> Is there any way to tell Guix to create a generation that is the
> aggregate of the packages installed in the current generation and the
> packages specified in the manifest file?

no way to aggregate packages this way in the same profile (default
profile I imagine), you should use "guix environment" as already poitend
out by ison in this thread or...

you could "manually" list packages installed in your preferred
(default?) profile to a manifest or...

if you are willing to hack a little bit, Ricardo Wurmus wrote a little
Guile script that helps convert a profile manifest (e.g. your default
profile) to a manifest.scm file:

http://lists.gnu.org/archive/html/guix-devel/2018-10/msg00023.html

quoting here an excerpt for completeness (since the original message was
on guix-devel):

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

e.g. you can convert your current default profile manifest with:

 ./pre-inst-env guile -s manifest-to-manifest.scm $HOME/.guix-profile > 
default-manifest.scm
  
hint: if you look at $HOME/.guix-profile/manifest you'll see what's
installed in your default profile... *provenance* included :-)

HTH! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

Attachment: signature.asc
Description: PGP signature


reply via email to

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