From: sirgazil <sirgazil@zoho.com>
To: Giovanni Biscuolo <g@xelera.eu>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: How do I install packages from a file without removing currently installed packages?
Date: Sat, 11 May 2019 10:55:17 -0500 [thread overview]
Message-ID: <16aa79b0a8f.1022231ed32011.4291906519176852096@zoho.com> (raw)
In-Reply-To: <87zhntfl5h.fsf@roquette.mug.biscuolo.net>
Hi Giovanni,
---- On Sat, 11 May 2019 03:30:34 -0500 Giovanni Biscuolo <g@xelera.eu> wrote ----
> Hello sirgazil,
>
> sirgazil <sirgazil@zoho.com> 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:
>
> http://lists.gnu.org/archive/html/guix-devel/2018-10/msg00023.html
>
That gave me ideas. I looked at the (guix profiles) module and wrote a manifest like this for testing:
##########
(use-modules (gnu packages)
(guix profiles)
(ice-9 match)
(ice-9 pretty-print))
;;; HELPER PROCEDURES
;;; =================
(define (profile-manifest->package-names)
"Return a list with the names of the packages installed in the user
profile (see %user-profile-directory in the (guix profiles) module)."
(map manifest-entry-name
(manifest-entries (profile-manifest %user-profile-directory))))
;;; PACKAGES
;;; ========
(define packages
(append (profile-manifest->package-names)
(list "alex4"
"endless-sky")))
;;; MANIFEST
;;; ========
(packages->manifest (map specification->package packages))
##########
I think that's what I wanted.
Thanks, Giovanni :)
prev parent reply other threads:[~2019-05-11 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 15:59 How do I install packages from a file without removing currently installed packages? sirgazil
2019-05-10 17:42 ` swedebugia
2019-05-10 21:35 ` sirgazil
2019-05-10 20:49 ` ison
2019-05-10 21:29 ` sirgazil
2019-05-11 8:30 ` Giovanni Biscuolo
2019-05-11 8:55 ` Pierre Neidhardt
2019-05-11 15:55 ` sirgazil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16aa79b0a8f.1022231ed32011.4291906519176852096@zoho.com \
--to=sirgazil@zoho.com \
--cc=g@xelera.eu \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).