gnu: irssi: Enable true-color and unicode support.
[jackhill/guix/guix.git] / gnu / packages / irc.scm
index 718853d..3b88e8d 100644 (file)
@@ -5,11 +5,12 @@
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2021 WinterHound <winterhound@yandex.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix build-system cmake)
-  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
   #:use-module (gnu packages)
@@ -44,6 +47,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
@@ -71,6 +75,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages regex)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages tcl)
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-inxi-reference
            (lambda* (#:key inputs #:allow-other-keys)
-             (let ((inxi (string-append (assoc-ref inputs "inxi") "/bin/inxi")))
+             (let ((inxi (search-input-file inputs "/bin/inxi")))
                (symlink inxi "data/scripts/inxi")
                #t))))
        #:tests? #f)) ; no test target
     (native-inputs
-     `(("extra-cmake-modules" ,extra-cmake-modules)
-       ("pkg-config" ,pkg-config)
-       ("qttools" ,qttools)))
+     (list extra-cmake-modules pkg-config qttools))
     (inputs
      `(("inxi" ,inxi-minimal)
        ("libdbusmenu-qt" ,libdbusmenu-qt)
        ("qca" ,qca)
-       ("qtbase" ,qtbase)
+       ("qtbase" ,qtbase-5)
        ("qtmultimedia" ,qtmultimedia)
        ("qtscript" ,qtscript)
        ("qtsvg" ,qtsvg)
@@ -144,7 +147,7 @@ irssi, but graphical.")
 (define-public irssi
   (package
     (name "irssi")
-    (version "1.2.2")
+    (version "1.2.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/irssi/irssi/"
@@ -152,7 +155,7 @@ irssi, but graphical.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0y3mhnyr7x8ir8dlj83vbnchpfld28vdfni9yhpvls45j460c9v7"))))
+                "17vninwcdfxw39xl2q55qircckckjk2xlvkvlwgj5lhlxppvyix6"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -163,6 +166,7 @@ irssi, but graphical.")
                (setenv "CONFIG_SHELL" (which "bash"))
                (invoke "./configure"
                        (string-append "--prefix=" out)
+                       (string-append "--enable-true-color")
                        (string-append "--with-proxy")
                        (string-append "--with-socks")
                        (string-append "--with-bot")))))
@@ -170,12 +174,9 @@ irssi, but graphical.")
            (lambda _
              (setenv "HOME" (getcwd)))))))
     (inputs
-     `(("glib" ,glib)
-       ("ncurses" ,ncurses)
-       ("openssl" ,openssl)
-       ("perl" ,perl)))
+     (list glib ncurses openssl perl utf8proc))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     (list pkg-config))
     (home-page "https://irssi.org/")
     (synopsis "Terminal-based IRC client")
     (description
@@ -186,39 +187,52 @@ SILC and ICB protocols via plugins.")
 (define-public weechat
   (package
     (name "weechat")
-    (version "3.0")
+    (version "3.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://weechat.org/files/src/weechat-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1yziv4cbcy61c9mb81c5sg3rmw6nh0srzwmry4svhriv6rdd5dvc"))))
+                "1pyb1yaw61cbdg1g4cc22px1wsh8wm0gsx1yzp684idyz25apzna"))))
     (build-system cmake-build-system)
+    (outputs '("out" "doc"))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("pkg-config" ,pkg-config)
+       ("ruby-asciidoctor" ,ruby-asciidoctor)
        ;; For tests.
        ("cpputest" ,cpputest)))
     (inputs
-     `(("aspell" ,aspell)
-       ("curl" ,curl)
-       ("gnutls" ,gnutls)
-       ("libgcrypt" ,libgcrypt "out")
-       ("ncurses" ,ncurses)
-       ("zlib" ,zlib)
-
-       ;; Scripting language plug-ins.
-       ("guile" ,guile-3.0)
-       ("lua" ,lua-5.1)
-       ("perl" ,perl)
-       ("python" ,python)
-       ("tcl" ,tcl)))
+     (list aspell
+           curl
+           gnutls
+           `(,libgcrypt "out")
+           ncurses
+           zlib
+           ;; Scripting language plug-ins.
+           guile-3.0
+           lua-5.1
+           perl
+           python
+           ruby
+           tcl))
     (arguments
      `(#:configure-flags
        (list "-DENABLE_PHP=OFF"
-             "-DENABLE_RUBY=OFF"
+             "-DENABLE_MAN=ON"
+             "-DENABLE_DOC=ON"
              "-DENABLE_TESTS=ON")       ; ‘make test’ fails otherwise
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                   (doc (assoc-ref outputs "doc"))
+                   (from (string-append out "/share/doc/weechat"))
+                   (to (string-append doc "/share/doc/weechat")))
+               (mkdir-p (string-append doc "/share/doc"))
+               (rename-file from to)))))
        ;; Tests hang indefinitely on non-Intel platforms.
        #:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
                                                       (%current-system)))
