summaryrefslogtreecommitdiff
path: root/gnu/packages/golang.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-12-12 11:53:38 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-12-12 14:25:45 +0200
commit8226771a337df104e3c6a7cb123a968e1226a619 (patch)
tree704c5eb8f92483817e16653dcb5cf68fd612ce80 /gnu/packages/golang.scm
parent492dac2fb0c2533571cb3b4f27ab5b730c1cf65f (diff)
downloadguix-patches-8226771a337df104e3c6a7cb123a968e1226a619.tar
guix-patches-8226771a337df104e3c6a7cb123a968e1226a619.tar.gz
gnu: go-1.14: Fix building on some platforms.
* gnu/packages/golang.scm (go-1.14)[arguments]: In custom 'prebuild phase also search for loader without 'linux' in the string. In custom 'build phase set the GOCACHE directory. [native-inputs]: On systems which don't have support in go-1.4 use gccgo-10 instead.
Diffstat (limited to 'gnu/packages/golang.scm')
-rw-r--r--gnu/packages/golang.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 41f4d1d218..e54692205d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -272,7 +272,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
(ld (string-append (assoc-ref inputs "libc") "/lib"))
- (loader (car (find-files ld "^ld-linux.+")))
+ (loader (car (append (find-files ld "^ld-linux.+")
+ (find-files ld "^ld(64)?\\.so.+"))))
(net-base (assoc-ref inputs "net-base"))
(tzdata-path
(string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
@@ -409,6 +410,7 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOOS" "linux")
(setenv "GOROOT" (dirname (getcwd)))
(setenv "GOROOT_FINAL" output)
+ (setenv "GOCACHE" "/tmp/go-cache")
(setenv "CGO_ENABLED" "1")
(invoke "sh" "all.bash"))))
(replace 'install
@@ -447,7 +449,9 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(copy-recursively "../" output)
#t)))))))
(native-inputs
- `(("go" ,go-1.4)
+ `(,@(if (member (%current-system) (package-supported-systems go-1.4))
+ `(("go" ,go-1.4))
+ `(("go" ,gccgo-10)))
("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch"))
,@(match (%current-system)
((or "armhf-linux" "aarch64-linux")