[PATCH 0/2] gnu: Add hut.

OpenSubmitted by Dhruvin Gandhi.
Details
2 participants
  • Dhruvin Gandhi
  • Maxime Devos
Owner
unassigned
Severity
normal
D
D
Dhruvin Gandhi wrote on 12 Apr 14:10 +0200
(address . guix-patches@gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220412121039.23573-1-contact@dhruvin.dev
This patch adds hut. Commit messages may need some corrections. I
excluded dependencies that are not used to build/test the package.

Dhruvin Gandhi (2):
gnu: go-github-com-spf13-cobra: Update to 1.4.0.
gnu: Add hut.

gnu/packages/golang.scm | 148 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 146 insertions(+), 2 deletions(-)

--
2.35.1
D
D
Dhruvin Gandhi wrote on 12 Apr 14:23 +0200
[PATCH 1/2] gnu: go-github-com-spf13-cobra: Update to 1.4.0.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220412122319.24231-1-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-spf13-cobra): Update to 1.4.0.
---
gnu/packages/golang.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f3cc1bd6b8..782e0c9ef5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3510,7 +3511,7 @@ (define-public go-github-com-spf13-cast
 (define-public go-github-com-spf13-cobra
   (package
     (name "go-github-com-spf13-cobra")
-    (version "1.0.0")
+    (version "1.4.0")
     (source
      (origin
        (method git-fetch)
@@ -3520,7 +3521,7 @@ (define-public go-github-com-spf13-cobra
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0vbppqqhby302a5ayn0296jqr71qkcd4c9am7wzsk6z71fwdsa7h"))))
+         "0ijhnk9pcks1v1cxri4kf6v1h26ym3jikmkgv4fdfrmm7sqgva13"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/spf13/cobra"))
-- 
2.35.1
D
D
Dhruvin Gandhi wrote on 12 Apr 14:23 +0200
[PATCH 2/2] gnu: Add hut.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220412122319.24231-2-contact@dhruvin.dev
* gnu/packages/golang.scm (hut): New variable.
---
gnu/packages/golang.scm | 143 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 143 insertions(+)

Toggle diff (153 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 782e0c9ef5..f46b1ae78f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9776,3 +9776,146 @@ (define-public go-github-com-go-chi-chi-v5
      "@code{go-github-com-go-chi-chi-v5} is an HTTP router that lets the user
 decompose request handling into many smaller layers.")
     (license license:expat)))
+
+(define-public go-github-com-google-shlex
+  (package
+    (name "go-github-com-google-shlex")
+    (version "0.0.0-20191202100458-e7afc7fbc510")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/google/shlex")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/google/shlex"))
+    (home-page "https://github.com/google/shlex")
+    (synopsis "shlex")
+    (description
+      "Package shlex implements a simple lexer which splits input in to tokens using
+shell-style rules for quoting and commenting.")
+    (license license:asl2.0)))
+
+(define-public go-git-sr-ht--emersion-go-scfg
+  (package
+    (name "go-git-sr-ht--emersion-go-scfg")
+    (version "0.0.0-20211215104734-c2c7a15d6c99")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/go-scfg")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "02gn8hz8zfv8y0krysx2wv951gw8hmhdfqf1ysidwm7i293365w4"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "git.sr.ht/~emersion/go-scfg"))
+    (propagated-inputs
+      `(("go-github-com-google-shlex" ,go-github-com-google-shlex)
+        ("go-github-com-davecgh-go-spew" ,go-github-com-davecgh-go-spew)))
+    (home-page "https://git.sr.ht/~emersion/go-scfg")
+    (synopsis "go-scfg")
+    (description "Package scfg parses configuration files.")
+    (license license:expat)))
+
+(define-public go-git-sr-ht--emersion-gqlclient
+  (package
+    (name "go-git-sr-ht--emersion-gqlclient")
+    (version "0.0.0-20220202181617-4e6e9c763dd2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/gqlclient")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "1d9hmaz7yy02bk455gmaav818xi49sw69jyx6dxzymv6ln7r1cv1"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "git.sr.ht/~emersion/gqlclient"))
+    (home-page "https://git.sr.ht/~emersion/gqlclient")
+    (synopsis "gqlclient")
+    (description
+      "This package provides a GraphQL client and code generator for Go.")
+    (license license:expat)))
+
+(define-public go-github-com-juju-ansiterm
+  (package
+    (name "go-github-com-juju-ansiterm")
+    (version "0.0.0-20210929141451-8b71cc96ebdc")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/juju/ansiterm")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "05mk7mlvg11dd6b0j0wlq547ghbmx2ywwrlbcb4kddpg7qaqp1va"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/juju/ansiterm"))
+    (propagated-inputs
+      `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
+        ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
+        ("go-github-com-mattn-go-colorable" ,go-github-com-mattn-go-colorable)
+        ("go-github-com-lunixbochs-vtclean"
+         ,go-github-com-lunixbochs-vtclean)))
+    (home-page "https://github.com/juju/ansiterm")
+    (synopsis "ansiterm")
+    (description
+      "Package ansiterm provides a Writer that writes out the ANSI escape codes for
+color and styles.")
+    (license license:lgpl3)))
+
+(define-public go-github-com-lunixbochs-vtclean
+  (package
+    (name "go-github-com-lunixbochs-vtclean")
+    (version "1.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/lunixbochs/vtclean")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0jqn33l1kzy4dk66zbvxz7rlgkgg34s9mhc8z0lrz0i88466zhd8"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/lunixbochs/vtclean"))
+    (home-page "https://github.com/lunixbochs/vtclean")
+    (synopsis "vtclean")
+    (description
+      "Clean up raw terminal output by stripping escape sequences, optionally
+preserving color.")
+    (license license:expat)))
+
+(define-public hut
+  (package
+    (name "hut")
+    (version "0.1.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/hut")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "15ag8fibnahcfgd0w2j4k813z10ymi39rx8d3c8b9955zc62p1fr"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "git.sr.ht/~emersion/hut"))
+    (propagated-inputs
+      `(("go-golang-org-x-term" ,go-golang-org-x-term)
+        ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
+        ("go-github-com-spf13-cobra" ,go-github-com-spf13-cobra)
+        ("go-github-com-juju-ansiterm" ,go-github-com-juju-ansiterm)
+        ("go-git-sr-ht--emersion-gqlclient" ,go-git-sr-ht--emersion-gqlclient)
+        ("go-git-sr-ht--emersion-go-scfg" ,go-git-sr-ht--emersion-go-scfg)))
+    (home-page "https://git.sr.ht/~emersion/hut")
+    (synopsis "CLI tool for sr.ht")
+    (description "This package provides a CLI tool for sr.ht.")
+    (license license:agpl3)))
-- 
2.35.1
M
M
Maxime Devos wrote on 12 Apr 14:35 +0200
81a213e3ee18cd29e16a8244c416944366b8f100.camel@telenet.be
Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
[+0530]:
Toggle quote (23 lines)
> +(define-public hut
> +  (package
> +    (name "hut")
> +    (version "0.1.0")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +               (url "https://git.sr.ht/~emersion/hut")
> +               (commit (string-append "v" version))))
> +        (file-name (git-file-name name version))
> +        (sha256
> +          (base32 "15ag8fibnahcfgd0w2j4k813z10ymi39rx8d3c8b9955zc62p1fr"))))
> +    (build-system go-build-system)
> +    (arguments '(#:import-path "git.sr.ht/~emersion/hut"))
> +    (propagated-inputs
> +      `(("go-golang-org-x-term" ,go-golang-org-x-term)
> +        ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
> +        ("go-github-com-spf13-cobra" ,go-github-com-spf13-cobra)
> +        ("go-github-com-juju-ansiterm" ,go-github-com-juju-ansiterm)
> +        ("go-git-sr-ht--emersion-gqlclient" ,go-git-sr-ht--emersion-gqlclient)
> +        ("go-git-sr-ht--emersion-go-scfg" ,go-git-sr-ht--emersion-go-scfg)))

It is a tool, not a library, so the inputs can be depropagated.

Toggle quote (5 lines)
> +    (home-page "https://git.sr.ht/~emersion/hut")
> +    (synopsis "CLI tool for sr.ht")
> +    (description "This package provides a CLI tool for sr.ht.")
> +    (license license:agpl3)))

This package doesn't have much to do with the language Go, it just
happens to be implemented in Go and is not a library. As such, maybe
it can be placed in (gnu pckages version-control) instead?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlVyGxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rMsAP9Do6AgmDJyi3XkhwsmwMH9VzKW
T4gUFaXp2wA+AGIdAQEA/l3LjSvT9+ynqLJddTPf6s1JzrSPd/bWiut4N5GsgAM=
=1LH8
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 12 Apr 14:36 +0200
a9e750b72805ff6256c6e78177edb48ddd63ca04.camel@telenet.be
Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
[+0530]:
Toggle quote (4 lines)
> +    (license license:expat)))
> +
> +(define-public hut

Only one package per patch. From (guix)Submitting Patches:

13. Verify that your patch contains only one set of related changes.
Bundling unrelated changes together makes reviewing harder and
slower.

Examples of unrelated changes include the addition of several
packages, or a package update along with fixes to that package.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlVyUxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7payAP0SP1zWnsXGR5/f5qKe9MHq8zMj
MncH+K9EvSFLoeajKAD+ITeMNcttteNQgkgWaVlDnoJFTnz8oDwXDEPZqtGvsAg=
=HNu4
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 12 Apr 14:38 +0200
4f4eb944a3062609d7ab21256ab4c8378a2523dd.camel@telenet.be
Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
[+0530]:
Toggle quote (2 lines)
> +    (synopsis "vtclean")

This synopsis is rather minimalistic and not informative.
‘(guix)Synopses and Descriptions’ has some guidelines. E.g.:

(synopsis "Filter out terminal escape sequences from Go")

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlVy1hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gQDAQCN9Gz0CjTk7yxu6Xj6oBnzqC41
CSCLm5GwBaRXzgPv4gD/S8N/8rcZRS9wEHUDPse4ELgS0GcRL9wY1iL/rkpJsgc=
=ScLq
-----END PGP SIGNATURE-----


D
D
Dhruvin Gandhi wrote on 12 Apr 15:07 +0200
CJ8A8QNX88XD.1TSWYRUE03JHD@hp
On Tue Apr 12, 2022 at 6:05 PM IST, Maxime Devos wrote:
Toggle quote (1 lines)
> It is a tool, not a library, so the inputs can be depropagated.
Ack.

Toggle quote (3 lines)
> This package doesn't have much to do with the language Go, it just
> happens to be implemented in Go and is not a library. As such, maybe
> it can be placed in (gnu pckages version-control) instead?
I agree. I'll make requested changes.
D
D
Dhruvin Gandhi wrote on 12 Apr 15:12 +0200
CJ8ACHO66QLL.3RM1BIVU7ETE1@hp
On Tue Apr 12, 2022 at 6:06 PM IST, Maxime Devos wrote:
Toggle quote (8 lines)
> Only one package per patch. From (guix)Submitting Patches:
>
> 13. Verify that your patch contains only one set of related changes.
> Bundling unrelated changes together makes reviewing harder and
> slower.
>
> Examples of unrelated changes include the addition of several
> packages, or a package update along with fixes to that package.
Should I submit a patch for each dependency? Or do you mean I should
send a separate patch for updating github.com/spf13/cobra?

All newly added packages before hut's definition are required to build
hut, so I put them together in one commit.
D
D
Dhruvin Gandhi wrote on 12 Apr 15:14 +0200
CJ8AE4FPWB9T.1PUG1HE1C97UQ@hp
On Tue Apr 12, 2022 at 6:08 PM IST, Maxime Devos wrote:
Toggle quote (8 lines)
> Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
> [+0530]:
> > +    (synopsis "vtclean")
>
> This synopsis is rather minimalistic and not informative.
> ‘(guix)Synopses and Descriptions’ has some guidelines. E.g.:
>
> (synopsis "Filter out terminal escape sequences from Go")
Yes, I just used `guix import go` and submitted the definition once I
was able to successfully build it. I'll make necessary changes. Thanks
for pointing it out.
M
M
Maxime Devos wrote on 12 Apr 17:43 +0200
0da419e7da045a2321e83a0754068b69823d8055.camel@telenet.be
Dhruvin Gandhi schreef op di 12-04-2022 om 18:42 [+0530]:
Toggle quote (12 lines)
> On Tue Apr 12, 2022 at 6:06 PM IST, Maxime Devos wrote:
> > Only one package per patch.  From (guix)Submitting Patches:
> >
> >    13. Verify that your patch contains only one set of related changes.
> >       Bundling unrelated changes together makes reviewing harder and
> >       slower.
> >
> >       Examples of unrelated changes include the addition of several
> >       packages, or a package update along with fixes to that package.
> Should I submit a patch for each dependency? Or do you mean I should
> send a separate patch for updating github.com/spf13/cobra?

A separate patch like for updating github.com/spf13/cobra.

Toggle quote (3 lines)
> All newly added packages before hut's definition are required to build
> hut, so I put them together in one commit.

FWIW, a separate patch makes it easier to see at a glance which commit
modifies which packages.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlWeFBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hY6APwONnwuqsApemPLNzPxLYubxqg4
Fd/lPFrlqYZr4fHsBwEAr+9lV1mVVcVrqKTmKkFI+Xpm2Q5JF8IozBTqq5ue3gY=
=lo/n
-----END PGP SIGNATURE-----


D
D
Dhruvin Gandhi wrote on 25 Apr 15:56 +0200
[PATCH v2] gnu: Add hut.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220425135645.24457-1-contact@dhruvin.dev
* gnu/packages/version-control.scm (hut): New variable.
---
gnu/packages/golang.scm | 118 +++++++++++++++++++++++++++++++
gnu/packages/version-control.scm | 43 +++++++++++
2 files changed, 161 insertions(+)

Toggle diff (200 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 820e6b54ab..8b28546095 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9775,3 +9776,120 @@ (define-public go-github-com-go-chi-chi-v5
      "@code{go-github-com-go-chi-chi-v5} is an HTTP router that lets the user
 decompose request handling into many smaller layers.")
     (license license:expat)))
+
+(define-public go-github-com-google-shlex
+  (package
+    (name "go-github-com-google-shlex")
+    (version "0.0.0-20191202100458-e7afc7fbc510")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/google/shlex")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/google/shlex"))
+    (home-page "https://github.com/google/shlex")
+    (synopsis "Lexer for go that supports shell-style quoting, commenting,
+and escaping")
+    (description
+      "Package shlex implements a simple lexer which splits input in to tokens using
+shell-style rules for quoting and commenting.")
+    (license license:asl2.0)))
+
+(define-public go-git-sr-ht--emersion-go-scfg
+  (package
+    (name "go-git-sr-ht--emersion-go-scfg")
+    (version "0.0.0-20211215104734-c2c7a15d6c99")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/go-scfg")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "02gn8hz8zfv8y0krysx2wv951gw8hmhdfqf1ysidwm7i293365w4"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "git.sr.ht/~emersion/go-scfg"))
+    (propagated-inputs
+      `(("go-github-com-google-shlex" ,go-github-com-google-shlex)
+        ("go-github-com-davecgh-go-spew" ,go-github-com-davecgh-go-spew)))
+    (home-page "https://git.sr.ht/~emersion/go-scfg")
+    (synopsis "Library to parse scfg files")
+    (description "Package scfg parses configuration files.")
+    (license license:expat)))
+
+(define-public go-git-sr-ht--emersion-gqlclient
+  (package
+    (name "go-git-sr-ht--emersion-gqlclient")
+    (version "0.0.0-20220202181617-4e6e9c763dd2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/gqlclient")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "1d9hmaz7yy02bk455gmaav818xi49sw69jyx6dxzymv6ln7r1cv1"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "git.sr.ht/~emersion/gqlclient"))
+    (home-page "https://git.sr.ht/~emersion/gqlclient")
+    (synopsis "GraphQL client and code generator")
+    (description
+      "This package provides a GraphQL client and code generator for Go.")
+    (license license:expat)))
+
+(define-public go-github-com-juju-ansiterm
+  (package
+    (name "go-github-com-juju-ansiterm")
+    (version "0.0.0-20210929141451-8b71cc96ebdc")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/juju/ansiterm")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "05mk7mlvg11dd6b0j0wlq547ghbmx2ywwrlbcb4kddpg7qaqp1va"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/juju/ansiterm"))
+    (propagated-inputs
+      `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1)
+        ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
+        ("go-github-com-mattn-go-colorable" ,go-github-com-mattn-go-colorable)
+        ("go-github-com-lunixbochs-vtclean"
+         ,go-github-com-lunixbochs-vtclean)))
+    (home-page "https://github.com/juju/ansiterm")
+    (synopsis "Writer to output ANSI escape codes for color and styles")
+    (description
+      "Package ansiterm provides a Writer that writes out the ANSI escape codes for
+color and styles.")
+    (license license:lgpl3)))
+
+(define-public go-github-com-lunixbochs-vtclean
+  (package
+    (name "go-github-com-lunixbochs-vtclean")
+    (version "1.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/lunixbochs/vtclean")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0jqn33l1kzy4dk66zbvxz7rlgkgg34s9mhc8z0lrz0i88466zhd8"))))
+    (build-system go-build-system)
+    (arguments '(#:import-path "github.com/lunixbochs/vtclean"))
+    (home-page "https://github.com/lunixbochs/vtclean")
+    (synopsis "Filter out terminal escape sequences")
+    (description
+      "Clean up raw terminal output by stripping escape sequences, optionally
+preserving color.")
+    (license license:expat)))
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 03c0d4420d..b5b3d1a1ae 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -103,6 +104,7 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mail)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
@@ -3330,3 +3332,44 @@ (define-public git-filter-repo
 Git project instead of @command{git filter-branch}.")
     (license (list license:expat ;; Main license.
                    license:gpl2)))) ;; For test harness.
