summaryrefslogtreecommitdiff
path: root/gnu/packages/golang-build.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-06-20 08:06:22 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-06-29 09:37:40 +0100
commit16cf2fea8d0592eeafaed8b9fa4861a9e7f54ad1 (patch)
tree0f266a19c73e390e61bb0d1e451161d89ce11029 /gnu/packages/golang-build.scm
parentafbc1cc8b3727c371b024dcf48d46f3f3297fd33 (diff)
gnu: go-golang-org-x-sync: Enable tests.
* gnu/packages/golang-build.scm (go-golang-org-x-sync): Refresh package style. [arguments]: <#:phases>: Add custom 'check phase. Change-Id: Ibee36b53934faed80561d461090cfcfea32b5bfa
Diffstat (limited to 'gnu/packages/golang-build.scm')
-rw-r--r--gnu/packages/golang-build.scm17
1 files changed, 12 insertions, 5 deletions
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index d8dcde3759..62192cd96d 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -281,11 +281,18 @@ loading algorithms.")
(base32 "07qrhni6f5hh5p95k1yk6s4wsj341q663irvx6rllrxfsymj6a0z"))))
(build-system go-build-system)
(arguments
- `(#:import-path "golang.org/x/sync"
- #:tests? #f
- ;; Source-only package
- #:phases (modify-phases %standard-phases
- (delete 'build))))
+ (list
+ #:import-path "golang.org/x/sync"
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; XXX: Workaround for go-build-system's lack of Go modules
+ ;; support.
+ (delete 'build)
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "go" "test" "-v" "./..."))))))))
(home-page "https://go.googlesource.com/sync/")
(synopsis "Additional Go concurrency primitives")
(description "This package provides Go concurrency primitives in