[PATCH 0/2] gnu: Add hut.

  • Done
  • quality assurance status badge
Details
4 participants
  • Dhruvin Gandhi
  • Maxim Cournoyer
  • Maxime Devos
  • (
Owner
unassigned
Submitted by
Dhruvin Gandhi
Severity
normal
D
D
Dhruvin Gandhi wrote on 12 Apr 2022 14:10
(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 2022 14:23
[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 2022 14:23
[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 2022 14:35
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 2022 14:36
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 2022 14:38
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 2022 15:07
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 2022 15:12
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 2022 15:14
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 2022 17:43
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 2022 15:56
[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 2022 07:51
CKFEXAWYE7K2.126TNNASW7M9N@hp
I've made requested changes. Can anyone please review this patch?
D
D
Dhruvin Gandhi wrote on 22 Jun 2022 14:59
[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 2022 14:59
[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 2022 14:59
[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 2022 14:59
[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 2022 14:59
[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 2022 14:59
[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 2022 14:59
[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 2022 15:12
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 2022 11:38
[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 2022 11:38
[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 2022 11:38
[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 2022 11:38
[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 2022 11:38
[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 2022 11:38
[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
M
M
Maxim Cournoyer wrote on 8 Oct 2022 06:16
Re: bug#54882: [PATCH 0/2] gnu: Add hut.
(name . Dhruvin Gandhi)(address . contact@dhruvin.dev)(address . 54882-done@debbugs.gnu.org)
87a6672bmv.fsf_-_@gmail.com
Hello!

Dhruvin Gandhi <contact@dhruvin.dev> writes:

Toggle quote (89 lines)
> * gnu/packages/version-control.scm (hut): New variable.
> ---
> gnu/packages/version-control.scm | 61 ++++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> 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)))

Thanks for this contribution! I've applied the 6 patches of this
series, making them appear in the correct order, and made some changes
to them, mostly making complete sentences in the description and fixing
the indentation (please use the Emacs-based formatting tool next time,
or 'guix style', which should get this right). I've also removed the
double hydhen ('--') from package names, as we do not have this
convention in Guix.

For 'hut', I've taken the liberty to adjust the package definition like:

Toggle snippet (103 lines)
modified gnu/packages/version-control.scm
@@ -3464,56 +3464,63 @@ (define-public hut
(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"))))
+ (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
+ (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
+ (with-directory-excursion (string-append "src/" import-path)
+ ;; The flags are copied from (guix build go-build-system).
(setenv "CGO_LDFLAGS" "-s -w")
(invoke "make" "all" "GOFLAGS=-v -x"))))
(replace 'install
- (lambda* (#:key import-path outputs #:allow-other-keys)
+ (lambda* (#:key import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(invoke "make" "install"
- (string-append "PREFIX=" (assoc-ref outputs "out")))))))))
+ (string-append "PREFIX=" #$output))))))))
(native-inputs
- (list scdoc))
+ (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))
+ (list go-git-sr-ht-emersion-go-scfg
+ go-git-sr-ht-emersion-gqlclient
+ go-github-com-juju-ansiterm
+ go-github-com-spf13-cobra
+ go-golang-org-x-oauth2
+ go-golang-org-x-term))
(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")
+@table @asis
+@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, tickets
+@item graphql
+interact with GraphQL APIs directly
+@end table")
(license license:agpl3)))

Normalizing the formatting of the code a bit, and turning the itemize
list into a table in the description.

Pushed, thank you!

Closing.

--
Thanks,
Maxim
Closed
(
(address . 54882-done@debbugs.gnu.org)
CNH8TQ0RYVRS.3QAHS2LWCJMTN@guix-framework
Hey Maxim,

On Sat Oct 8, 2022 at 5:16 AM BST, Maxim Cournoyer wrote:
Toggle quote (8 lines)
> Thanks for this contribution! I've applied the 6 patches of this
> series, making them appear in the correct order, and made some changes
> to them, mostly making complete sentences in the description and fixing
> the indentation (please use the Emacs-based formatting tool next time,
> or 'guix style', which should get this right). I've also removed the
> double hydhen ('--') from package names, as we do not have this
> convention in Guix.

Pretty sure we already have some packages with the double-hyphen in them;
also, it's not a separator, rather a translation of:

git.sr.ht/~foo/bar
^^ these two characters

So, wouldn't it be better to keep things consistent with them existing
packages?
-- (
Closed
M
M
Maxim Cournoyer wrote on 10 Oct 2022 05:19
(name . ()(address . paren@disroot.org)
87lepo2wnh.fsf@gmail.com
Hi,

"(" <paren@disroot.org> writes:

Toggle quote (14 lines)
> Hey Maxim,
>
> On Sat Oct 8, 2022 at 5:16 AM BST, Maxim Cournoyer wrote:
>> Thanks for this contribution! I've applied the 6 patches of this
>> series, making them appear in the correct order, and made some changes
>> to them, mostly making complete sentences in the description and fixing
>> the indentation (please use the Emacs-based formatting tool next time,
>> or 'guix style', which should get this right). I've also removed the
>> double hydhen ('--') from package names, as we do not have this
>> convention in Guix.
>
> Pretty sure we already have some packages with the double-hyphen in them;
> also, it's not a separator, rather a translation of:

I haven't see any, but feel free to point to actual examples we have.

Toggle quote (6 lines)
> git.sr.ht/~foo/bar
> ^^ these two characters
>
> So, wouldn't it be better to keep things consistent with them existing
> packages?

From what I understand, ~ is automatically inserted by source hut, not
something meaningful, at least when it comes to the package name.

--
Thanks,
Maxim
Closed
(
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
CNI0S85HV9ZT.2QMBLJN3OATBJ@guix-framework
On Mon Oct 10, 2022 at 4:19 AM BST, Maxim Cournoyer wrote:
Toggle quote (2 lines)
> I haven't see any, but feel free to point to actual examples we have.

Oh, I'm mistaken, we don't have any.

Toggle quote (3 lines)
> From what I understand, ~ is automatically inserted by source hut, not
> something meaningful, at least when it comes to the package name.

Yes. But the ~ is translated into a - by the importer. I suppose since we
don't have any precedent for keeping that --, but we now do for removing it,
we'd better just stick to -...

-- (
Closed
D
D
Dhruvin Gandhi wrote on 10 Oct 2022 11:22
(address . 54882-done@debbugs.gnu.org)
CNI4SY1CE0BH.3IGEM9NG4M4YX@hp
Thanks for merging :)

On Mon Oct 10, 2022 at 8:49 AM IST, Maxim Cournoyer wrote:
Toggle quote (3 lines)
> From what I understand, ~ is automatically inserted by source hut, not
> something meaningful, at least when it comes to the package name.

It will be important once sourcehut adds organizations/groups. They will
have a different prefix. Although what exact prefix will be used is
undecided, one candidate for org prefix is '+'. So, an org/repo url will
be https://git.sr.ht/+org / repo

I'm advised to have an indicator in package names that helps
differentiate between user repo and org repo. (in #sr.ht on libera.chat)

If org names are not allowed to be same as existing user names, then we
don't have to worry about that prefix. But this is yet to be decided.

FWIW, guixrus uses '--', i.e. go-git-sr-ht--emersion-go-scfg. This is
what unmatched-paren might be recalling.
Closed
?