Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / irc.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
4 ;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 ng0 <ng0@n0.is>
7 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages irc)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix download)
29 #:use-module (guix packages)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system python)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages admin)
35 #:use-module (gnu packages aspell)
36 #:use-module (gnu packages autogen)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages backup)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages cyrus-sasl)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages file)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages guile)
50 #:use-module (gnu packages lua)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages kde)
53 #:use-module (gnu packages kde-frameworks)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-crypto)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages ruby)
60 #:use-module (gnu packages qt)
61 #:use-module (gnu packages tcl)
62 #:use-module (gnu packages time)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages web)
65 #:use-module (srfi srfi-1)
66 #:use-module (srfi srfi-26))
67
68 (define-public quassel
69 (package
70 (name "quassel")
71 (version "0.13.1")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append "https://quassel-irc.org/pub/quassel-"
76 version ".tar.bz2"))
77 (sha256
78 (base32
79 "0mg8jydc70vlylppzich26q4s40kr78r3ysfyjwisfvlg2byxvs8"))
80 (modules '((guix build utils)))
81 ;; We don't want to install the bundled scripts.
82 (snippet
83 '(begin
84 (delete-file-recursively "data/scripts")
85 (substitute* "data/CMakeLists.txt"
86 (("NOT WIN32") "WIN32"))
87 #t))))
88 (build-system cmake-build-system)
89 (arguments
90 ;; The three binaries are not mutually exlusive, and are all built
91 ;; by default.
92 '(#:configure-flags '(;;"-DWANT_QTCLIENT=OFF" ; 6.1 MiB
93 ;;"-DWANT_CORE=OFF" ; 3.0 MiB
94 ;;"-DWANT_MONO=OFF" ; 7.6 MiB
95 "-DWITH_KDE=OFF" ; no to kde integration ...
96 "-DWITH_BUNDLED_ICONS=ON" ; so we install bundled icons
97 "-DWITH_OXYGEN_ICONS=ON" ; also the oxygen ones
98 "-DWITH_WEBENGINE=OFF") ; we don't depend on qtwebengine
99 #:phases
100 (modify-phases %standard-phases
101 (add-after 'unpack 'patch-inxi-reference
102 (lambda* (#:key inputs #:allow-other-keys)
103 (let ((inxi (string-append (assoc-ref inputs "inxi") "/bin/inxi")))
104 (substitute* "src/common/aliasmanager.cpp"
105 ((" inxi ") (string-append " " inxi " ")))
106 #t))))
107 #:tests? #f)) ; no test target
108 (native-inputs
109 `(("extra-cmake-modules" ,extra-cmake-modules)
110 ("pkg-config" ,pkg-config)
111 ("qttools" ,qttools)))
112 (inputs
113 `(("inxi" ,inxi-minimal)
114 ("qca" ,qca)
115 ("qtbase" ,qtbase)
116 ("qtmultimedia" ,qtmultimedia)
117 ("qtscript" ,qtscript)
118 ("snorenotify" ,snorenotify)
119 ("zlib" ,zlib)))
120 (home-page "https://quassel-irc.org/")
121 (synopsis "Distributed IRC client")
122 (description "Quassel is a distributed IRC client, meaning that one or more
123 clients can attach to and detach from the central core. It resembles the
124 popular combination of screen and a text-based IRC client such as WeeChat or
125 irssi, but graphical.")
126 (license (list license:gpl2 license:gpl3)))) ;; dual licensed
127
128 (define-public irssi
129 (package
130 (name "irssi")
131 (version "1.2.2")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "https://github.com/irssi/irssi/"
135 "releases/download/" version "/irssi-"
136 version ".tar.xz"))
137 (sha256
138 (base32
139 "0y3mhnyr7x8ir8dlj83vbnchpfld28vdfni9yhpvls45j460c9v7"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:phases
143 (modify-phases %standard-phases
144 (replace 'configure
145 (lambda* (#:key inputs outputs #:allow-other-keys)
146 (let ((out (assoc-ref outputs "out")))
147 (setenv "CONFIG_SHELL" (which "bash"))
148 (invoke "./configure"
149 (string-append "--prefix=" out)
150 (string-append "--with-proxy")
151 (string-append "--with-socks")
152 (string-append "--with-bot")))))
153 (add-before 'check 'set-home
154 (lambda _
155 (setenv "HOME" (getcwd)))))))
156 (inputs
157 `(("glib" ,glib)
158 ("ncurses" ,ncurses)
159 ("openssl" ,openssl)
160 ("perl" ,perl)))
161 (native-inputs
162 `(("pkg-config" ,pkg-config)))
163 (home-page "https://irssi.org/")
164 (synopsis "Terminal-based IRC client")
165 (description
166 "Irssi is a terminal based IRC client for UNIX systems. It also supports
167 SILC and ICB protocols via plugins.")
168 (license license:gpl2+)))
169
170 (define-public weechat
171 (package
172 (name "weechat")
173 (version "2.6")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "https://weechat.org/files/src/weechat-"
177 version ".tar.xz"))
178 (sha256
179 (base32
180 "0j2iflnfvv31q2l9r67r8aj3ipggqfm2r2dpy7pvdpxgwwq337ps"))))
181 (build-system cmake-build-system)
182 (native-inputs
183 `(("gettext" ,gettext-minimal)
184 ("pkg-config" ,pkg-config)
185 ;; For tests.
186 ("cpputest" ,cpputest)))
187 (inputs `(("ncurses" ,ncurses)
188 ("libgcrypt" ,libgcrypt "out")
189 ("zlib" ,zlib)
190 ("aspell" ,aspell)
191 ("curl" ,curl)
192 ("gnutls" ,gnutls)
193
194 ;; Scripting language plug-ins.
195 ("guile" ,guile-2.0)
196 ("lua" ,lua-5.1)
197 ("python" ,python)
198 ("perl" ,perl)
199 ("tcl" ,tcl)))
200 (arguments
201 `(#:configure-flags
202 (list "-DENABLE_TESTS=ON") ; ‘make test’ fails otherwise
203 ;; Tests hang indefinately on non-Intel platforms.
204 #:tests? ,(if (any (cute string-prefix? <> (or (%current-target-system)
205 (%current-system)))
206 '("i686" "x86_64"))
207 '#t '#f)
208 #:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'disable-failing-tests
211 ;; For reasons best left to the imagination, CppUTest cannot skip
212 ;; more than one single test... Resort to manual patching instead.
213 ;; See <https://cpputest.github.io/manual.html#command_line>.
214 (λ _
215 ;; Don't test plugin support for languages we don't enable.
216 (substitute* "tests/unit/test-plugins.cpp"
217 ((".*\\$\\{plugin.name\\} == (javascript|php|ruby)" all)
218 (string-append "// SKIP" all)))
219 (substitute* "tests/scripts/test-scripts.cpp"
220 ((".*\\{ \"(javascript|php|ruby)\", " all)
221 (string-append "// SKIP" all)))
222 #t)))))
223 (synopsis "Extensible chat client")
224 (description "WeeChat (Wee Enhanced Environment for Chat) is an
225 @dfn{Internet Relay Chat} (IRC) client, which is designed to be light and fast.
226 The client uses a curses frontend, and there are remote interfaces for Web,
227 Qt, Android, and Emacs.
228
229 Everything in WeeChat can be done with the keyboard, though it also supports
230 using a mouse. It is customizable and extensible with plugins and scripts.")
231 (home-page "https://www.weechat.org/")
232 (license license:gpl3)))
233
234 (define-public ircii
235 (package
236 (name "ircii")
237 (version "20151120")
238 (source (origin
239 (method url-fetch)
240 (uri (string-append "https://ircii.warped.com/"
241 name "-" version ".tar.gz"))
242 (sha256
243 (base32
244 "178dc279f5j894qvp96dzz7c0jpryqlcqw5g0dc9yaxg9kgw1lqm"))))
245 (build-system gnu-build-system)
246 ;; TODO: We should package a small socks4/5 library/server to configure
247 ;; ircii with socks client. `ghc-socks' pulls in lots of haskell, which
248 ;; is too big.
249 (arguments
250 `(#:tests? #f
251 #:configure-flags (list
252 "--enable-ipv6"
253 "--with-emacs-meta-keys"
254 (string-append "--with-openssl="
255 (assoc-ref %build-inputs "openssl")))
256 #:phases
257 (modify-phases %standard-phases
258 (add-after 'unpack 'patch-bsdinstall-absolute-path-bins
259 (lambda* (#:key inputs #:allow-other-keys)
260 (substitute* "bsdinstall"
261 (("/bin/strip") "strip")
262 (("/bin/cp") "cp")
263 (("/bin/chmod") "chmod")
264 (("/etc/chown") "chown")
265 (("/bin/chgrp") "chgrp")
266 (("/bin/mkdir") "mkdir")
267 (("/bin/rm") "rm")
268 (("/bin/mv") "mv")))))))
269 (inputs
270 `(("ncurses" ,ncurses)
271 ("openssl" ,openssl)))
272 (native-inputs
273 `(("pkg-config" ,pkg-config)
274 ("perl" ,perl)))
275 (home-page "http://www.eterna.com.au/ircii/")
276 (synopsis "Terminal-based IRC and ICB client")
277 (description
278 "ircII is a terminal based IRC and ICB client for UNIX systems.")
279 (license license:bsd-3)))
280
281 (define-public ii
282 (package
283 (name "ii")
284 (version "1.8")
285 (source (origin
286 (method url-fetch)
287 (uri (string-append "http://dl.suckless.org/tools/"
288 name "-" version ".tar.gz"))
289 (sha256
290 (base32
291 "1lk8vjl7i8dcjh4jkg8h8bkapcbs465sy8g9c0chfqsywbmf3ndr"))))
292 (build-system gnu-build-system)
293 (arguments
294 `(#:tests? #f ; no tests
295 #:make-flags (list (string-append "PREFIX=" %output)
296 "CC=gcc")
297 #:phases
298 (modify-phases %standard-phases
299 (delete 'configure)))) ; no configure
300 (home-page "https://tools.suckless.org/ii/")
301 (synopsis "FIFO and file system based IRC client")
302 (description
303 "ii (Irc it) is a minimalist FIFO and file system based IRC client.")
304 (license license:expat)))
305
306 (define-public sic
307 (package
308 (name "sic")
309 (version "1.2")
310 (source (origin
311 (method url-fetch)
312 (uri (string-append "http://dl.suckless.org/tools/"
313 name "-" version ".tar.gz"))
314 (sha256
315 (base32
316 "11aiavxp44yayibc58bvimi8mrxvbw1plbci8cnbl4syk42zj1xc"))))
317 (build-system gnu-build-system)
318 (arguments
319 `(#:tests? #f ; no tests
320 #:make-flags (list "CC=gcc"
321 (string-append "PREFIX=" %output))
322 #:phases
323 (modify-phases %standard-phases
324 (delete 'configure)))) ; no configure
325 (home-page "https://tools.suckless.org/sic/")
326 (synopsis "Simple IRC client")
327 (description
328 "sic is a simple IRC client, even more minimalistic than ii.")
329 (license license:expat)))
330
331 (define-public limnoria
332 (package
333 (name "limnoria")
334 (version "2019.11.22")
335 (source
336 (origin
337 (method url-fetch)
338 (uri (pypi-uri "limnoria" version))
339 (sha256
340 (base32 "0853xk1ps3v6lkmfx50wv56vynnzpl84v66hxnhl8i34zl36kk3c"))))
341 (build-system python-build-system)
342 (inputs
343 `(("python-pytz" ,python-pytz)
344 ("python-chardet" ,python-chardet)
345 ("python-dateutil" ,python-dateutil)
346 ("python-gnupg" ,python-gnupg)
347 ("python-feedparser" ,python-feedparser)
348 ("python-sqlalchemy" ,python-sqlalchemy)
349 ("python-socksipy-branch" ,python-socksipy-branch)
350 ("python-ecdsa" ,python-ecdsa)))
351 (native-inputs
352 `(("python-mock" ,python-mock)))
353 ;; Despite the existence of a test folder there is no test phase.
354 ;; We need to package https://github.com/ProgVal/irctest and write
355 ;; our own testphase.
356 (arguments
357 `(#:tests? #f))
358 (home-page "https://github.com/ProgVal/Limnoria")
359 (synopsis "Modified version of Supybot (an IRC bot and framework)")
360 (description
361 "Modified version of Supybot with Python 3 and IRCv3 support,
362 embedded web server, translations (fr, fi, it, hu, de), and many
363 other enhancements and bug fixes.")
364 (license license:bsd-3)))
365
366 (define-public epic5
367 (package
368 (name "epic5")
369 (version "2.0.1")
370 (source (origin
371 (method url-fetch)
372 (uri (string-append "http://ftp.epicsol.org/pub/"
373 "epic/EPIC5-PRODUCTION/"
374 name "-" version ".tar.xz"))
375 (sha256
376 (base32
377 "1ap73d5f4vccxjaaq249zh981z85106vvqmxfm4plvy76b40y9jm"))))
378 (build-system gnu-build-system)
379 (arguments
380 `(#:test-target "test"
381 #:phases
382 (modify-phases %standard-phases
383 (add-after 'unpack 'patch-perl
384 (lambda _
385 (substitute* "regress/crash-irc"
386 (("perl5") (which "perl")))
387 #t))
388 (add-after 'unpack 'patch-bsdinstall
389 ;; If we just remove /bin/ some part of the bsdinstall breaks.
390 ;; Furthermore bsdinstalls has a reference to /etc/chmod here, which
391 ;; means if we leave /etc/ in, install fails.
392 (lambda _
393 (substitute* "bsdinstall"
394 (("/bin/strip") "strip")
395 (("/bin/cp") "cp")
396 (("/bin/chmod") "chmod")
397 (("/bin/chgrp") "chgrp")
398 (("/bin/mkdir") "mkdir")
399 (("/bin/rm") "rm")
400 (("/bin/mv") "mv")
401 (("/etc/") ""))
402 #t))
403 (replace 'configure
404 (lambda* (#:key outputs #:allow-other-keys)
405 ;; The tarball uses a very old version of autconf. It does not
406 ;; understand extra flags like `--enable-fast-install', so
407 ;; we need to invoke it with just what it understands.
408 (let ((out (assoc-ref outputs "out")))
409 ;; 'configure' doesn't understand '--host'.
410 ,@(if (%current-target-system)
411 `((setenv "CHOST" ,(%current-target-system)))
412 '())
413 (setenv "CONFIG_SHELL" (which "bash"))
414 (setenv "SHELL" (which "bash"))
415 (invoke "./configure"
416 (string-append "--prefix=" out)
417 "--with-ipv6" "--with-libarchive"
418 ;; We use libressl because openssl does not come
419 ;; with the lib/libssl.a which is needed for epic5.
420 ;; XXX: No matter which implementation is chosen,
421 ;; epic5 fails to connect to tls ports of roundrobin
422 ;; irc networks. This however is believed to be an
423 ;; protocol issue at epic5 related to ircd.
424 (string-append "--with-ssl="
425 (assoc-ref %build-inputs "libressl"))
426 (string-append "--with-tcl="
427 (assoc-ref %build-inputs "tcl")
428 "/lib/tclConfig.sh"))))))))
429 (inputs
430 `(("libressl" ,libressl)
431 ("ncurses" ,ncurses)
432 ("libarchive" ,libarchive) ; CHANGELOG: "Support for loading zip files"
433 ("perl" ,perl)
434 ("tcl" ,tcl)
435 ("ruby" ,ruby)))
436 (native-inputs
437 `(("pkg-config" ,pkg-config)))
438 (home-page "http://epicsol.org")
439 (synopsis "Epic5 IRC Client")
440 (description
441 "EPIC is a IRC client that has been under active development for
442 over 20 years. It is stable and mature, and offers an excellent ircII
443 interface for those who are accustomed to the ircII way of doing things.")
444 (license (list license:bsd-3
445 license:isc
446 license:bsd-4
447 ;; The epic license is equal to the standard three-clause
448 ;; BSD license except that you are not permitted to remove the
449 ;; "Redistribution is permitted" clause of the license if you
450 ;; distribute binaries.
451 (license:non-copyleft "http://epicsol.org/copyright")))))