gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / golang.scm
index 6e2a4e4..4bb54f0 100644 (file)
@@ -4,8 +4,9 @@
 ;;; Copyright © 2016 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
+;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;;
-;;; This file is an addendum GNU Guix.
+;;; This file is part of GNU Guix.
 ;;;
 ;;; GNU Guix is free software; you can redistribute it and/or modify it
 ;;; under the terms of the GNU General Public License as published by
                   ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
                   ("os/os_test.go" "(.+)(TestHostname.+)")
                   ("time/format_test.go" "(.+)(TestParseInSydney.+)")
+
+                  ;; Tzdata 2016g changed the name of the time zone used in this
+                  ;; test, and the patch for Go 1.7 does not work for 1.4.3:
+                  ;; https://github.com/golang/go/issues/17545
+                  ;; https://github.com/golang/go/issues/17276
+                  ("time/time_test.go" "(.+)(TestLoadFixed.+)")
+
                   ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
                   ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
                   ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
                (setenv "GOOS" "linux")
                (setenv "GOROOT" (dirname (getcwd)))
                (setenv "GOROOT_FINAL" output)
-               (setenv "CGO_ENABLED" "1")
+               ;; Go 1.4's cgo will not work with binutils >= 2.27:
+               ;; https://github.com/golang/go/issues/16906
+               (setenv "CGO_ENABLED" "0")
                (zero? (system* "sh" "all.bash")))))
 
          (replace 'install
@@ -190,7 +200,7 @@ sequential processes (CSP) concurrent programming features added.")
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.7.3")
+    (version "1.7.5")
     (source
      (origin
        (method url-fetch)
@@ -198,7 +208,7 @@ sequential processes (CSP) concurrent programming features added.")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "0i7gy5d8j6186a6x07cnj3r7mpfg3964q8byslx0p6x04w00lhvr"))))
+         "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
@@ -306,6 +316,18 @@ sequential processes (CSP) concurrent programming features added.")
                  (setenv "GOGC" "400")
                  (setenv "GO_TEST_TIMEOUT_SCALE" "9999")
                  #t)))
+
+           (replace 'build
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               ;; FIXME: Some of the .a files are not bit-reproducible.
+               (let* ((output (assoc-ref outputs "out")))
+                 (setenv "CC" (which "gcc"))
+                 (setenv "GOOS" "linux")
+                 (setenv "GOROOT" (dirname (getcwd)))
+                 (setenv "GOROOT_FINAL" output)
+                 (setenv "CGO_ENABLED" "1")
+                 (zero? (system* "sh" "all.bash")))))
+
            (replace 'install
              ;; TODO: Most of this could be factorized with Go 1.4.
              (lambda* (#:key outputs #:allow-other-keys)