diff mbox series

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

Message ID 20220622125915.2891-7-contact@dhruvin.dev
State New
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 June 22, 2022, 12:59 p.m. UTC
* gnu/packages/version-control.scm (hut): New variable.
---
 gnu/packages/version-control.scm | 61 ++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Comments

Maxime Devos June 22, 2022, 1:12 p.m. UTC | #1
Dhruvin Gandhi via Guix-patches via schreef op wo 22-06-2022 om 18:29
[+0530]:
> +    (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.
diff mbox series

Patch

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