+
+(define-public hut
+  (package
+    (name "hut")
+    (version "0.1.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/hut")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "15ag8fibnahcfgd0w2j4k813z10ymi39rx8d3c8b9955zc62p1fr"))))
+    (build-system go-build-system)
+    (arguments
+      '(#:import-path "git.sr.ht/~emersion/hut"
+        #:phases (modify-phases %standard-phases
+          (replace 'build
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                ;; From guix/build/go-build-system.scm
+                (setenv "CGO_LDFLAGS" "-s -w")
+                (invoke "make" "all" "GOFLAGS=-v -x"))))
+          (replace 'install
+            (lambda* (#:key import-path outputs #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (invoke "make" "install"
+                  (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
+    (native-inputs
+      `(("scdoc" ,scdoc)
+        ("go-golang-org-x-term" ,go-golang-org-x-term)
+        ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
+        ("go-github-com-spf13-cobra" ,go-github-com-spf13-cobra)
+        ("go-github-com-juju-ansiterm" ,go-github-com-juju-ansiterm)
+        ("go-git-sr-ht--emersion-gqlclient" ,go-git-sr-ht--emersion-gqlclient)
+        ("go-git-sr-ht--emersion-go-scfg" ,go-git-sr-ht--emersion-go-scfg)))
+    (home-page "https://git.sr.ht/~emersion/hut")
+    (synopsis "CLI tool for sr.ht")
+    (description "This package provides a CLI tool for sr.ht.")
+    (license license:agpl3)))
-- 
2.36.0
D
D
Dhruvin Gandhi wrote on 2 Jun 07:51 +0200
CKFEXAWYE7K2.126TNNASW7M9N@hp
I've made requested changes. Can anyone please review this patch?
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 1/6] gnu: Add go-github-com-google-shlex.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-2-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-google-shlex): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 296f0b8b07..f7ea36c636 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9843,3 +9844,25 @@ (define-public go-github-com-google-go-jsonnet
 production-ready implementation, compatible with the original Jsonnet C++
 implementation.")
     (license license:asl2.0)))
+
+(define-public go-github-com-google-shlex
+  (package
+    (name "go-github-com-google-shlex")
+    (version "0.0.0-20191202100458-e7afc7fbc510")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/google/shlex")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/google/shlex"))
+    (home-page "https://github.com/google/shlex")
+    (synopsis "Simple lexer for Go")
+    (description
+      "Package shlex implements a simple lexer which splits input into tokens using
+shell-style rules for quoting and commenting.")
+    (license license:asl2.0)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 0/6] gnu: Add hut.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-1-contact@dhruvin.dev
Thanks maximed for reviewing previous patches. I made the changes
suggested during our IRC conversation. `guix lint` suggested me to keep
`scdoc` as `native-inputs`. I moved everything else to `inputs`. I tried
describing what hut does.

Dhruvin Gandhi (6):
gnu: Add go-github-com-google-shlex.
gnu: Add go-git-sr-ht--emersion-go-scfg.
gnu: Add go-git-sr-ht--emersion-gqlclient.
gnu: Add go-github-com-juju-ansiterm.
gnu: Add go-github-com-lunixbochs-vtclean.
gnu: Add hut.

gnu/packages/golang.scm | 116 +++++++++++++++++++++++++++++++
gnu/packages/version-control.scm | 61 ++++++++++++++++
2 files changed, 177 insertions(+)

--
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 2/6] gnu: Add go-git-sr-ht--emersion-go-scfg.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-3-contact@dhruvin.dev
* gnu/packages/golang.scm (go-git-sr-ht--emersion-go-scfg): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f7ea36c636..8e7460db02 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9866,3 +9866,26 @@ (define-public go-github-com-google-shlex
       "Package shlex implements a simple lexer which splits input into tokens using
 shell-style rules for quoting and commenting.")
     (license license:asl2.0)))
+
+(define-public go-git-sr-ht--emersion-go-scfg
+  (package
+    (name "go-git-sr-ht--emersion-go-scfg")
+    (version "0.0.0-20211215104734-c2c7a15d6c99")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/go-scfg")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "02gn8hz8zfv8y0krysx2wv951gw8hmhdfqf1ysidwm7i293365w4"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "git.sr.ht/~emersion/go-scfg"))
+    (propagated-inputs
+      (list go-github-com-google-shlex
+            go-github-com-davecgh-go-spew))
+    (home-page "https://git.sr.ht/~emersion/go-scfg")
+    (synopsis "Go library for simple configuration file format")
+    (description "Package go-scfg parses scfg files.")
+    (license license:expat)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 3/6] gnu: Add go-git-sr-ht--emersion-gqlclient.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-4-contact@dhruvin.dev
* gnu/packages/golang.scm (go-git-sr-ht--emersion-gqlclient): New variable.
---
gnu/packages/golang.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8e7460db02..e9d0f8a688 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9889,3 +9889,24 @@ (define-public go-git-sr-ht--emersion-go-scfg
     (synopsis "Go library for simple configuration file format")
     (description "Package go-scfg parses scfg files.")
     (license license:expat)))
+
+(define-public go-git-sr-ht--emersion-gqlclient
+  (package
+    (name "go-git-sr-ht--emersion-gqlclient")
+    (version "0.0.0-20220202181617-4e6e9c763dd2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/gqlclient")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "1d9hmaz7yy02bk455gmaav818xi49sw69jyx6dxzymv6ln7r1cv1"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "git.sr.ht/~emersion/gqlclient"))
+    (home-page "https://git.sr.ht/~emersion/gqlclient")
+    (synopsis "GraphQL client and code generator")
+    (description
+      "This package provides a GraphQL client and code generator for Go.")
+    (license license:expat)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 4/6] gnu: Add go-github-com-juju-ansiterm.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-5-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-juju-ansiterm): New variable.
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e9d0f8a688..c393e91fbe 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9910,3 +9910,30 @@ (define-public go-git-sr-ht--emersion-gqlclient
     (description
       "This package provides a GraphQL client and code generator for Go.")
     (license license:expat)))
+
+(define-public go-github-com-juju-ansiterm
+  (package
+    (name "go-github-com-juju-ansiterm")
+    (version "0.0.0-20210929141451-8b71cc96ebdc")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/juju/ansiterm")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "05mk7mlvg11dd6b0j0wlq547ghbmx2ywwrlbcb4kddpg7qaqp1va"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/juju/ansiterm"))
+    (propagated-inputs
+      (list go-gopkg-in-check-v1
+            go-github-com-mattn-go-isatty
+            go-github-com-mattn-go-colorable
+            go-github-com-lunixbochs-vtclean))
+    (home-page "https://github.com/juju/ansiterm")
+    (synopsis "Writer to output ANSI escape codes for color and styles")
+    (description
+      "Package ansiterm provides a Writer that writes out the ANSI escape codes for
+color and styles.")
+    (license license:lgpl3)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 6/6] gnu: Add hut.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-7-contact@dhruvin.dev
* gnu/packages/version-control.scm (hut): New variable.
---
gnu/packages/version-control.scm | 61 ++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index eefb4a01ec..2bb14b8813 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,7 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mail)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
@@ -3407,3 +3409,62 @@ (define-public gitlint
      "Gitlint is a Git commit message linter written in Python: it checks your
 commit messages for style.")
     (license license:expat)))
+
+(define-public hut
+  (package
+    (name "hut")
+    (version "0.1.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/hut")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "15ag8fibnahcfgd0w2j4k813z10ymi39rx8d3c8b9955zc62p1fr"))))
+    (build-system go-build-system)
+    (arguments
+      (list
+        #:import-path "git.sr.ht/~emersion/hut"
+        #:phases
+        #~(modify-phases
+          %standard-phases
+          (replace 'build
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion
+                (string-append "src/" import-path)
+                ;; From guix/build/go-build-system.scm
+                (setenv "CGO_LDFLAGS" "-s -w")
+                (invoke "make" "all" "GOFLAGS=-v -x"))))
+          (replace 'install
+            (lambda* (#:key import-path outputs #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (invoke "make" "install"
+                  (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
+    (native-inputs
+      (list scdoc))
+    (inputs
+      (list go-golang-org-x-term
+            go-golang-org-x-oauth2
+            go-github-com-spf13-cobra
+            go-github-com-juju-ansiterm
+            go-git-sr-ht--emersion-gqlclient
+            go-git-sr-ht--emersion-go-scfg))
+    (home-page "https://git.sr.ht/~emersion/hut")
+    (synopsis "CLI tool for sr.ht")
+    (description "@command{hut} is a cli tool for
+@uref{https://sr.ht/~sircmpwn/sourcehut/, sr.ht}.  It helps you interact with
+sr.ht's public services:
+@itemize
+@item builds: submit, and manage build jobs
+@item git: create, and manage git repositories, and artifacts
+@item hg: list mercurial repositories
+@item lists: manage mailing lists, and patches
+@item meta: manage pgp, and ssh keys
+@item pages: publish, and manage hosted websites
+@item paste: create, and manage pastes
+@item todo: create, and manage trackers, and tickets
+@item graphql: interact with GraphQL APIs directly
+@end itemize\n")
+    (license license:agpl3)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 22 Jun 14:59 +0200
[PATCH v3 5/6] gnu: Add go-github-com-lunixbochs-vtclean.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220622125915.2891-6-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-lunixbochs-vtclean): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c393e91fbe..214c33421f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9937,3 +9937,25 @@ (define-public go-github-com-juju-ansiterm
       "Package ansiterm provides a Writer that writes out the ANSI escape codes for
 color and styles.")
     (license license:lgpl3)))
+
+(define-public go-github-com-lunixbochs-vtclean
+  (package
+    (name "go-github-com-lunixbochs-vtclean")
+    (version "1.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/lunixbochs/vtclean")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0jqn33l1kzy4dk66zbvxz7rlgkgg34s9mhc8z0lrz0i88466zhd8"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/lunixbochs/vtclean"))
+    (home-page "https://github.com/lunixbochs/vtclean")
+    (synopsis "Filter out terminal escape sequences")
+    (description
+      "Clean up raw terminal output by stripping escape sequences, optionally
+preserving color.")
+    (license license:expat)))
-- 
2.36.1
M
M
Maxime Devos wrote on 22 Jun 15:12 +0200
Re: [bug#54882] [PATCH v3 6/6] gnu: Add hut.
feb90b4c446572ce10a4720e8f6017d505c477a3.camel@telenet.be
Dhruvin Gandhi via Guix-patches via schreef op wo 22-06-2022 om 18:29
[+0530]:
Toggle quote (15 lines)
> +    (description "@command{hut} is a cli tool for
> +@uref{https://sr.ht/~sircmpwn/sourcehut/, sr.ht}.  It helps you interact with
> +sr.ht's public services:
> +@itemize
> +@item builds: submit, and manage build jobs
> +@item git: create, and manage git repositories, and artifacts
> +@item hg: list mercurial repositories
> +@item lists: manage mailing lists, and patches
> +@item meta: manage pgp, and ssh keys
> +@item pages: publish, and manage hosted websites
> +@item paste: create, and manage pastes
> +@item todo: create, and manage trackers, and tickets
> +@item graphql: interact with GraphQL APIs directly
> +@end itemize\n")

I don't think a \n is necessary (though probably harmless). I'm
wondering if ‘mercurial’, ‘pgp’, ‘ssh’ and ‘cli’ should be capitalised.
Otherwise looks like a nice description to me.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrMVJRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rlYAQCX9k8Dpv7SVdVfYyZ0c70GKzWn
MUISdEXZ64VwPIIOMQD+KZ+9YIv6kNdLDoqacOpDDmRdZTQ7AQ+zSk3PExaRnws=
=8hcs
-----END PGP SIGNATURE-----


D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 1/6] gnu: Add go-github-com-google-shlex.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-1-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-google-shlex): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 296f0b8b07..f7ea36c636 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -34,6 +34,7 @@
 ;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9843,3 +9844,25 @@ (define-public go-github-com-google-go-jsonnet
 production-ready implementation, compatible with the original Jsonnet C++
 implementation.")
     (license license:asl2.0)))
+
+(define-public go-github-com-google-shlex
+  (package
+    (name "go-github-com-google-shlex")
+    (version "0.0.0-20191202100458-e7afc7fbc510")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/google/shlex")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "14z8hqyik910wk2qwnzgz8mjsmiamxa0pj55ahbv0jx6j3dgvzfm"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/google/shlex"))
+    (home-page "https://github.com/google/shlex")
+    (synopsis "Simple lexer for Go")
+    (description
+      "Package shlex implements a simple lexer which splits input into tokens using
+shell-style rules for quoting and commenting.")
+    (license license:asl2.0)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 3/6] gnu: Add go-git-sr-ht--emersion-gqlclient.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-3-contact@dhruvin.dev
* gnu/packages/golang.scm (go-git-sr-ht--emersion-gqlclient): New variable.
---
gnu/packages/golang.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8e7460db02..e9d0f8a688 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9889,3 +9889,24 @@ (define-public go-git-sr-ht--emersion-go-scfg
     (synopsis "Go library for simple configuration file format")
     (description "Package go-scfg parses scfg files.")
     (license license:expat)))
+
+(define-public go-git-sr-ht--emersion-gqlclient
+  (package
+    (name "go-git-sr-ht--emersion-gqlclient")
+    (version "0.0.0-20220202181617-4e6e9c763dd2")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/gqlclient")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "1d9hmaz7yy02bk455gmaav818xi49sw69jyx6dxzymv6ln7r1cv1"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "git.sr.ht/~emersion/gqlclient"))
+    (home-page "https://git.sr.ht/~emersion/gqlclient")
+    (synopsis "GraphQL client and code generator")
+    (description
+      "This package provides a GraphQL client and code generator for Go.")
+    (license license:expat)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 4/6] gnu: Add go-github-com-juju-ansiterm.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-4-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-juju-ansiterm): New variable.
---
gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e9d0f8a688..c393e91fbe 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9910,3 +9910,30 @@ (define-public go-git-sr-ht--emersion-gqlclient
     (description
       "This package provides a GraphQL client and code generator for Go.")
     (license license:expat)))
+
+(define-public go-github-com-juju-ansiterm
+  (package
+    (name "go-github-com-juju-ansiterm")
+    (version "0.0.0-20210929141451-8b71cc96ebdc")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/juju/ansiterm")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "05mk7mlvg11dd6b0j0wlq547ghbmx2ywwrlbcb4kddpg7qaqp1va"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/juju/ansiterm"))
+    (propagated-inputs
+      (list go-gopkg-in-check-v1
+            go-github-com-mattn-go-isatty
+            go-github-com-mattn-go-colorable
+            go-github-com-lunixbochs-vtclean))
+    (home-page "https://github.com/juju/ansiterm")
+    (synopsis "Writer to output ANSI escape codes for color and styles")
+    (description
+      "Package ansiterm provides a Writer that writes out the ANSI escape codes for
+color and styles.")
+    (license license:lgpl3)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 2/6] gnu: Add go-git-sr-ht--emersion-go-scfg.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-2-contact@dhruvin.dev
* gnu/packages/golang.scm (go-git-sr-ht--emersion-go-scfg): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f7ea36c636..8e7460db02 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9866,3 +9866,26 @@ (define-public go-github-com-google-shlex
       "Package shlex implements a simple lexer which splits input into tokens using
 shell-style rules for quoting and commenting.")
     (license license:asl2.0)))
+
+(define-public go-git-sr-ht--emersion-go-scfg
+  (package
+    (name "go-git-sr-ht--emersion-go-scfg")
+    (version "0.0.0-20211215104734-c2c7a15d6c99")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/go-scfg")
+               (commit (go-version->git-ref version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "02gn8hz8zfv8y0krysx2wv951gw8hmhdfqf1ysidwm7i293365w4"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "git.sr.ht/~emersion/go-scfg"))
+    (propagated-inputs
+      (list go-github-com-google-shlex
+            go-github-com-davecgh-go-spew))
+    (home-page "https://git.sr.ht/~emersion/go-scfg")
+    (synopsis "Go library for simple configuration file format")
+    (description "Package go-scfg parses scfg files.")
+    (license license:expat)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 5/6] gnu: Add go-github-com-lunixbochs-vtclean.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-5-contact@dhruvin.dev
* gnu/packages/golang.scm (go-github-com-lunixbochs-vtclean): New variable.
---
gnu/packages/golang.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c393e91fbe..214c33421f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9937,3 +9937,25 @@ (define-public go-github-com-juju-ansiterm
       "Package ansiterm provides a Writer that writes out the ANSI escape codes for
 color and styles.")
     (license license:lgpl3)))
+
+(define-public go-github-com-lunixbochs-vtclean
+  (package
+    (name "go-github-com-lunixbochs-vtclean")
+    (version "1.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/lunixbochs/vtclean")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0jqn33l1kzy4dk66zbvxz7rlgkgg34s9mhc8z0lrz0i88466zhd8"))))
+    (build-system go-build-system)
+    (arguments (list #:import-path "github.com/lunixbochs/vtclean"))
+    (home-page "https://github.com/lunixbochs/vtclean")
+    (synopsis "Filter out terminal escape sequences")
+    (description
+      "Clean up raw terminal output by stripping escape sequences, optionally
+preserving color.")
+    (license license:expat)))
-- 
2.36.1
D
D
Dhruvin Gandhi wrote on 23 Jun 11:38 +0200
[PATCH v4 6/6] gnu: Add hut.
(address . 54882@debbugs.gnu.org)(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)
20220623093808.21573-6-contact@dhruvin.dev
* gnu/packages/version-control.scm (hut): New variable.
---
gnu/packages/version-control.scm | 61 ++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (85 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index eefb4a01ec..860c281ab2 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -104,6 +105,7 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mail)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
@@ -3407,3 +3409,62 @@ (define-public gitlint
      "Gitlint is a Git commit message linter written in Python: it checks your
 commit messages for style.")
     (license license:expat)))
+
+(define-public hut
+  (package
+    (name "hut")
+    (version "0.1.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://git.sr.ht/~emersion/hut")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "15ag8fibnahcfgd0w2j4k813z10ymi39rx8d3c8b9955zc62p1fr"))))
+    (build-system go-build-system)
+    (arguments
+      (list
+        #:import-path "git.sr.ht/~emersion/hut"
+        #:phases
+        #~(modify-phases
+          %standard-phases
+          (replace 'build
+            (lambda* (#:key import-path #:allow-other-keys)
+              (with-directory-excursion
+                (string-append "src/" import-path)
+                ;; From guix/build/go-build-system.scm
+                (setenv "CGO_LDFLAGS" "-s -w")
+                (invoke "make" "all" "GOFLAGS=-v -x"))))
+          (replace 'install
+            (lambda* (#:key import-path outputs #:allow-other-keys)
+              (with-directory-excursion (string-append "src/" import-path)
+                (invoke "make" "install"
+                  (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
+    (native-inputs
+      (list scdoc))
+    (inputs
+      (list go-golang-org-x-term
+            go-golang-org-x-oauth2
+            go-github-com-spf13-cobra
+            go-github-com-juju-ansiterm
+            go-git-sr-ht--emersion-gqlclient
+            go-git-sr-ht--emersion-go-scfg))
+    (home-page "https://git.sr.ht/~emersion/hut")
+    (synopsis "CLI tool for sr.ht")
+    (description "@command{hut} is a CLI tool for
+@uref{https://sr.ht/~sircmpwn/sourcehut/, sr.ht}.  It helps you interact with
+sr.ht's public services:
+@itemize
+@item builds: submit, and manage build jobs
+@item git: create, and manage git repositories, and artifacts
+@item hg: list Mercurial repositories
+@item lists: manage mailing lists, and patches
+@item meta: manage PGP, and SSH keys
+@item pages: publish, and manage hosted websites
+@item paste: create, and manage pastes
+@item todo: create, and manage trackers, and tickets
+@item graphql: interact with GraphQL APIs directly
+@end itemize")
+    (license license:agpl3)))
-- 
2.36.1
?