[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] gnu: Add go-1.5.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH 3/3] gnu: Add go-1.5. |
Date: |
Tue, 12 Jan 2016 21:25:37 +0100 |
User-agent: |
mu4e 0.9.13; emacs 24.5.1 |
Efraim Flashner <address@hidden> writes:
> * gnu/packages/golang.scm (go-1.5): New variable.
[...]
> + (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
- [PATCH 0/3] WIP: Go-lang, Efraim Flashner, 2016/01/12
- [PATCH 1/3] gnu: gccgo: Update to 4.9., Efraim Flashner, 2016/01/12
- [PATCH 3/3] gnu: Add go-1.5., Efraim Flashner, 2016/01/12
- Re: [PATCH 0/3] WIP: Go-lang, Ludovic Courtès, 2016/01/14
- Re: [PATCH 0/3] WIP: Go-lang, Jeff Mickey, 2016/01/14