gnu: Use invoke and return #t from all builders.
[jackhill/guix/guix.git] / gnu / packages / irc.scm
CommitLineData
980f058d 1;;; GNU Guix --- Functional package management for GNU
27930f85 2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
e288f007 3;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
cc6f4912 4;;; Copyright © 2015, 2017 Ludovic Courtès <ludo@gnu.org>
8c0756e2 5;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4a78fd46 6;;; Copyright © 2016 Nils Gillmann <ng0@n0.is>
507809be 7;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
e0dbead5 8;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
980f058d
EF
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)
27930f85 30 #:use-module (guix build-system gnu)
6ad13b59 31 #:use-module (guix build-system python)
e288f007
EF
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)
0c69a17e 37 #:use-module (gnu packages backup)
ac257f12 38 #:use-module (gnu packages check)
980f058d 39 #:use-module (gnu packages compression)
e288f007
EF
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages cyrus-sasl)
0c69a17e 42 #:use-module (gnu packages databases)
e288f007
EF
43 #:use-module (gnu packages file)
44 #:use-module (gnu packages gettext)
27930f85 45 #:use-module (gnu packages glib)
e288f007
EF
46 #:use-module (gnu packages gnupg)
47 #:use-module (gnu packages guile)
48 #:use-module (gnu packages lua)
27930f85 49 #:use-module (gnu packages ncurses)
980f058d
EF
50 #:use-module (gnu packages kde)
51 #:use-module (gnu packages kde-frameworks)
27930f85 52 #:use-module (gnu packages perl)
980f058d 53 #:use-module (gnu packages pkg-config)
e288f007 54 #:use-module (gnu packages python)
cc6f4912 55 #:use-module (gnu packages python-crypto)
0c69a17e 56 #:use-module (gnu packages ruby)
27930f85 57 #:use-module (gnu packages qt)
e288f007 58 #:use-module (gnu packages tcl)
33dc54b0 59 #:use-module (gnu packages time)
6ad13b59 60 #:use-module (gnu packages tls)
6a069618
EF
61 #:use-module (gnu packages web)
62 #:use-module (srfi srfi-1)
63 #:use-module (srfi srfi-26))
980f058d
EF
64
65(define-public quassel
66 (package
67 (name "quassel")
957ba692 68 (version "0.12.4")
980f058d
EF
69 (source
70 (origin
71 (method url-fetch)
72 (uri (string-append "http://quassel-irc.org/pub/quassel-"
73 version ".tar.bz2"))
36378bd5 74 (patches (search-patches "quassel-fix-tls-check.patch"))
980f058d
EF
75 (sha256
76 (base32
b82c63d0
EF
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"
6cbee49d
MW
84 (("NOT WIN32") "WIN32"))
85 #t))))
980f058d
EF
86 (build-system cmake-build-system)
87 (arguments
88 ;; The three binaries are not mutually exlusive, and are all built
89 ;; by default.
b82c63d0
EF
90 '(#:configure-flags '(;;"-DWANT_QTCLIENT=OFF" ; 5.2 MiB
91 ;;"-DWANT_CORE=OFF" ; 2.4 MiB
92 ;;"-DWANT_MONO=OFF" ; 6.4 MiB
980f058d 93 "-DUSE_QT5=ON" ; default is qt4
b82c63d0
EF
94 "-DWITH_KDE=OFF" ; no to kde integration ...
95 "-DWITH_OXYGEN=ON" ; therefore we install bundled icons
0b166a75 96 "-DWITH_WEBKIT=OFF") ; qtwebkit isn't packaged
980f058d 97 #:tests? #f)) ; no test target
b82c63d0 98 (native-inputs
980f058d 99 `(("extra-cmake-modules" ,extra-cmake-modules)
b82c63d0
EF
100 ("pkg-config" ,pkg-config)
101 ("qttools" ,qttools)))
102 (inputs
103 `(("qca" ,qca)
c695fb76 104 ("qtbase" ,qtbase)
0b166a75 105 ("qtscript" ,qtscript)
980f058d
EF
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
111clients can attach to and detach from the central core. It resembles the
112popular combination of screen and a text-based IRC client such as WeeChat or
113irssi, but graphical.")
114 (license (list license:gpl2 license:gpl3)))) ;; dual licensed
27930f85
EF
115
116(define-public irssi
117 (package
118 (name "irssi")
3026de3f 119 (version "1.1.1")
27930f85
EF
120 (source (origin
121 (method url-fetch)
fd41741b
EF
122 (uri (string-append "https://github.com/irssi/irssi/"
123 "releases/download/" version "/irssi-"
124 version ".tar.xz"))
27930f85
EF
125 (sha256
126 (base32
3026de3f 127 "1gx1flfh4a09nb3b5pvf0ygnbl7rry3l4gph8wij29dsl7khfj3q"))))
27930f85
EF
128 (build-system gnu-build-system)
129 (arguments
130 `(#:phases
a61bd6a5
EF
131 (modify-phases %standard-phases
132 (replace 'configure
133 (lambda* (#:key inputs outputs #:allow-other-keys)
d9d23101 134 (let ((out (assoc-ref outputs "out")))
a61bd6a5
EF
135 (setenv "CONFIG_SHELL" (which "bash"))
136 (zero?
137 (system* "./configure"
138 (string-append "--prefix=" out)
7b3f2682
EF
139 (string-append "--with-proxy")
140 (string-append "--with-socks")
141 (string-append "--with-bot")))))))))
27930f85
EF
142 (inputs
143 `(("glib" ,glib)
144 ("ncurses" ,ncurses)
d9d23101 145 ("openssl" ,openssl)
27930f85 146 ("perl" ,perl)))
d9d23101
MB
147 (native-inputs
148 `(("pkg-config" ,pkg-config)))
149 (home-page "https://irssi.org/")
27930f85
EF
150 (synopsis "Terminal-based IRC client")
151 (description
152 "Irssi is a terminal based IRC client for UNIX systems. It also supports
153SILC and ICB protocols via plugins.")
154 (license license:gpl2+)))
e288f007
EF
155
156(define-public weechat
157 (package
158 (name "weechat")
90101235 159 (version "2.1")
e288f007
EF
160 (source (origin
161 (method url-fetch)
10b91cca 162 (uri (string-append "https://weechat.org/files/src/weechat-"
f87b8e25 163 version ".tar.xz"))
e288f007
EF
164 (sha256
165 (base32
90101235 166 "0f7d2vdbxc5kgjl7lkamnbxvidgxwa8f9j3nr9fd4gr4z0gzi86d"))
fc1adab1 167 (patches (search-patches "weechat-python.patch"))))
709a3bb7 168 (build-system cmake-build-system)
00840ee0
TGR
169 (native-inputs
170 `(("gettext" ,gettext-minimal)
171 ("pkg-config" ,pkg-config)
172 ;; For tests.
173 ("cpputest" ,cpputest)))
e288f007 174 (inputs `(("ncurses" ,ncurses)
e288f007
EF
175 ("libgcrypt" ,libgcrypt "out")
176 ("zlib" ,zlib)
177 ("aspell" ,aspell)
178 ("curl" ,curl)
179 ("gnutls" ,gnutls)
180 ("guile" ,guile-2.0)
e288f007
EF
181 ("lua" ,lua-5.1)
182 ("python" ,python-2)
183 ("perl" ,perl)
184 ("tcl" ,tcl)))
185 (arguments
00840ee0
TGR
186 `(#:configure-flags
187 (list "-DENABLE_TESTS=ON") ; ‘make test’ fails otherwise
6a069618
EF
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)
00840ee0
TGR
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))))))
e288f007
EF
215 (synopsis "Extensible chat client")
216 (description "WeeChat (Wee Enhanced Environment for Chat) is an
d65db1d5
TGR
217@dfn{Internet Relay Chat} (IRC) client, which is designed to be light and fast.
218The client uses a curses frontend, and there are remote interfaces for Web,
219Qt, Android, and Emacs.
220
221Everything in WeeChat can be done with the keyboard, though it also supports
222using a mouse. It is customizable and extensible with plugins and scripts.")
10b91cca 223 (home-page "https://www.weechat.org/")
e288f007 224 (license license:gpl3)))
c744f5c0 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)))
99840fbb 272
273(define-public ii
274 (package
275 (name "ii")
e0dbead5 276 (version "1.8")
99840fbb 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
e0dbead5 283 "1lk8vjl7i8dcjh4jkg8h8bkapcbs465sy8g9c0chfqsywbmf3ndr"))))
99840fbb 284 (build-system gnu-build-system)
285 (arguments
e0dbead5 286 `(#:tests? #f ; no tests
99840fbb 287 #:make-flags (list (string-append "PREFIX=" %output)
288 "CC=gcc")
289 #:phases
290 (modify-phases %standard-phases
e0dbead5 291 (delete 'configure)))) ; no configure
d035eaa3 292 (home-page "https://tools.suckless.org/ii/")
8f65585b 293 (synopsis "FIFO and file system based IRC client")
99840fbb 294 (description
8f65585b 295 "ii (Irc it) is a minimalist FIFO and file system based IRC client.")
99840fbb 296 (license license:expat)))
e4eb2134 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
d035eaa3 317 (home-page "https://tools.suckless.org/sic/")
e4eb2134 318 (synopsis "Simple IRC client")
319 (description
320 "sic is a simple IRC client, even more minimalistic than ii.")
321 (license license:expat)))
6ad13b59 322
323(define-public limnoria
324 (package
325 (name "limnoria")
d5feb092 326 (version "2017.10.01")
6ad13b59 327 (source
328 (origin
329 (method url-fetch)
330 (uri (pypi-uri "limnoria" version))
331 (sha256
332 (base32
d5feb092 333 "1hd8h257x7a0s4rvb4aqvfi77qfcyv6jaz70nndg7y6p4yhvjmy6"))))
6ad13b59 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,
355embedded web server, translations (fr, fi, it, hu, de), and many
356other enhancements and bug fixes.")
357 (license license:bsd-3)))
0c69a17e 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
436over 20 years. It is stable and mature, and offers an excellent ircII
437interface 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.
1975ec69 445 (license:non-copyleft "http://epicsol.org/copyright")))))