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