aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/euandre/queue.scm32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm
index 3f31d3a..c32cf35 100644
--- a/src/org/euandre/queue.scm
+++ b/src/org/euandre/queue.scm
@@ -1700,6 +1700,8 @@ connections correctly.")))
"readme=:README.md"
"readme=:README"))))
+
+(define setenvfmt "Environment variable `~a' set to `~a'.~%")
(define-public go-full
(package
(inherit go-1.22)
@@ -1709,18 +1711,26 @@ connections correctly.")))
#~(modify-phases #$phases
(add-before 'build 'recover-binary-stdlib
(lambda _
- (define (setenvrc env-var value)
- (setenv env-var value)
- (format #t
- "Environment variable `~a' set to `~a'.~%"
- env-var
- value))
- (setenvrc "GODEBUG" "installgoroot=all")))
+ (let ((name "GODEBUG")
+ (value "installgoroot=all"))
+ (setenv name value)
+ (format #t #$setenvfmt name value))))
+ ;; Not all of us work with fancy modern computers that have have
+ ;; too much memory and computing power for programmers to waste.
+ ;; Therefore, Go's default timeout of 10 minutes (!!) to run all
+ ;; tests isn't enough, so we disable it and instead inherit the
+ ;; timeout from Guix itself. How not to like software that adheres
+ ;; so well to the Unix philosophy?
+ (add-before 'build 'tolerate-slow-tests
+ (lambda _
+ (let ((name "GO_TEST_TIMEOUT_SCALE")
+ (value "0"))
+ (setenv name value)
+ (format #t #$setenvfmt name value))))
(add-after 'install 'install-binaries
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (dest (string-append out "/lib/go/pkg")))
- (copy-recursively "pkg" dest))))
+ (lambda _
+ (copy-recursively "pkg"
+ (string-append #$output "/lib/go/pkg"))))
(delete 'strip)))))))