From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH 3/3] gnu: Add go-1.5. Date: Tue, 12 Jan 2016 21:25:37 +0100 Message-ID: <87vb6y35q6.fsf@elephly.net> References: <1452616298-6255-1-git-send-email-efraim@flashner.co.il> <1452616298-6255-4-git-send-email-efraim@flashner.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJ5Vo-0007So-Ld for guix-devel@gnu.org; Tue, 12 Jan 2016 15:25:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJ5Vj-0001Er-M2 for guix-devel@gnu.org; Tue, 12 Jan 2016 15:25:52 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:25965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJ5Vj-0001EK-Dv for guix-devel@gnu.org; Tue, 12 Jan 2016 15:25:47 -0500 In-reply-to: <1452616298-6255-4-git-send-email-efraim@flashner.co.il> 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: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner 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