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