gnu: Add go-golang.org-x-net-html.
[jackhill/guix/guix.git] / gnu / packages / golang.scm
index 3b42bf3..414d671 100644 (file)
@@ -487,6 +487,125 @@ jar struct to manage the cookies added to the cookie jar.")
       (home-page "https://github.com/aki237/nscjar")
       (license license:expat))))
 
+(define-public go-github-com-golangplus-fmt
+  (package
+    (name "go-github-com-golangplus-fmt")
+    (version "1.0.0")
+    (home-page "https://github.com/golangplus/fmt")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "07d5kxz0f8ss3v46y0c8jg02sagi0wlaaijhjzzp0r462jyzqii7"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/golangplus/fmt"))
+    (synopsis "Additions to Go's standard @code{fmt} package")
+    (description "This package provides additions to Go's stdlib @code{fmt}.")
+    (license license:bsd-3)))
+
+(define-public go-github-com-motemen-go-colorine
+  (let ((commit "45d19169413a019e4e2be69629dde5c7d92f8706")
+        (revision "0"))
+    (package
+      (name "go-github-com-motemen-go-colorine")
+      (version (git-version "0.0.0" revision commit))
+      (home-page "https://github.com/motemen/go-colorine")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "1mdy6q0926s1frj027nlzlvm2qssmkpjis7ic3l2smajkzh07118"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "github.com/motemen/go-colorine"))
+      (inputs
+       `(("github.com/daviddengcn/go-colortext" ,go-github-com-daviddengcn-go-colortext)))
+      (synopsis "Simple colorized console logger for golang")
+      (description
+       "This package provides simple colorized console logger for golang.")
+      (license license:expat))))
+
+(define-public go-github-com-daviddengcn-go-colortext
+  (package
+    (name "go-github-com-daviddengcn-go-colortext")
+    (version "1.0.0")
+    (home-page "https://github.com/daviddengcn/go-colortext")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0j5ldwg3a768d3nniiglghr9axj4p87k7f7asqxa1a688xvcms48"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/daviddengcn/go-colortext"))
+    (native-inputs
+     `(("go-github-com-golangplus-testing" ,go-github-com-golangplus-testing)))
+    (synopsis "Change the color of console text and background")
+    (description
+     "This is a package to change the color of the text and background in the
+console, working both under Windows and other systems.
+
+Under Windows, the console APIs are used.  Otherwise, ANSI texts are output.")
+    ;; dual-licensed
+    (license (list license:bsd-3 license:expat))))
+
+(define-public go-github-com-golangplus-testing
+  (package
+    (name "go-github-com-golangplus-testing")
+    (version "1.0.0")
+    (home-page "https://github.com/golangplus/testing")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "1a29m4zplf9m14k74lrb55dids2l17vx28sv0g3y3qcv1xygksiv"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/golangplus/testing"))
+    (propagated-inputs
+     `(("go-github-com-golangplus-fmt" ,go-github-com-golangplus-fmt)))
+    (synopsis "Additions to Go's standard testing package")
+    (description "This package provides additions to Go's stdlib testing.")
+    (license license:bsd-3)))
+
+(define-public go-github-com-leodido-go-urn
+  (package
+    (name "go-github-com-leodido-go-urn")
+    (version "1.2.0")
+    (home-page "https://github.com/leodido/go-urn")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1d4g1vkhc1180l1n7q48vl84b27c7cziywml78cyijbcdz2f8vim"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/leodido/go-urn"))
+    (native-inputs
+     `(("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify)))
+    (synopsis "Parser for uniform resource names as seen on RFC 2141")
+    (description
+     "This package implements a parser for uniform resource names (URN) as
+specified by @uref{https://tools.ietf.org/html/rfc2141, IETF RFC 2141}.")
+    (license license:expat)))
+
 (define-public go-github.com-jessevdk-go-flags
   (package
     (name "go-github.com-jessevdk-go-flags")
@@ -512,6 +631,150 @@ way of specifying command line options.")
     (home-page "https://github.com/jessevdk/go-flags")
     (license license:bsd-3)))
 
+(define-public go-gopkg-in-go-playground-assert-v1
+  (package
+    (name "go-gopkg-in-go-playground-assert-v1")
+    (version "1.2.1")
+    (home-page "https://github.com/go-playground/assert")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1h4amgykpa0djwi619llr3g55p75ia0mi184h9s5zdl8l4rhn9pm"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "gopkg.in/go-playground/assert.v1"))
+    (synopsis "Basic assertion library used alongside native Go testing")
+    (description
+     "This package provides bassic assertions along with building blocks for
+custom assertions to be used alongside native Go testing.")
+    (license license:expat)))
+
+(define-public go-github-com-go-playground-locales
+  (package
+    (name "go-github-com-go-playground-locales")
+    (version "0.13.0")
+    (home-page "https://github.com/go-playground/locales")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0qydcpkvss3mf8mk3xzg6a34n8i69aydrigcl2apifrkx72jw7pf"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/go-playground/locales"))
+    (synopsis "Set of locales generated from the CLDR Unicode Project")
+    (description
+     "This package provides a set of locales generated from the
+@uref{http://cldr.unicode.org/, Unicode CLDR Project} which can be used
+independently or within an internalization (i18n) package.  Its currently
+implemented features include
+
+@itemize
+@item Rules generated from the CLDR data, v31.0.3
+@item Contains Cardinal, Ordinal and Range Plural Rules
+@item Contains Month, Weekday and Timezone translations built in
+@item Contains Date & Time formatting functions
+@item Contains Number, Currency, Accounting and Percent formatting functions
+@item Supports the \"Gregorian\" calendar only
+@end itemize")
+    (license license:expat)))
+
+(define-public go-github-com-go-playground-universal-translator
+  (package
+    (name "go-github-com-go-playground-universal-translator")
+    (version "0.17.0")
+    (home-page "https://github.com/go-playground/universal-translator")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1zdiaisb32iv4x93cpbqrgx8ll7sxh4hcd2iibpswy4bwvjbjlz6"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/go-playground/universal-translator"))
+    (propagated-inputs
+     `(("go-github-com-go-playground-locales" ,go-github-com-go-playground-locales)))
+    (synopsis "Translator using Unicode CLDR data and pluralization rules")
+    (description
+     "This package offers an Internalization Translator for Go using
+@uref{http://cldr.unicode.org/, Unicode CLDR Project} data and pluralization
+rules.  Its currently implemented features include
+
+@itemize
+@item Rules generated from the CLDR data, v30.0.3
+@item Contains Cardinal, Ordinal and Range Plural Rules
+@item Contains Month, Weekday and Timezone translations built in
+@item Contains Date & Time formatting functions
+@item Contains Number, Currency, Accounting and Percent formatting functions
+@item Supports the \"Gregorian\" calendar only
+@item Support loading translations from files
+@item Exporting translations to file(s), mainly for getting them
+professionally translated
+@end itemize")
+    (license license:expat)))
+
+(define-public go-gopkg-in-go-playground-validator-v9
+  (package
+    (name "go-gopkg-in-go-playground-validator-v9")
+    (version "9.31.0")
+    (home-page "https://gopkg.in/go-playground/validator.v9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/go-playground/validator")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1f8c77s8kx9rip2jarv27x5s4xkcmanh4ndyhbcwvrhncs5rq061"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "gopkg.in/go-playground/validator.v9"))
+    (native-inputs
+     `(("go-gopkg-in-go-playground-assert-v1"
+        ,go-gopkg-in-go-playground-assert-v1)))
+    (propagated-inputs
+     `(("go-github-com-go-playground-universal-translator"
+        ,go-github-com-go-playground-universal-translator)
+       ("go-github-com-leodido-go-urn" ,go-github-com-leodido-go-urn)))
+    (synopsis "Validator for structs and individual fields based on tags")
+    (description
+     "This package implements value validations for structs and individual
+fields based on tags.  It has the following unique features:
+
+@itemize
+@item Cross Field and Cross Struct validations by using validation tags or
+custom validators
+@item Slice, Array and Map diving, which allows any or all levels of a
+multidimensional field to be validated
+@item Ability to dive into both map keys and values for validation
+@item Handles type interface by determining it's underlying type prior to validation
+@item Handles custom field types such as sql driver
+@uref{https://golang.org/src/database/sql/driver/types.go?s=1210:1293#L29,
+Valuer}
+@item Alias validation tags, which allows for mapping of several validations
+to a single tag for easier defining of validations on structs
+@item Extraction of custom defined Field Name e.g. can specify to extract the
+JSON name while validating and have it available in the resulting FieldError
+@item Customizable i18n aware error messages.
+@item Default validator for the @uref{https://github.com/gin-gonic/gin, gin}
+web framework
+@end itemize")
+    (license license:expat)))
+
 (define-public go-github-com-aws-sdk
   (package
     (name "go-github-com-aws-sdk")
@@ -800,6 +1063,18 @@ for the Go language.")
       (home-page "https://go.googlesource.com/net")
       (license license:bsd-3))))
 
+(define-public go-golang-org-x-net-html
+  (package
+    (inherit go-golang-org-x-net)
+    (name "go-golang.org-x-net-html")
+    (arguments
+     '(#:import-path "golang.org/x/net/html"
+       #:unpack-path "golang.org/x/net"))
+    (synopsis "HTML5-compliant tokenizer and parser")
+    (description
+     "This package provides an HTML5-compliant tokenizer and parser.")
+    (home-page "https://godoc.org/golang.org/x/net/html")))
+
 (define-public go-golang-org-x-image
   (let ((commit "58c23975cae11f062d4b3b0c143fe248faac195d")
         (revision "1"))
@@ -1191,6 +1466,46 @@ Features include:
 optimized for performance yet simple to use.")
       (license license:expat))))
 
+(define-public go-github-com-tomnomnom-gron
+  (package
+    (name "gron")
+    (version "0.6.0")
+    (home-page "https://github.com/tomnomnom/gron")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "05f3w4zr15wd7xk75l12y5kip4gnv719a2x9w2hy23q3pnss9wk0"))))
+    (build-system go-build-system)
+    (arguments
+     (let ((import-path "github.com/tomnomnom/gron"))
+       `(#:import-path ,import-path
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'check 'remove-non-source
+             (lambda _
+               (for-each (lambda (dir)
+                           (delete-file-recursively
+                            (string-append "src/" ,import-path dir)))
+                         '("/docs" "/script" "/testdata"))
+               #t))))))
+    (inputs
+     `(("github.com/fatih/color" ,go-github-com-fatih-color)
+       ("github.com/mattn/go-colorable" ,go-github-com-mattn-go-colorable)
+       ("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty)
+       ("github.com/nwidger/jsoncolor" ,go-github-com-nwidger-jsoncolor)
+       ("github.com/pkg/errors" ,go-github-com-pkg-errors)))
+    (synopsis "Transform JSON to make it easier to grep")
+    (description
+     "This package transforms JSON into discrete assignments to make it easier
+to use line-based tools such as grep to search for what you want and see the
+absolute \"path\" to it.")
+    (license license:expat)))
+
 (define-public go-github-com-tv42-httpunix
   (let ((commit "2ba4b9c3382c77e7b9ea89d00746e6111d142a22")
         (revision "0"))
@@ -1240,30 +1555,28 @@ sockets.")
       (license license:expat))))
 
 (define-public go-github-com-emicklei-go-restful
-  (let ((commit "89ef8af493ab468a45a42bb0d89a06fccdd2fb22")
-        (revision "0"))
-    (package
-      (name "go-github-com-emicklei-go-restful")
-      (version (git-version "0.0.0" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/emicklei/go-restful")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "0rrlfcfq80fkxifpih6bq31vavb5mf4530xz51pp9pq1mn2fzjfh"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "github.com/emicklei/go-restful"))
-      (home-page "https://github.com/emicklei/go-restful")
-      (synopsis "Build REST-style web services using Go")
-      (description "This package provides @code{go-restful}, which helps
+  (package
+    (name "go-github-com-emicklei-go-restful")
+    (version "3.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/emicklei/go-restful")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0m1y5a6xr6hmdj77afrvyh2llkbhn1166lcrgis654shl8zs9qhz"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/emicklei/go-restful"))
+    (home-page "https://github.com/emicklei/go-restful")
+    (synopsis "Build REST-style web services using Go")
+    (description "This package provides @code{go-restful}, which helps
 developers to use @code{http} methods explicitly and in a way that's consistent
 with the HTTP protocol definition.")
-      (license license:expat))))
+    (license license:expat)))
 
 (define-public go-github-com-google-cadvisor
   (let ((commit "2ed7198f77395ee9a172878a0a7ab92ab59a2cfd")
@@ -1708,7 +2021,7 @@ application's http.Handlers.")
 (define-public go-github-com-magiconair-properties
   (package
     (name "go-github-com-magiconair-properties")
-    (version "1.8.1")
+    (version "1.8.4")
     (source
      (origin
        (method git-fetch)
@@ -1718,7 +2031,7 @@ application's http.Handlers.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "19zqw1x0w0crh8zc84yy82nkcc5yjz72gviaf2xjgfm5a8np7nyb"))))
+         "0q7d55z0v8y55dyy8nhgdnswf5zkgj3i87irbk294nvzhx01bnxd"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/magiconair/properties"))
@@ -2122,32 +2435,30 @@ terminal.")
     (license license:expat)))
 
 (define-public go-github-com-mattn-go-colorable
-  (let ((commit "efa589957cd060542a26d2dd7832fd6a6c6c3ade")
-        (revision "0"))
-    (package
-      (name "go-github-com-mattn-go-colorable")
-      (version (git-version "0.0.0" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/mattn/go-colorable")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "0kshi4hvm0ayrsxqxy0599iv81kryhd2fn9lwjyczpj593cq069r"))))
-      (build-system go-build-system)
-      (native-inputs
-       `(("go-github-com-mattn-go-isatty"
-          ,go-github-com-mattn-go-isatty)))
-      (arguments
-       '(#:import-path "github.com/mattn/go-colorable"))
-      (home-page "https://github.com/mattn/go-colorable")
-      (synopsis "Handle ANSI color escapes on Windows")
-      (description "This package provides @code{colorable}, a module that
+  (package
+    (name "go-github-com-mattn-go-colorable")
+    (version "0.1.8")
+    (home-page "https://github.com/mattn/go-colorable")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0q34zqwbnls72md8q8mhj368s7p3i4xspvs3rk8fs76s0pn7dr2l"))))
+    (build-system go-build-system)
+    (native-inputs
+     `(("go-github-com-mattn-go-isatty"
+        ,go-github-com-mattn-go-isatty)))
+    (arguments
+     '(#:import-path "github.com/mattn/go-colorable"))
+    (synopsis "Handle ANSI color escapes on Windows")
+    (description "This package provides @code{colorable}, a module that
 makes it possible to handle ANSI color escapes on Windows.")
-      (license license:expat))))
+    (license license:expat)))
 
 (define-public go-github-com-mattn-go-pointer
   (let ((commit "a0a44394634f41e4992b173b24f14fecd3318a67")
@@ -3519,7 +3830,7 @@ format in Go.")
 (define-public go-github-com-kr-pretty
   (package
     (name "go-github-com-kr-pretty")
-    (version "0.2.0")
+    (version "0.2.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -3528,13 +3839,13 @@ format in Go.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1ywbfzz1h3a3qd8rpkiqwi1dm4w8ls9ijb4x1b7567grns9f0vnp"))))
+                "0vzfz06y9q8gs2nxx0kys0591vzp78k0fvpb8digi5n15h3b25hy"))))
     (build-system go-build-system)
     (propagated-inputs
      `(("go-github-com-kr-text" ,go-github-com-kr-text)))
     (arguments
      '(#:import-path "github.com/kr/pretty"))
-    (synopsis "A pretty printer for Go values")
+    (synopsis "Pretty printer for Go values")
     (description "This package provides a pretty printer for Go values.")
     (home-page "https://github.com/kr/pretty")
     (license license:expat)))
@@ -5344,6 +5655,33 @@ style your output, without you having to deal with all kinds of weird ANSI
 escape sequences and color conversions.")
     (license license:expat)))
 
+(define-public go-github-com-nwidger-jsoncolor
+  (package
+    (name "go-github-com-nwidger-jsoncolor")
+    (version "0.3.0")
+    (home-page "https://github.com/nwidger/jsoncolor")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "13rd146pnj7qm70r1333gyd1f61x40nafxlpvdxlci9h7mx8c5p8"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/nwidger/jsoncolor"))
+    (native-inputs
+     `(("go-github-com-fatih-color" ,go-github-com-fatih-color)))
+    (synopsis "Colorized JSON marshalling and encoding")
+    (description
+     "@code{jsoncolor} is a drop-in replacement for @code{encoding/json}'s
+@code{Marshal} and @code{MarshalIndent} functions and @code{Encoder} type
+which produce colorized output using github.com/fatih/color.")
+    (license license:expat)))
+
 (define-public go-github-com-olekukonko-tablewriter
   (package
     (name "go-github-com-olekukonko-tablewriter")
@@ -6252,6 +6590,43 @@ systems can import this package to enable running programs as services without
 modifying them.")
     (license license:zlib)))
 
+(define-public go-github-com-goccy-yaml
+  (package
+    (name "go-github-com-goccy-yaml")
+    (version "1.8.0")
+    (home-page "https://github.com/goccy/go-yaml")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1nps58dwkd915mx35h5f0dc05b880b4fdl6dcjxpfmmbzyinvg38"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/goccy/go-yaml"))
+    (propagated-inputs
+     `(("go-github-com-fatih-color" ,go-github-com-fatih-color)
+       ("go-golang-org-x-xerrors" ,go-golang-org-x-xerrors)))
+    (native-inputs
+     `(("go-gopkg-in-go-playground-validator-v9"
+        ,go-gopkg-in-go-playground-validator-v9)))
+    (synopsis "YAML support for the Go language")
+    (description
+     "This package provides features beyond the
+@uref{https://github.com/go-yaml/yaml, defacto YAML library} including:
+
+@itemize
+@item Pretty format for error notifications
+@item Support Scanner or Lexer or Parser as public API
+@item Support Anchor and Alias to Marshaler
+@item Allow referencing elements declared in another file via anchors
+@item Extract value or AST by YAMLPath (YAMLPath is like a JSONPath)
+@end itemize")
+    (license license:expat)))
+
 (define-public go-github.com-ulikunitz-xz
   (package
     (name "go-github.com-ulikunitz-xz")
@@ -6273,3 +6648,29 @@ modifying them.")
 compressed streams in Go.")
     (home-page "https://github.com/ulikunitz/xz")
     (license license:bsd-3)))
+
+(define-public go-github-com-songmu-gitconfig
+  (package
+    (name "go-github-com-songmu-gitconfig")
+    (version "0.1.0")
+    (home-page "https://github.com/songmu/gitconfig")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url home-page)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1y01h496a7pfj1g2bclls5b0nl3vnj7nz610jj1dzq9kxrwxk7fk"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "github.com/Songmu/gitconfig"
+       ;; Package's tests appear to be hardcoded to the author's gitconfig
+       ;; and require network access.
+       #:tests? #f))
+    (propagated-inputs
+     `(("go-github-com-goccy-yaml" ,go-github-com-goccy-yaml)))
+    (synopsis "Go library to get configuration values from gitconfig")
+    (description "@{gitconfig} is a package to get configuration values from gitconfig.")
+    (license license:expat)))