@@ -238,7 +252,7 @@ using a mouse.  It is customizable and extensible with plugins and scripts.")
 (define-public srain
   (package
     (name "srain")
-    (version "1.1.3")
+    (version "1.3.0")
     (source
      (origin
        (method git-fetch)
@@ -247,30 +261,25 @@ using a mouse.  It is customizable and extensible with plugins and scripts.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1vqjjsxzc4601dpc8lf9k25rp2c7sjab7l5a6cbfygpr8dqvm6vq"))))
+        (base32 "14s0h5wgvlkdylnjis2fa7m835142jzw0d0yqjnir1wqnwmq1rld"))))
+    (build-system meson-build-system)
     (arguments
      `(#:tests? #f ;there are no tests
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'install 'fix-permissions
-           ;; Make po folder writable for gettext to install translations.
-           (lambda _
-             (for-each make-file-writable
-                       (find-files "po" "." #:directories? #t)))))))
-    (build-system glib-or-gtk-build-system)
+       #:glib-or-gtk? #t))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("glib:bin" ,glib "bin")
        ("pkg-config" ,pkg-config)
-       ("python" ,python-wrapper)))
+       ("python" ,python-wrapper)
+       ("python-sphinx" ,python-sphinx)))
     (inputs
-     `(("glib-networking" ,glib-networking)
-       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
-       ("gtk+" ,gtk+)
-       ("libconfig" ,libconfig)
-       ("libsecret" ,libsecret)
-       ("libsoup" ,libsoup)
-       ("openssl" ,openssl)))
+     (list glib-networking
+           gsettings-desktop-schemas
+           gtk+
+           libconfig
+           libsecret
+           libsoup
+           openssl))
     (home-page "https://srain.im")
     (synopsis "Modern IRC client written in GTK")
     (description
@@ -282,14 +291,14 @@ for the IRCv3 protocol.")
 (define-public ircii
   (package
     (name "ircii")
-    (version "20151120")
+    (version "20210314")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ircii.warped.com/"
                                  name "-" version ".tar.gz"))
              (sha256
               (base32
-               "178dc279f5j894qvp96dzz7c0jpryqlcqw5g0dc9yaxg9kgw1lqm"))))
+               "04jczayv1vdn21fcf5zkfaa98sy7d6ydrv2sns2i67gvya2z28j3"))))
     (build-system gnu-build-system)
     ;; TODO: We should package a small socks4/5 library/server to configure
     ;; ircii with socks client. `ghc-socks' pulls in lots of haskell, which
@@ -315,17 +324,56 @@ for the IRCv3 protocol.")
                (("/bin/rm") "rm")
                (("/bin/mv") "mv")))))))
     (inputs
-     `(("ncurses" ,ncurses)
-       ("openssl" ,openssl)))
+     (list ncurses openssl))
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)))
+     (list pkg-config perl))
     (home-page "http://www.eterna.com.au/ircii/")
     (synopsis "Terminal-based IRC and ICB client")
     (description
      "ircII is a terminal based IRC and ICB client for UNIX systems.")
     (license license:bsd-3)))
 
+(define-public catgirl
+  (package
+    (name "catgirl")
+    (version "1.9a")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://git.causal.agency/catgirl/snapshot/"
+                                  name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0pci8crcgm33zb58y7ky2aydzyqsirj8ri8ik1zdlz6npadbjj9h"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags (list (string-append "PREFIX=" %output)
+                          ,(string-append "CC=" (cc-for-target)))))
+    (native-inputs
+     (list universal-ctags pkg-config))
+    (inputs
+     (list libressl ncurses))
+    (home-page "https://git.causal.agency/catgirl")
+    (synopsis "TLS-only terminal IRC client")
+    (description
+     "@command{catgirl} is a TLS-only terminal IRC client.
+
+Notable features include:
+@itemize
+@item Tab complete: most recently seen or mentioned nicks are completed first.
+  Commas are inserted between multiple nicks.
+@item Prompt: the prompt clearly shows whether input will be interpreted as a
+command or sent as a message.
+@item Split scroll: keeps the latest messages in view while scrolling.
+@item URL detection: recent URLs from a particular user or matching a
+substring can be opened or copied.
+@item Nick coloring: color generation based on usernames remains stable across
+nick changes.  Mentions of users in messages are colored.
+@item Topic diffing: the modified portion of a channel topic change is
+highlighted.
+@end itemize")
+    (license license:gpl3+)))
+
 (define-public ii
   (package
     (name "ii")
@@ -341,7 +389,7 @@ for the IRCv3 protocol.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags (list (string-append "PREFIX=" %output)
-                          "CC=gcc")
+                          ,(string-append "CC=" (cc-for-target)))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure
@@ -365,7 +413,7 @@ for the IRCv3 protocol.")
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
-       #:make-flags (list "CC=gcc"
+       #:make-flags (list ,(string-append "CC=" (cc-for-target))
                           (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
@@ -376,6 +424,36 @@ for the IRCv3 protocol.")
      "sic is a simple IRC client, even more minimalistic than ii.")
     (license license:expat)))
 
