From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH 3/3] gnu: Add go-1.5. Date: Wed, 13 Jan 2016 11:36:19 +0200 Message-ID: <20160113113619.10f5e02a@debian-netbook> References: <1452616298-6255-1-git-send-email-efraim@flashner.co.il> <1452616298-6255-4-git-send-email-efraim@flashner.co.il> <87vb6y35q6.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/HuveJ=+eT0X1Hb1cwq9q2o+"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJHqy-0008FR-3g for guix-devel@gnu.org; Wed, 13 Jan 2016 04:36:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJHqu-000507-0b for guix-devel@gnu.org; Wed, 13 Jan 2016 04:36:32 -0500 Received: from flashner.co.il ([178.62.234.194]:53314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJHqt-0004zo-N8 for guix-devel@gnu.org; Wed, 13 Jan 2016 04:36:27 -0500 In-Reply-To: <87vb6y35q6.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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel@gnu.org --Sig_/HuveJ=+eT0X1Hb1cwq9q2o+ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 12 Jan 2016 21:25:37 +0100 Ricardo Wurmus wrote: > Efraim Flashner writes: >=20 > [...] =20 >=20 > [...] >=20 > > + (arguments > > + (substitute-keyword-arguments (package-arguments go-1.4) > > + ((#:phases phases) > > + `(modify-phases ,phases > > + (replace 'build > > + (let* ((bash (assoc-ref %build-inputs "bash")) > > + (go14 (assoc-ref %build-inputs "go-1.4")) > > + (output (assoc-ref %outputs "out"))) > > + (setenv "CC" "gcc") > > + (setenv "GOPATH" (string-append (getcwd) "/go")) > > + (setenv "GOROOT_BOOTSTRAP" go14) > > + (setenv "GOROOT_FINAL" output) > > + (lambda _ > > + (zero? > > + (system* (string-append bash "/bin/bash") "make.bash")= )))))))) =20 >=20 > This looks weird. Shouldn=E2=80=99t the =E2=80=9Clet=E2=80=9D and the = =E2=80=9Csetenv=E2=80=9D be inside the > =E2=80=9Clambda=E2=80=9D? (BTW: this is a perfect usecase for =E2=80=9CM= -x > paredit-convolute-sexp=E2=80=9D, after placing point before =E2=80=9C(zer= o?=E2=80=9D.) >=20 > I think you could do this instead: >=20 > `(modify-phases ,phases > (replace 'build > (lambda* (#:key inputs outputs #:allow-other-keys) > (let ((go14 (assoc-ref inputs "go-1.4")) > (output (assoc-ref outputs "out"))) > (setenv "CC" "gcc") > (setenv "GOPATH" (string-append (getcwd) "/go")) > (setenv "GOROOT_BOOTSTRAP" go14) > (setenv "GOROOT_FINAL" output) > (zero? (system* "bash" "make.bash")))))) >=20 > ~~ Ricardo >=20 This looks better than before, and having the lambda earlier is better/safer. I've applied the same change to go-1.4 also. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Sig_/HuveJ=+eT0X1Hb1cwq9q2o+ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWlhqTAAoJEPTB05F+rO6T1A4P/jO6zgRsViM+WGqwJOcMHB59 KjF5CthqvTxtUhCNXu5hYSiJ0RpSGOUxXfAVUnqTJ3OT4622EzV79wBJCOPdUaqC wu1nYrDWp5cfChtBD8y9XTyCOc/rY0WUdp7I/jLqntBQ74bHyq5IxOPGyoGE6++d 6It3XaXWt5x8aqu+m/oezfMX6psB7PmvVQ/wRg9WQ3oAZGRF6LGzTVmoCw12KGPT 5yi+iUPeFqmbI58iWXFfnW+Y/llCyyeyNq5vmwqHzl4NiB32QU3vemBiyVkluzB7 MrGOmYb1LFXECx/fFcQc0LCfdZ2cMO2HUXO7IFHlXPLXNsPsuhMvrDmztRmf6Kvt dY9tcRtC5HZQgORxbVeMkgdUcg9Ern2+7DX0Qv2JSVhEhGJBpG4ezG2DdKtwrN7G CNYSCHf9O8TrrRSJWfbJpFaBoV1TNFtVU8M4RfLC0Sqd9mwGRzCtFfBKGWbhCRf9 R2yNaTzWOvRBKLXZzzmHp52RGjK/pRmEvg0I/1iNnWcA7+l3LKVPkVmZzRiVT5Du Oc09sFfjrDsRedt9zxK9UEpUXQDEKO5BLEXe5HFCD7HKCXeCGauBsfcUnK860gll VccChOh6U2HcThCqooq4cTQ+ORhkfBKeBtB28wE5gmM5e0sr2+qC19jIlOtVd0Vx G0BCA1Z147SZvS0vCLhQ =a6XS -----END PGP SIGNATURE----- --Sig_/HuveJ=+eT0X1Hb1cwq9q2o+--