diff mbox series

[bug#54882,2/2] gnu: Add hut.

Message ID 20220412122319.24231-2-contact@dhruvin.dev
State Accepted
Headers show
Series gnu: Add hut. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Dhruvin Gandhi April 12, 2022, 12:23 p.m. UTC
* gnu/packages/golang.scm (hut): New variable.
---
 gnu/packages/golang.scm | 143 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)

Comments

M April 12, 2022, 12:35 p.m. UTC | #1
Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
[+0530]:
> +(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.

> +    (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.
M April 12, 2022, 12:36 p.m. UTC | #2
Dhruvin Gandhi via Guix-patches via schreef op di 12-04-2022 om 17:53
[+0530]:
> +    (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.
M April 12, 2022, 12:38 p.m. UTC | #3
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")

Greetings,
Maxime.
Dhruvin Gandhi April 12, 2022, 1:07 p.m. UTC | #4
On Tue Apr 12, 2022 at 6:05 PM IST, Maxime Devos wrote:
> It is a tool, not a library, so the inputs can be depropagated.
Ack.

> 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.
Dhruvin Gandhi April 12, 2022, 1:12 p.m. UTC | #5
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?

All newly added packages before hut's definition are required to build
hut, so I put them together in one commit.
Dhruvin Gandhi April 12, 2022, 1:14 p.m. UTC | #6
On Tue Apr 12, 2022 at 6:08 PM IST, Maxime Devos wrote:
> 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 April 12, 2022, 3:43 p.m. UTC | #7
Dhruvin Gandhi schreef op di 12-04-2022 om 18:42 [+0530]:
> 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.

> 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.
diff mbox series

Patch

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)))