sharlatan pushed a commit to branch go-team
in repository guix.
commit a2a0330ce7c88af476842853c938bc03ad8afefc
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Feb 13 13:15:04 2025 +0000
gnu: Add go-go-mau-fi-webp.
* gnu/packages/golang-xyz.scm (go-go-mau-fi-webp): New variable.
Change-Id: I5a8b7f25085bb99d3bc7798ec90a1fbc73fc36e3
---
gnu/packages/golang-xyz.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 4867d03d27..a9e3f926fa 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -16704,6 +16704,56 @@ MySQL.")
written in Go, as well as some other related libraries like whatsmeow.")
(license license:mpl2.0)))
+(define-public go-go-mau-fi-webp
+ (package
+ (name "go-go-mau-fi-webp")
+ (version "0.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tulir/webp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0g2m162kmnz1d2zpmbgja330q1p9ygdryllfzm71zr7d5pr9fc13"))
+ (modules '((guix build utils)))
+ ;; FIXME: The project indludes a copy of libwebp
+ ;; (internal/libwebp-1.5.0) which is availalbe in Guix, find out how to
+ ;; build it with it's source.
+ (snippet
+ #~(begin
+ ;; Remove files which were auto generated by 'go generate'.
+ (for-each delete-file
+ (find-files "." "^z_libwebp_src_.*\\.c$"))
+ ;; An Apple user was here (mem).
+ (for-each delete-file
+ (find-files "^\\.DS_Store$"))))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "go.mau.fi/webp"
+ ;; reader_test.go:34: image: unknown format
+ #:test-flags #~(list "-skip" "TestDecode")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-benchmarks
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (delete-file-recursively "bench"))))
+ (add-after 'unpack 'go-generate
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "go" "generate")))))))
+ (propagated-inputs (list go-golang-org-x-image))
+ (home-page "https://go.mau.fi/webp")
+ (synopsis "WebP decoder and encoder for Golang")
+ (description
+ "Package webp implements a decoder and encoder for
+@code{https://en.wikipedia.org/wiki/WebP, WebP} images. It's a maintained
+fork of @code{github.com/chai2010/webp}.")
+ (license license:bsd-3)))
+
(define-public go-go-mongodb-org-mongo-driver
(package
(name "go-go-mongodb-org-mongo-driver")