From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Profiles/manifests-related command line interface enhancements Date: Thu, 7 Nov 2019 13:57:08 +0100 Message-ID: References: <87mudrxvs8.fsf@ambrevar.xyz> <87mudd59ho.fsf@gnu.org> <877e4glyc3.fsf@ambrevar.xyz> <87ftj1x8fw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:32955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iShLo-0008KK-GJ for guix-devel@gnu.org; Thu, 07 Nov 2019 07:57:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iShLn-0004mi-GC for guix-devel@gnu.org; Thu, 07 Nov 2019 07:57:24 -0500 In-Reply-To: <87ftj1x8fw.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix Devel Hi Ludo, On Wed, 6 Nov 2019 at 17:42, Ludovic Court=C3=A8s wrote: > >>> - A Scheme function to create a manifest for the necessary inputs of = a > >>> package, like =3Dguix environment PACKAGE=3D does. (Maybe it's alr= eady possible?) > >> > >> Like =E2=80=98specifications->manifest=E2=80=99? > > > > Can specifications->manifest do this? > > > > Concrete example: You want a profile to work on IceCat, so you need a > > manifest that has all the necessary inputs required to work with Icecat= . > > How can we automate the generation of the manifest? > > Ah, that no. But (guix scripts environment) has > =E2=80=98package-environment-inputs=E2=80=99, which does exactly that, an= d I guess we > could expose it and document it. Maybe I am doing wrong but I get: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix package -p /tmp/guix-dev -m ~/tmp/manif-dep.scm installing new manifest from '/home/simon/tmp/manif-dep.scm' with 53 entrie= s guix package: error: profile contains conflicting entries for gzip guix package: error: first entry: gzip@1.10 /gnu/store/py3k9zla9fj3z7430v4crqj5pyrsd3qj-gzip-1.10 guix package: error: second entry: gzip@1.10 /gnu/store/i2cdl0hvrml8hjdqplqln8didnvxkgp5-gzip-1.10 hint: You cannot have two different versions or variants of `gzip' in the same profile. --8<---------------cut here---------------end--------------->8--- where I tweak guix/scripts/environment.scm to export `package-environment-inputs' and ~/tmp/manif-dep.scm contains: --8<---------------cut here---------------start------------->8--- (use-modules (guix) (guix profiles) (guix scripts environment) (gnu packages package-management)) (make-manifest (package-environment-inputs guix)) --8<---------------cut here---------------end--------------->8--- > More generally, =E2=80=98guix environment=E2=80=99 was initially designed= in a quite > monolithic fashion, and I think we could expose its functionality in > sizable bites. For instance, Dave suggested long ago exposing an > data type, and that=E2=80=99s one thing that could be very = useful. What do you mean by an data type? All the best, simon