[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
Re: How do I install packages from a file without removing currently installed packages?
Sat, 11 May 2019 10:55:17 -0500
---- On Sat, 11 May 2019 03:30:34 -0500 Giovanni Biscuolo <address@hidden>
> 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...
Guix environment will work for other use cases I have, but not for this one.
Because once I exit an environment the packages I installed there are not kept
around, but I want the packages specified in the manifest to be added to the
user profile. Also, I can't do just "guix environment -m FILE", I have to
provide at least one package as an argument for PACKAGES..., and that would not
make sense in my use case.
> 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:
That gave me ideas. I looked at the (guix profiles) module and wrote a manifest
like this for testing:
(use-modules (gnu packages)
;;; HELPER PROCEDURES
"Return a list with the names of the packages installed in the user
profile (see %user-profile-directory in the (guix profiles) module)."
(manifest-entries (profile-manifest %user-profile-directory))))
(packages->manifest (map specification->package packages))
I think that's what I wanted.
Thanks, Giovanni :)