From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: How do I make a manifest file that installs a specific version of a dependency? Date: Mon, 13 Mar 2017 01:17:36 -0700 Message-ID: <87mvcpy4in.fsf@gmail.com> References: <87shmi17wy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnLAp-0005iZ-2n for help-guix@gnu.org; Mon, 13 Mar 2017 04:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnLAk-0002Oz-3F for help-guix@gnu.org; Mon, 13 Mar 2017 04:17:47 -0400 In-Reply-To: <87shmi17wy.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 12 Mar 2017 22:50:37 +0100") 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: help-guix@gnu.org, Zachary Kanfer --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello, > > Zachary Kanfer skribis: > >> Running `guix package -m` on a file with this line `(list icedtea-2.6 >> "jdk")` gives an error "In procedure module-lookup: Unbound variable: >> icedtea-2.6". >> >> I get the same error for the following lines: >> >> `(list icedtea-2.6.6 "jdk")` >> `(list icedtea@2.6.6 "jdk")` >> >> `guix package -s icedtea` reports that there is a version 2.6.6. How do I >> specify this in a manifest file? Thanks. > > You should use =E2=80=98specification->package=E2=80=99 as discussed at > . > > The =E2=80=98specification->package=E2=80=99 procedure takes a spec like = those you=E2=80=99d > write on the =E2=80=98guix package -i=E2=80=99 command line, and returns = the > corresponding package. =E2=80=98specification->package+output=E2=80=99 w= orks similarly > but also returns the specified output (the part that comes after the > colon). > > So your manifest would look something like: > > (use-modules (gnu)) > > (packages->manifest > (map (compose list specification->package+output) > '("icedtea@2.6.6:jdk" "emacs" "vim" =E2=80=A6))) > > HTH! > > Ludo=E2=80=99. Just for fun, I tried running some commands in a REPL. I wanted to find out why the "list" procedure was being used here. What I saw was this: =2D-8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (specification->package+output "icedtea@2.6.9:jdk") $6 =3D # $7 =3D "jdk" scheme@(guile-user)> (list (specification->package+output "icedtea@2.6.9:jd= k")) $8 =3D (#) scheme@(guile-user)> (map (compose list specification->package+output) '("i= cedtea@2.6.9:jdk")) $9 =3D ((# "jdk")) scheme@(guile-user)> =2D-8<---------------cut here---------------end--------------->8--- Why does the string "jdk" appear in $9 but not in $8? It looks like the list procedure ignored the second value (the "jdk" string) when producing $8, but not when producing $9. Is that true? Why? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAljGVaAACgkQ3UCaFdgi Rp0vZQ/9EkE5ZDjwiWHhZ+phYL9GPi8X3OplK4vrE/A8XxzluZvLALidEnKbTx7O hyNujh4i6/XAcPasK2d+vvR4nMjs5rgceldB26mpdjOnvYY5JFmCRaHkHEWbpklK Cz1y1j+hIsXMfF7gVV5cjwX6N4rmwbAPugRIweInxlgRUif28JznXYoXzjaudFhq M1p5eYNbX2LJW+hMIzWUYmWPUOwKa13vBHDEJhAw5O5QQlEQjNn/dYYwe1tzqe5U g4gN83yKsduDUqQgRaJPD4WJMcioED94era1SW3x8bAXmAtLUDFC2gkXwlfzfKt7 ax77w73vQvYhpnVijb7QrvDprgV6mNshzljCLSwf4ox9QG13hsTIANkx3RGvezAI BeI2dYIzga78tzt6b7CyaQV3gqJWLZiJyArsEwtPY2iDp3b58coDCNyPqJNpzisQ EI6DIcoVkVh8Y8jxmLHF78bgDyaAeiH5srK1Vp4NJpeEA4lF6pnrPFnwAsJAFfX7 CKWt74L4p2LOrjlOrrokiwFAKfVkAI5BuuLH4SZLt2LioisL5V7xqHc2Pqiam96Z oSg5LcH7nxIwc2uLfSqHqmDzOGxx2R0miOjzj7o9KBzb+KvrMaojqI83XaK/VOwN LVwU2hroZavBUm4IcoghPZA+EUc2Q2JBO8Hh+/1rdEVIBQO0s0M= =TO+I -----END PGP SIGNATURE----- --=-=-=--