From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: ~/.guix-profile/manifest usage with "guix package -m [manifest]" / "guix pack -m [manifest]" etc.. Date: Mon, 08 Oct 2018 14:26:41 +0200 Message-ID: <871s9039q6.fsf@gnu.org> 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]:58004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9Ucd-0002ZD-2i for guix-devel@gnu.org; Mon, 08 Oct 2018 08:26:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9Ucc-0002lQ-8J for guix-devel@gnu.org; Mon, 08 Oct 2018 08:26:51 -0400 In-Reply-To: <87lg7gt735.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 02 Oct 2018 22:41:02 +0200") 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 , George Clemmer Hello, Ricardo Wurmus skribis: >> 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? > > (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."))) > > 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 I like how the script=E2=80=99s name highlights the naming inconsistency. = :-) > 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. The problem, as I see it, is that this might give a false impression that both =E2=80=9Cmanifests=E2=80=9D are entirely equivalent, which is not= the case. I sympathize with George=E2=80=99s idea of making it easier to move from the incremental style to the declarative style, but I wonder if we should go beyond suggesting to basically copy the package names shown in =E2=80=9Cguix package -I=E2=80=9D to the manifest file. Thoughts? Ludo=E2=80=99.