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