sharlatan pushed a commit to branch go-team
in repository guix.
commit 1f406f20cdefb9fa3b8d9c766d7d3c0d48dc9236
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sat Feb 15 19:07:55 2025 +0000
gnu: Add go-github-com-ghodss-yaml.
* gnu/packages/golang-xyz.scm (go-github-com-ghodss-yaml): New variable.
Change-Id: If8172ffc3c41545e4dd247bf5c2229a95ac09970
---
gnu/packages/golang-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index c8ec3f9028..0ca4170144 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -3750,6 +3750,38 @@ submodules:
font files in your system's user and system font directories.")
(license license:expat)))
+(define-public go-github-com-ghodss-yaml
+ (package
+ (name "go-github-com-ghodss-yaml")
+ (version "1.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ghodss/yaml")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0skwmimpy7hlh7pva2slpcplnm912rp3igs98xnqmn859kwa5v8g"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/ghodss/yaml"))
+ (propagated-inputs
+ (list go-gopkg-in-yaml-v2))
+ (home-page "https://github.com/ghodss/yaml")
+ (synopsis "YAML marshaling and unmarshaling support for Go")
+ (description
+ "This package provides a wrapper around
+@url{https://github.com/go-yaml/yaml, go-yaml} designed to enable a better way
+of handling YAML when marshaling to and from structs.
+
+It first converts YAML to JSON using go-yaml and then uses @code{json.Marshal}
+and @code{json.Unmarshal} to convert to or from the struct. This means that
+it effectively reuses the JSON struct tags as well as the custom JSON methods
+@code{MarshalJSON} and @code{UnmarshalJSON} unlike go-yaml.")
+ (license license:expat)))
+
(define-public go-github-com-go-md2man
(package
(name "go-github-com-go-md2man")