From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: References: <87h8ic36ix.fsf@gnu.org> <87sh1oms8a.fsf@gnu.org> <87lg7gt735.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7SKI-0004JS-5F for guix-devel@gnu.org; Tue, 02 Oct 2018 17:35:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7SKE-0004VM-4J for guix-devel@gnu.org; Tue, 02 Oct 2018 17:35:30 -0400 In-reply-to: <87lg7gt735.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: "guix-devel@gnu.org" , YOANN P Ricardo Wurmus writes: > Hi George, > >> My thinking is that if there was an easy way to produce =E2=80=9Cmanifes= ts as >> passed to =E2=80=98guix package -m=E2=80=99=E2=80=9D from profiles, it w= ould 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 wher= e)))))) > (_ (error "Please provide the path to a Guix profile."))) > --8<---------------cut here---------------end--------------->8--- > > You can put this in a file =E2=80=9Cmanifest-to-manifest.scm=E2=80=9D and= run it like > this from a Guix source checkout: > > ./pre-inst-env guile -s manifest-to-manifest.scm /path/to/.guix-profi= le > 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=E2=80=99s what you=E2=80=99re looking for I suppose we could find= a place for > something like that under the umbrella of =E2=80=9Cguix package=E2=80=9D. 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 guile@2.2:debug' but only "guile" was added to my-manifest.scm. TIA! - George