gnu: go-github-com-masterminds-sprig-v3: Enable tests.

* gnu/packages/golang-xyz.scm (go-github-com-masterminds-sprig-v3)
[arguments]: <#:tests?>: Enable them.
<#:phases>: Add 'remove-network-tests phase.

Change-Id: I526f8c7d273ea3d88f8844da97293a1080471c62
This commit is contained in:
Sharlatan Hellseher 2024-06-18 17:56:42 +01:00
parent 1afefe0f0f
commit d9f720b7ef
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -2359,8 +2359,15 @@ (define-public go-github-com-masterminds-sprig-v3
(build-system go-build-system)
(arguments
(list
#:tests? #f ;network tests only
#:import-path "github.com/Masterminds/sprig/v3"))
#:import-path "github.com/Masterminds/sprig/v3"
#:phases
#~(modify-phases %standard-phases
;; Tests tries to reach Google:
;; tpl := `{{"www.google.com" | getHostByName}}`
(add-after 'unpack 'remove-network-tests
(lambda* (#:key import-path #:allow-other-keys)
(delete-file
(string-append "src/" import-path "/network_test.go")))))))
(native-inputs
(list go-github-com-stretchr-testify))
(propagated-inputs