aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2023-08-10 19:43:13 +0800
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-09-06 01:25:31 -0400
commitc14c25b4fb625c2a5b9512618b3eb17ff15f7e71 (patch)
tree0577be3d0085caa0e397067a31bac1c1bf44046b /gnu
parentd3e12a02d3d682d954561de080401dfdd46ddee1 (diff)
downloadguix-c14c25b4fb625c2a5b9512618b3eb17ff15f7e71.tar
guix-c14c25b4fb625c2a5b9512618b3eb17ff15f7e71.tar.gz
gnu: go-github-com-tdewolff-minify-v2: Regenerate hash.
* gnu/packages/golang.scm (go-github-com-tdewolff-minify-v2)[#:phases]: Add phase 'regenerate-hash. [native-inputs]: Add go-github-com-tdewolff-hasher. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/golang.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 44953d6111..3c486c4121 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3685,11 +3685,24 @@ per-goroutine.")
"0h006wpfkl0ls0skqxblwcanrhmphgq5q0ii26l2ayh7s99cgmy3"))))
(build-system go-build-system)
(arguments
- (list #:import-path "github.com/tdewolff/minify/v2"))
+ (list #:import-path "github.com/tdewolff/minify/v2"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-hash
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (with-directory-excursion
+ (format #f "src/~a/~a" import-path dir)
+ (make-file-writable "hash.go")
+ (format #t "Generating `hash.go' for ~a...~%" dir)
+ (invoke "go" "generate")))
+ '("css" "html" "svg")))))))
(propagated-inputs
(list go-github-com-tdewolff-parse-v2))
(native-inputs
- (list go-github-com-tdewolff-test))
+ (list go-github-com-tdewolff-hasher
+ go-github-com-tdewolff-test))
(home-page "https://go.tacodewolff.nl/minify")
(synopsis "Go minifiers for web formats")
(description