unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 3/3] gnu: Add go-1.5.
Date: Wed, 13 Jan 2016 11:36:19 +0200	[thread overview]
Message-ID: <20160113113619.10f5e02a@debian-netbook> (raw)
In-Reply-To: <87vb6y35q6.fsf@elephly.net>

[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]

On Tue, 12 Jan 2016 21:25:37 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:

> Efraim Flashner <efraim@flashner.co.il> writes:
> 
>  [...]  
> 
> [...]
> 
> > +    (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")))))))))  
> 
> This looks weird.  Shouldn’t the “let” and the “setenv” be inside the
> “lambda”?  (BTW: this is a perfect usecase for “M-x
> paredit-convolute-sexp”, after placing point before “(zero?”.)
> 
> I think you could do this instead:
> 
>    `(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"))))))
> 
> ~~ Ricardo
> 

This looks better than before, and having the lambda earlier is
better/safer.  I've applied the same change to go-1.4 also.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-13  9:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 16:31 [PATCH 0/3] WIP: Go-lang Efraim Flashner
2016-01-12 16:31 ` [PATCH 1/3] gnu: gccgo: Update to 4.9 Efraim Flashner
2016-01-14 15:09   ` Ludovic Courtès
2016-01-12 16:31 ` [PATCH 2/3] gnu: Add go-1.4 Efraim Flashner
2016-01-14 15:12   ` Ludovic Courtès
2016-01-14 21:12     ` Efraim Flashner
2016-01-15 16:14       ` Ludovic Courtès
2016-01-12 16:31 ` [PATCH 3/3] gnu: Add go-1.5 Efraim Flashner
2016-01-12 20:25   ` Ricardo Wurmus
2016-01-13  9:36     ` Efraim Flashner [this message]
2016-01-14 15:13   ` Ludovic Courtès
2016-01-14 15:08 ` [PATCH 0/3] WIP: Go-lang Ludovic Courtès
2016-01-14 19:14   ` Jeff Mickey
2016-01-14 21:40     ` Efraim Flashner
2016-01-14 21:37   ` Leo Famulari
2016-01-14 21:42   ` Efraim Flashner
2016-01-14 19:17 ` Jeff Mickey
2016-01-14 21:37   ` Efraim Flashner
2016-01-14 22:27     ` Jeff Mickey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160113113619.10f5e02a@debian-netbook \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).