gnu: go-honnef-co-go-tools: Enable tests.

* gnu/packages/golang-check.scm (go-honnef-co-go-tools): Apply new
package style.
[arguments]: <#:phases>: Use custom 'check phase.

Change-Id: Idecf23f79ea554a84bce57a4dd356dde5f0b300a
This commit is contained in:
Sharlatan Hellseher 2024-07-13 14:51:17 +01:00
parent 59b22fbe0e
commit 39b908a389
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -1336,11 +1336,17 @@ (define-public go-honnef-co-go-tools
"1n58skq2a0vhsgdfdkyqi00d3vv13kiw9b4mxx6xfyb6ysrdy7d1"))))
(build-system go-build-system)
(arguments
`(#:import-path "honnef.co/go/tools"
#:tests? #f
;; Source-only package
#:phases (modify-phases %standard-phases
(delete 'build))))
(list
#:import-path "honnef.co/go/tools"
#: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" "./..."))))))))
(propagated-inputs
(list go-github-com-burntsushi-toml
go-golang-org-x-exp-typeparams