gnu: go-golang-zx2c4-com-wireguard: Enable tests.

* gnu/packages/golang-web.scm (go-golang-zx2c4-com-wireguard): Enable tests.
[arguments]: <#:phases>: Use custom 'check phase.
[propagated-inputs]: Remove go-golang-org-x-text.

Change-Id: Ie6c42e5a6dc18931b4d23668fbcf5d114edbfd1f
This commit is contained in:
Sharlatan Hellseher 2024-08-12 13:41:24 +01:00
parent de2845d0c4
commit e928854a0f
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -3667,15 +3667,29 @@ (define-public go-golang-zx2c4-com-wireguard
(build-system go-build-system)
(arguments
(list
;; XXX: Failed on newer version of Golang, the recent release requires
;; gvisor.dev/gvisor, which is huge to pack.
#:tests? #f
#:import-path "golang.zx2c4.com/wireguard"))
#:import-path "golang.zx2c4.com/wireguard"
#:phases
#~(modify-phases %standard-phases
;; XXX: Workaround for go-build-system's lack of Go modules
;; support.
(replace 'check
(lambda* (#:key tests? import-path #:allow-other-keys)
(when tests?
(with-directory-excursion (string-append "src/" import-path)
(invoke "go" "test" "-v"
;; "./tune/..." ; Requires gvisor.dev/gvisor, not packed yet
"./"
"./conn/..."
"./device/..."
"./ipc/..."
"./ratelimiter/..."
"./replay/..."
"./rwcancel/..."
"./tai64n/..."))))))))
(propagated-inputs
(list go-golang-org-x-crypto
go-golang-org-x-net
go-golang-org-x-sys
go-golang-org-x-text))
go-golang-org-x-sys))
(home-page "https://git.zx2c4.com/wireguard")
(synopsis "Implementation of WireGuard in Go")
(description "This package is a Go Implementation of WireGuard.")