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