sharlatan pushed a commit to branch go-team
in repository guix.
commit 96b9886fcf95489e06d33bd7895233cea428330a
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Sep 3 21:01:49 2024 +0100
gnu: Add go-html2text.
* gnu/packages/golang-web.scm (go-html2text): New variable.
(go-github-com-jaytaylor-html2text) [source]: Adjust module import path
to use in CLI.
Change-Id: Ia440d027cb02a1d6584c6f32ff81353b22d4145a
---
gnu/packages/golang-web.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 7b4bec10d0..2e071d52d8 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -2404,7 +2404,13 @@ port mapping and discovering the external IP address of
a firewall.")
(commit (go-version->git-ref version))))
(file-name (git-file-name name version))
(sha256
- (base32 "14r0ph8w4yxx129kfvj0qbx4cyid65md93qmwlz2cly4iwjnr7w2"))))
+ (base32 "14r0ph8w4yxx129kfvj0qbx4cyid65md93qmwlz2cly4iwjnr7w2"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Module name has been changed upstream.
+ (substitute* (find-files "." "\\.go$")
+ (("jaytaylor.com/html2text")
"github.com/jaytaylor/html2text"))))))
(build-system go-build-system)
(arguments
(list #:import-path "github.com/jaytaylor/html2text"))
@@ -5584,6 +5590,22 @@ protocol.")
;;; Executables:
;;;
+(define-public go-html2text
+ (package
+ (inherit go-github-com-jaytaylor-html2text)
+ (name "go-html2text")
+ (arguments
+ (list
+ #:install-source? #f
+ #:import-path "github.com/jaytaylor/html2text/cmd/html2text"
+ #:unpack-path "github.com/jaytaylor/html2text"))
+ (native-inputs
+ (list go-github-com-pborman-getopt))
+ (description
+ (string-append (package-description go-github-com-jaytaylor-html2text)
+ " This package provides an command line interface (CLI)
+tool."))))
+
(define-public go-madns
(package
(inherit go-github-com-multiformats-go-multiaddr-dns)