From d9f720b7ef34934f8964c1a3879b5aab3a09bbd1 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 18 Jun 2024 17:56:42 +0100 Subject: [PATCH] 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 --- gnu/packages/golang-xyz.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 786ab1d200..ca48d5ed6c 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -2359,8 +2359,15 @@ implementing features like: (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