aboutsummaryrefslogtreecommitdiff
path: root/src/org/euandre/queue.scm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-08-12 16:40:26 -0300
committerEuAndreh <eu@euandre.org>2024-08-12 16:40:26 -0300
commit304b83d50967fc7bd21ff0b8d1bbe5416a0bec7d (patch)
tree18d04fdd642b1b6975f134e2a1ea60deae656f40 /src/org/euandre/queue.scm
parentqueue.scm: Stop disabling #:tests? in "go-full" (diff)
downloadpackage-repository-304b83d50967fc7bd21ff0b8d1bbe5416a0bec7d.tar.gz
package-repository-304b83d50967fc7bd21ff0b8d1bbe5416a0bec7d.tar.xz
queue.scm: Disable Go test timeout
Diffstat (limited to 'src/org/euandre/queue.scm')
-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)))))))