+(define-public kirc
+  (package
+    (name "kirc")
+    (version "0.2.9")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/mcpcpc/kirc")
+                     (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0ahmfxhgcvnlgmxxbv9vga5x6krab1n7qq55ygj7hj3x7s7ra419"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))         ; No ./configure script
+    (synopsis "IRC client written in POSIX C99")
+    (description "Kirc is an Internet Relay Chat (IRC) client.  It includes
+support for Simple Authentication and Security Layer (SASL), the
+client-to-client (CTCP) protocol, simple chat history logging, synchronous
+message handling, multi-channel joining at server connection, full support for
+all RFC 2812 commands, and customized color scheme definitions.")
+    (home-page "http://kirc.io/index.html")
+    (license license:expat)))
+
 (define-public limnoria
   (package
     (name "limnoria")
@@ -388,16 +466,16 @@ for the IRCv3 protocol.")
         (base32 "0853xk1ps3v6lkmfx50wv56vynnzpl84v66hxnhl8i34zl36kk3c"))))
     (build-system python-build-system)
     (inputs
-     `(("python-pytz" ,python-pytz)
-       ("python-chardet" ,python-chardet)
-       ("python-dateutil" ,python-dateutil)
-       ("python-gnupg" ,python-gnupg)
-       ("python-feedparser" ,python-feedparser)
-       ("python-sqlalchemy" ,python-sqlalchemy)
-       ("python-socksipy-branch" ,python-socksipy-branch)
-       ("python-ecdsa" ,python-ecdsa)))
+     (list python-pytz
+           python-chardet
+           python-dateutil
+           python-gnupg
+           python-feedparser
+           python-sqlalchemy
+           python-socksipy-branch
+           python-ecdsa))
     (native-inputs
-     `(("python-mock" ,python-mock)))
+     (list python-mock))
     ;; Despite the existence of a test folder there is no test phase.
     ;; We need to package https://github.com/ProgVal/irctest and write
     ;; our own testphase.
@@ -475,14 +553,14 @@ other enhancements and bug fixes.")
                                       (assoc-ref %build-inputs "tcl")
                                       "/lib/tclConfig.sh"))))))))
     (inputs
-     `(("libressl" ,libressl)
-       ("ncurses" ,ncurses)
-       ("libarchive" ,libarchive) ; CHANGELOG: "Support for loading zip files"
-       ("perl" ,perl)
-       ("tcl" ,tcl)
-       ("ruby" ,ruby)))
+     (list libressl
+           ncurses
+           libarchive ; CHANGELOG: "Support for loading zip files"
+           perl
+           tcl
+           ruby))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     (list pkg-config))
     (home-page "http://epicsol.org")
     (synopsis "Epic5 IRC Client")
     (description
@@ -498,6 +576,37 @@ interface for those who are accustomed to the ircII way of doing things.")
                    ;; distribute binaries.
                    (license:non-copyleft "http://epicsol.org/copyright")))))
 
+(define-public litterbox
+  (package
+    (name "litterbox")
+    (version "1.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://git.causal.agency/litterbox/snapshot/litterbox-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0ll5d18slngdg2qhaxkvrcq2p1admh0h7sr06wx8347ka0vvrgjl"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; There are no tests.
+       #:make-flags
+       (list
+        (string-append "CC=" ,(cc-for-target))
+        (string-append "PREFIX=" %output))))
+    (native-inputs
+      (list pkg-config universal-ctags))
+    (inputs
+      (list libressl sqlite))
+    (home-page "https://code.causal.agency/june/litterbox")
+    (synopsis "TLS-only IRC logger")
+    (description
+"@command{litterbox} is a TLS-only IRC logger.  It logs
+events from IRC in a SQLite database, indexing messages for full-text
+search.  It is intended for use with the IRC bouncer @command{pounce},
+but can also be used independently as a logging bot.")
+    (license license:gpl3+)))
+
 (define-public inspircd
   (package
     (name "inspircd")
@@ -552,21 +661,21 @@ interface for those who are accustomed to the ircII way of doing things.")
                        (string-append "--config-dir=" out-etc name)))
              #t)))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     (list pkg-config))
     (inputs
-     `(("argon2" ,argon2)
-       ("gnutls" ,gnutls)
-       ("libmaxminddb" ,libmaxminddb)
-       ("mbedtls-apache" ,mbedtls-apache)
-       ("mysql" ,mysql)
-       ("openldap" ,openldap)
-       ("openssl" ,openssl)
-       ("pcre" ,pcre "bin")
-       ("perl" ,perl)
-       ("postgresql" ,postgresql)
-       ("re2" ,re2)
-       ("sqlite" ,sqlite)
-       ("tre" ,tre)))
+     (list argon2
+           gnutls
+           libmaxminddb
+           mbedtls-apache
+           mysql
+           openldap
+           openssl
+           `(,pcre "bin")
+           perl
+           postgresql
+           re2
+           sqlite
+           tre))
     (synopsis "Modular IRC server written in C++")
     (description "InspIRCd is a modular Internet Relay Chat
 server written in C++ for Unix-like operating systems.")