diff mbox series

[bug#56961,6/6] gnu: packages: Add senpai.

Message ID 20220803211822.21182-6-paren@disroot.org
State New
Headers show
Series [bug#56961,1/6] gnu: packages: Add go-github-com-lucasb-eyer-go-colorful. | 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

\( Aug. 3, 2022, 9:18 p.m. UTC
* gnu/packages/irc.scm (senpai): New variable.
---
 gnu/packages/irc.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index efb32a39e0..3684e02e32 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -12,6 +12,7 @@ 
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 ( <paren@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +39,7 @@  (define-module (gnu packages irc)
   #:use-module (guix utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
@@ -61,10 +63,12 @@  (define-module (gnu packages irc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages lxqt)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages openldap)
   #:use-module (gnu packages kde)
@@ -688,3 +692,60 @@  (define-public inspircd
 server written in C++ for Unix-like operating systems.")
     (home-page "https://www.inspircd.org/")
     (license license:gpl2)))
+
+(define-public senpai
+  (let ((commit "e8ed8e7e13134ee7fc8ac116d58efc55813632a1")
+        (revision "2"))
+    (package
+      (name "senpai")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+               (method git-fetch)
+               (uri (git-reference
+                     (url "https://git.sr.ht/~taiite/senpai")
+                     (commit commit)))
+               (file-name (git-file-name name version))
+               (sha256
+                (base32
+                 "1rq07ldi8ga5pv9mm0g4sgipqxnnjcff2n1wsmjx3wqcbrmrqhbg"))))
+      (build-system go-build-system)
+      (arguments
+       (list #:import-path "git.sr.ht/~taiite/senpai"
+             #:install-source? #f
+             #:phases
+             #~(modify-phases %standard-phases
+                 (replace 'build
+                   (lambda* (#:key import-path #:allow-other-keys)
+                     (invoke "make" "-C"
+                             (string-append "src/" import-path))))
+                 (add-after 'build 'build-docs
+                   (lambda* (#:key import-path #:allow-other-keys)
+                     (with-directory-excursion
+                      (string-append "src/" import-path)
+                      (invoke "sh" "-c"
+                              (string-append "scdoc < doc/senpai.1.scd "
+                                             "> doc/senpai.1 && "
+                                             "scdoc < doc/senpai.5.scd "
+                                             "> doc/senpai.5")))))
+                 (replace 'install
+                   (lambda* (#:key outputs import-path #:allow-other-keys)
+                     (let ((out (assoc-ref outputs "out")))
+                       (invoke "make" "install" "-C"
+                               (string-append "src/" import-path)
+                               (string-append "PREFIX=" out))))))))
+      (native-inputs (list scdoc))
+      (propagated-inputs
+       (list go-github-com-delthas-tcell
+             go-mvdan-cc-xurls
+             go-golang-org-x-time
+             go-golang-org-x-term
+             go-golang-org-x-net
+             go-github-com-mattn-go-runewidth
+             go-git-sr-ht--emersion-go-scfg))
+      (home-page "https://git.sr.ht/~taiite/senpai")
+      (synopsis "IRC client that works best with bouncers")
+      (description
+       "@code{senpai} is an IRC client that works best with bouncers. No
+logs are kept, history is fetched from the server via @code{CHATHISTORY},
+and networks are fetched from the server via @code{bouncer-networks}.")
+      (license license:isc))))