From mboxrd@z Thu Jan 1 00:00:00 1970 From: sirgazil Subject: Re: How do I install packages from a file without removing currently installed packages? Date: Sat, 11 May 2019 10:55:17 -0500 Message-ID: <16aa79b0a8f.1022231ed32011.4291906519176852096@zoho.com> References: <16aa278da65.c6dd197c22998.5984578131160668235@zoho.com> <87zhntfl5h.fsf@roquette.mug.biscuolo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPUad-0004Vf-Ej for help-guix@gnu.org; Sat, 11 May 2019 12:11:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPULU-0003g9-Mp for help-guix@gnu.org; Sat, 11 May 2019 11:55:33 -0400 Received: from sender4-pp-o95.zoho.com ([136.143.188.95]:25537) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPULU-0003bu-BU for help-guix@gnu.org; Sat, 11 May 2019 11:55:32 -0400 In-Reply-To: <87zhntfl5h.fsf@roquette.mug.biscuolo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Giovanni Biscuolo Cc: help-guix Hi Giovanni, ---- On Sat, 11 May 2019 03:30:34 -0500 Giovanni Biscuolo wrote ---- > Hello sirgazil, > > sirgazil 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 :)