guix-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]