diff options
author | Hilton Chain <hako@ultrarare.space> | 2023-08-10 19:43:12 +0800 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-09-06 01:25:30 -0400 |
commit | d3e12a02d3d682d954561de080401dfdd46ddee1 (patch) | |
tree | 6a4fa4eef6921782735ef87a255d4255d81a9d8c /gnu/packages/golang.scm | |
parent | e90b54ee99d78d801b497053c937c002dc19aed3 (diff) | |
download | guix-d3e12a02d3d682d954561de080401dfdd46ddee1.tar.gz |
gnu: go-github-com-tdewolff-parse-v2: Regenerate hash.
* gnu/packages/golang.scm (go-github-com-tdewolff-parse-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/packages/golang.scm')
-rw-r--r-- | gnu/packages/golang.scm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 9fc7bd9031..44953d6111 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -3712,9 +3712,22 @@ an interface to implement any other minifier.") "1dqki9ima079k9a3l72igmx5dml8qsl9z8rzw8a433f4gjhlv320")))) (build-system go-build-system) (arguments - (list #:import-path "github.com/tdewolff/parse/v2")) + (list #:import-path "github.com/tdewolff/parse/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"))))))) (native-inputs - (list go-github-com-tdewolff-test)) + (list go-github-com-tdewolff-hasher + go-github-com-tdewolff-test)) (home-page "https://github.com/tdewolff/parse") (synopsis "Go parsers for web formats") (description |