On Tue, 12 Jan 2016 21:25:37 +0100 Ricardo Wurmus wrote: > Efraim Flashner 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 אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted