tests: hackage: Fix mock urls.
[jackhill/guix/guix.git] / gnu / packages / messaging.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
3 ;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
4 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages messaging)
25 #:use-module ((guix licenses)
26 #:select (gpl3+ gpl2+ gpl2 lgpl2.1 lgpl2.0+ bsd-2 non-copyleft
27 asl2.0 x11))
28 #:use-module (guix utils)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system glib-or-gtk)
33 #:use-module (guix build-system python)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages cyrus-sasl)
39 #:use-module (gnu packages databases)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages enchant)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages xorg)
45 #:use-module (gnu packages xdisorg)
46 #:use-module (gnu packages libcanberra)
47 #:use-module (gnu packages libidn)
48 #:use-module (gnu packages lua)
49 #:use-module (gnu packages xml)
50 #:use-module (gnu packages gnupg)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages tcl)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages admin)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages tls)
62 #:use-module (gnu packages icu4c))
63
64 (define-public libotr
65 (package
66 (name "libotr")
67 (version "4.1.1")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "https://otr.cypherpunks.ca/libotr-"
71 version ".tar.gz"))
72 (sha256
73 (base32
74 "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb"))
75 (patches (search-patches "libotr-test-auth-fix.patch"))))
76 (build-system gnu-build-system)
77 (propagated-inputs
78 `(("libgcrypt" ,libgcrypt))) ; libotr headers include gcrypt.h
79 (inputs `(("libgpg-error" ,libgpg-error)))
80 (native-inputs `(("perl" ,perl))) ; for the test suite
81 (synopsis "Off-the-Record (OTR) Messaging Library and Toolkit")
82 (description
83 "OTR allows you to have private conversations over instant messaging by
84 providing: (1) Encryption: No one else can read your instant messages. (2)
85 Authentication: You are assured the correspondent is who you think it is. (3)
86 Deniability: The messages you send do not have digital signatures that are
87 checkable by a third party. Anyone can forge messages after a conversation to
88 make them look like they came from you. However, during a conversation, your
89 correspondent is assured the messages he sees are authentic and
90 unmodified. (4) Perfect forward secrecy: If you lose control of your private
91 keys, no previous conversation is compromised.")
92 (home-page "https://otr.cypherpunks.ca/")
93 (license (list lgpl2.1 gpl2))))
94
95 ;; These patches together fix https://github.com/bitlbee/bitlbee/pull/55, are
96 ;; already upstream, and should be unnecessary when the next bitlbee comes
97 ;; out.
98 (define %bitlbee-buddy-nick-change-patch
99 (origin
100 (method url-fetch)
101 (uri "https://github.com/bitlbee/bitlbee/commit/a42fda42.patch")
102 (sha256
103 (base32
104 "1mzjhcdn0rxir5mzgqz9kv142ai38p1iq2lajqx89wb7x0bp51zx"))))
105 (define %bitlbee-always-use-nicks-patch
106 (origin
107 (method url-fetch)
108 (uri "https://github.com/bitlbee/bitlbee/commit/3320d6d9.patch")
109 (sha256
110 (base32
111 "14d9kb5zdzh5hzakdvrbviz83rix0j2lq9rzb58b2fn92fp8yixd"))))
112
113 (define-public bitlbee
114 (package
115 (name "bitlbee")
116 (version "3.4.2")
117 (source (origin
118 (method url-fetch)
119 (uri (string-append "https://get.bitlbee.org/src/bitlbee-"
120 version ".tar.gz"))
121 (sha256
122 (base32 "0mza8lnfwibmklz8hdzg4f7p83hblf4h6fbf7d732kzpvra5bj39"))
123 (patches
124 (list %bitlbee-buddy-nick-change-patch
125 %bitlbee-always-use-nicks-patch))))
126 (build-system gnu-build-system)
127 (native-inputs `(("pkg-config" ,pkg-config)
128 ("check" ,check)))
129 (inputs `(("glib" ,glib)
130 ("libotr" ,libotr)
131 ("gnutls" ,gnutls)
132 ("python" ,python-2)
133 ("perl" ,perl)))
134 (arguments
135 `(#:phases (alist-cons-after
136 'install 'install-etc
137 (lambda* (#:key (make-flags '()) #:allow-other-keys)
138 (zero? (apply system* "make" "install-etc" make-flags)))
139 (alist-replace
140 'configure
141 ;; bitlbee's configure script does not tolerate many of the
142 ;; variable settings that Guix would pass to it.
143 (lambda* (#:key outputs #:allow-other-keys)
144 (zero? (system* "./configure"
145 (string-append "--prefix="
146 (assoc-ref outputs "out"))
147 "--otr=1")))
148 %standard-phases))))
149 (synopsis "IRC to instant messaging gateway")
150 (description "BitlBee brings IM (instant messaging) to IRC clients, for
151 people who have an IRC client running all the time and don't want to run an
152 additional IM client. BitlBee currently supports XMPP/Jabber (including
153 Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ, and the Twitter
154 microblogging network (plus all other Twitter API compatible services like
155 identi.ca and status.net).")
156 (home-page "http://www.bitlbee.org/")
157 (license (list gpl2+ bsd-2))))
158
159 (define-public hexchat
160 (package
161 (name "hexchat")
162 (version "2.12.0")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "https://dl.hexchat.net/hexchat/hexchat-"
166 version ".tar.xz"))
167 (sha256
168 (base32
169 "17fncwza5r80z9r6j1lrh7h375hp4w6pay08zgnfc3qca6bjy1y2"))))
170 (build-system gnu-build-system)
171 (native-inputs `(("pkg-config" ,pkg-config)
172 ("intltool" ,intltool)))
173 (inputs `(("dbus-glib" ,dbus-glib)
174 ("dbus" ,dbus)
175 ("enchant" ,enchant)
176 ("glib:bin" ,glib "bin") ;need glib-genmarshal
177 ("gtk" ,gtk+-2)
178 ("libcanberra" ,libcanberra)
179 ("libnotify" ,libnotify)
180 ("openssl" ,openssl)
181 ("perl-xml-parser" ,perl-xml-parser) ;for addons
182 ("python-2" ,python-2))) ;for addons
183 (synopsis "Graphical IRC Client")
184 (description
185 "HexChat lets you connect to multiple IRC networks at once. The main window
186 shows the list of currently connected networks and their channels, the current
187 conversation and the list of users. It uses colors to differentiate between
188 users and to highlight messages. It checks spelling using available
189 dictionaries. HexChat can be extended with multiple addons.")
190 (home-page "http://hexchat.net/")
191 (license gpl2+)))
192
193 (define-public ngircd
194 (package
195 (name "ngircd")
196 (version "22")
197 (source (origin
198 (method url-fetch)
199 (uri (string-append "http://arthur.barton.de/pub/ngircd/ngircd-"
200 version ".tar.xz"))
201 (sha256
202 (base32
203 "17k3g9qd9d010czk5846qxvzkmw4fihv8l6m2a2287crbxm3xhd4"))
204 (patches (search-patches "ngircd-no-dns-in-tests.patch"
205 "ngircd-handle-zombies.patch"))))
206 (build-system gnu-build-system)
207 ;; Needed for the test suite.
208 (native-inputs `(("procps" ,procps)
209 ("expect" ,expect)
210 ("inetutils" ,inetutils)))
211 ;; XXX Add libident, libwrap.
212 (inputs `(("zlib" ,zlib)
213 ("gnutls" ,gnutls)
214 ,@(if (string-suffix? "-linux"
215 (or (%current-target-system)
216 (%current-system)))
217 `(("linux-pam" ,linux-pam))
218 '())))
219 (arguments
220 `(#:configure-flags
221 '("--with-gnutls" "--with-iconv" "--enable-ipv6"
222 ,@(if (string-suffix? "-linux"
223 (or (%current-target-system)
224 (%current-system)))
225 '("--with-pam")
226 '()))
227 #:phases
228 ;; Necessary for the test suite.
229 (alist-cons-after
230 'configure 'post-configure
231 (lambda _
232 (substitute* "src/ngircd/Makefile"
233 (("/bin/sh") (which "sh")))
234 ;; The default getpid.sh does a sloppy grep over 'ps -ax' output,
235 ;; which fails arbitrarily.
236 (with-output-to-file "src/testsuite/getpid.sh"
237 (lambda ()
238 (display
239 (string-append
240 "#!" (which "sh") "\n"
241 "ps -C \"$1\" -o pid=\n"))))
242 ;; Our variant of getpid.sh does not work for interpreter names if a
243 ;; shebang script is run directly as "./foo", so patch cases where
244 ;; the test suite relies on this.
245 (substitute* "src/testsuite/start-server.sh"
246 ;; It runs 'getpid.sh sh' to test if it works at all. Run it on
247 ;; 'make' instead.
248 (("getpid.sh sh") "getpid.sh make")))
249 %standard-phases)))
250 (home-page "http://ngircd.barton.de/")
251 (synopsis "Lightweight Internet Relay Chat server for small networks")
252 (description
253 "ngIRCd is a lightweight Internet Relay Chat server for small or private
254 networks. It is easy to configure, can cope with dynamic IP addresses, and
255 supports IPv6, SSL-protected connections as well as PAM for authentication.")
256 (license gpl2+)))
257
258 (define-public pidgin
259 (package
260 (name "pidgin")
261 (version "2.11.0")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (string-append "mirror://sourceforge/pidgin/Pidgin/"
266 version "/" name "-" version ".tar.bz2"))
267 (sha256
268 (base32
269 "0crkggjj6y07v1kdwil9vw532b0vrs6p33nmlvdkpnl60m2169pp"))
270 (patches (search-patches "pidgin-add-search-path.patch"))))
271 (build-system glib-or-gtk-build-system)
272 (native-inputs
273 `(("pkg-config" ,pkg-config)
274 ("check" ,check)
275 ("intltool" ,intltool)
276 ("gconf" ,gconf)
277 ("python" ,python-2)
278 ("doxygen" ,doxygen)))
279 (inputs
280 `(("gtk+" ,gtk+-2)
281 ("libgcrypt" ,libgcrypt)
282 ("gnutls" ,gnutls)
283 ("cyrus-sasl" ,cyrus-sasl)
284 ("dbus" ,dbus)
285 ("dbus-glib" ,dbus-glib)
286 ("python2-dbus" ,python2-dbus)
287 ("libidn" ,libidn)
288 ("libltdl" ,libltdl)
289 ("libxml2" ,libxml2)
290 ;; TODO: gstreamer: patches needed to support gstreamer-1.0 or later
291 ;; TODO: farstream
292 ;; TODO: meanwhile
293 ;; TODO: network-manager
294 ;; TODO: gtkspell
295 ;; TODO: libxephyr
296 ;; TODO: libgadu
297 ("libxslt" ,libxslt)
298 ("avahi" ,avahi)
299 ("ncurses" ,ncurses)
300 ("sqlite" ,sqlite)
301 ("libice" ,libice)
302 ("libsm" ,libsm)
303 ("libxscrnsaver" ,libxscrnsaver)
304 ("startup-notification" ,startup-notification)))
305 (arguments
306 `(#:configure-flags
307 (list "--disable-gtkspell"
308 "--disable-tcl"
309 "--disable-meanwhile"
310 "--disable-nm" ; XXX remove when we have network-manager
311 "--disable-vv" ; XXX remove when we have farstream and gstreamer
312 "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
313 "--enable-cyrus-sasl"
314 (string-append "--with-ncurses-headers="
315 (assoc-ref %build-inputs "ncurses")
316 "/include"))))
317 (native-search-paths
318 (list (search-path-specification
319 (variable "PURPLE_PLUGIN_PATH")
320 (files (list (string-append "lib/purple-"
321 (version-prefix version 1))
322 "lib/pidgin")))))
323 (home-page "http://www.pidgin.im/")
324 (synopsis "Graphical multi-protocol instant messaging client")
325 (description
326 "Pidgin is a modular instant messaging client that supports many popular
327 chat protocols.")
328 (license
329 (list
330 gpl2+ ; Most of the code
331 lgpl2.1 ; GG protocol plugin (libpurple/protocols/gg/lib)
332 lgpl2.0+ ; OSCAR protocol plugin (libpurple/protocols/oscar)
333 ;; The following licenses cover the zephyr protocol plugin:
334 (non-copyleft
335 "file://libpurple/protocols/zephyr/mit-copyright.h"
336 "See libpurple/protocols/zephyr/mit-copyright.h in the distribution.")
337 (non-copyleft
338 "file://libpurple/protocols/zephyr/mit-sipb-copyright.h"
339 "See libpurple/protocols/zephyr/mit-sipb-copyright.h in the distribution.")))))
340
341 (define-public pidgin-otr
342 (package
343 (name "pidgin-otr")
344 (version "4.0.2")
345 (source (origin
346 (method url-fetch)
347 (uri (string-append "https://otr.cypherpunks.ca/"
348 name "-" version ".tar.gz"))
349 (sha256
350 (base32
351 "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
352 (build-system gnu-build-system)
353 (native-inputs
354 `(("pkg-config" ,pkg-config)
355 ("intltool" ,intltool)))
356 (inputs
357 `(("pidgin" ,pidgin)
358 ("libotr" ,libotr)
359 ("libgpg-error" ,libgpg-error)
360 ("libgcrypt" ,libgcrypt)
361 ("glib" ,glib)
362 ("gtk+" ,gtk+-2)))
363 (home-page "https://otr.cypherpunks.ca/")
364 (synopsis "Off-the-Record Messaging plugin for Pidgin")
365 (description
366 "Pidgin-OTR is a plugin that adds support for OTR to the Pidgin instant
367 messaging client. OTR (Off-the-Record) Messaging allows you to have private
368 conversations over instant messaging by providing: (1) Encryption: No one else
369 can read your instant messages. (2) Authentication: You are assured the
370 correspondent is who you think it is. (3) Deniability: The messages you send
371 do not have digital signatures that are checkable by a third party. Anyone
372 can forge messages after a conversation to make them look like they came from
373 you. However, during a conversation, your correspondent is assured the
374 messages he sees are authentic and unmodified. (4) Perfect forward secrecy:
375 If you lose control of your private keys, no previous conversation is
376 compromised.")
377 (license gpl2)))
378
379 (define-public znc
380 (package
381 (name "znc")
382 (version "1.6.3")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "http://znc.in/releases/archive/znc-"
386 version ".tar.gz"))
387 (sha256
388 (base32
389 "09xqi5fs40x6nj9gq99bnw1a7saq96bvqxknxx0ilq7yfvg4c733"))))
390 (build-system gnu-build-system)
391 (arguments
392 '(#:tests? #f ; tries to download GoogleTest with wget
393 #:configure-flags '("--enable-python"
394 "--enable-perl"
395 "--enable-cyrus")))
396 (native-inputs
397 `(("pkg-config" ,pkg-config)
398 ("perl" ,perl)
399 ("python" ,python)))
400 (inputs
401 `(("openssl" ,openssl)
402 ("zlib" ,zlib)
403 ("icu4c" ,icu4c)
404 ("cyrus-sasl" ,cyrus-sasl)))
405 (home-page "http://znc.in")
406 (synopsis "IRC network bouncer")
407 (description "ZNC is an IRC network bouncer or BNC. It can detach the
408 client from the actual IRC server, and also from selected channels. Multiple
409 clients from different locations can connect to a single ZNC account
410 simultaneously and therefore appear under the same nickname on IRC.")
411 (license asl2.0)))
412
413 (define-public python-nbxmpp
414 (package
415 (name "python-nbxmpp")
416 (version "0.5.3")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (string-append "https://pypi.python.org/packages/source/n/nbxmpp/"
421 "nbxmpp-" version ".tar.gz"))
422 (sha256
423 (base32
424 "0dcr786dyips1fdvgsn8yvpgcz5j7217fi05c29cfypdl8jnp6mp"))))
425 (build-system python-build-system)
426 ;; No tests included
427 (arguments `(#:tests? #f))
428 (home-page "http://python-nbxmpp.gajim.org")
429 (synopsis "Non-blocking Jabber/XMPP module")
430 (description
431 "The goal of this python library is to provide a way for Python
432 applications to use Jabber/XMPP networks in a non-blocking way. This library
433 was initially a fork of xmpppy, but is using non-blocking sockets.")
434 (license gpl3+)))
435
436 (define-public python2-nbxmpp
437 (package-with-python2 python-nbxmpp))
438
439 (define-public gajim
440 (package
441 (name "gajim")
442 (version "0.16.5")
443 (source (origin
444 (method url-fetch)
445 (uri (string-append "https://gajim.org/downloads/"
446 (version-major+minor version)
447 "/gajim-" version ".tar.bz2"))
448 (sha256
449 (base32
450 "14fhcqnkqygh91132dnf1idayj4r3iqbwb44sd3mxv20n6ribh55"))))
451 (build-system gnu-build-system)
452 (arguments
453 `(;; The only check done by gajim-0.16.x is to check that the
454 ;; translations are up-to-date, and in 0.16.5 they are not, so
455 ;; "make check" fails. Therefore, we disable tests for now.
456 ;;
457 ;; XXX TODO Try re-enabling tests in gajim-0.16.6 or later.
458 ;;
459 #:tests? #f
460 #:phases
461 (modify-phases %standard-phases
462 (add-after 'install 'wrap-program
463 (lambda* (#:key outputs #:allow-other-keys)
464 ;; Make sure all Python scripts run with the correct PYTHONPATH.
465 (let ((out (assoc-ref outputs "out"))
466 (path (getenv "PYTHONPATH")))
467 (for-each (lambda (name)
468 (let ((file (string-append out "/bin/" name)))
469 ;; Wrapping destroys identification of intended
470 ;; application, so we need to override "APP".
471 (substitute* file
472 (("APP=`basename \\$0`")
473 (string-append "APP=" name)))
474 (wrap-program file
475 `("PYTHONPATH" ":" prefix (,path)))))
476 '("gajim" "gajim-remote" "gajim-history-manager")))
477 #t)))))
478 (native-inputs
479 `(("intltool" ,intltool)))
480 (propagated-inputs
481 `(("python2-nbxmpp" ,python2-nbxmpp)
482 ("python2-pyopenssl" ,python2-pyopenssl)
483 ("python2-gnupg" ,python2-gnupg)))
484 (inputs
485 `(("python2-pygtk" ,python2-pygtk)
486 ("python" ,python-2)))
487 (home-page "https://gajim.org/")
488 (synopsis "Jabber (XMPP) client")
489 (description "Gajim is a feature-rich and easy to use Jabber/XMPP client.
490 Among its features are: a tabbed chat window and single window modes; support
491 for group chat (with Multi-User Chat protocol), invitation, chat to group chat
492 transformation; audio and video conferences; file transfer; TLS, GPG and
493 end-to-end encryption support; XML console.")
494 (license gpl3+)))
495
496 (define-public prosody
497 (package
498 (name "prosody")
499 (version "0.9.10")
500 (source (origin
501 (method url-fetch)
502 (uri (string-append "https://prosody.im/downloads/source/"
503 "prosody-" version ".tar.gz"))
504 (sha256
505 (base32
506 "0bv6s5c0iizz015hh1lxlwlw1iwvisywajm2rcrbdfyrskzfwdj8"))))
507 (build-system gnu-build-system)
508 (arguments
509 `(#:tests? #f ; no "check" target
510 #:modules ((ice-9 match)
511 (srfi srfi-1)
512 (guix build gnu-build-system)
513 (guix build utils))
514 #:phases
515 (modify-phases %standard-phases
516 (add-after 'unpack 'fix-configure-script
517 (lambda _
518 ;; The configure script aborts when it encounters unexpected
519 ;; arguments. Make it more tolerant.
520 (substitute* "configure"
521 (("exit 1") ""))
522 #t))
523 (add-after 'install 'wrap-programs
524 (lambda* (#:key inputs outputs #:allow-other-keys)
525 ;; Make sure all executables in "bin" find the required Lua
526 ;; modules at runtime.
527 (let* ((out (assoc-ref outputs "out"))
528 (bin (string-append out "/bin/"))
529 (deps (delete #f (map (match-lambda
530 ((label . directory)
531 (if (string-prefix? "lua" label)
532 directory #f)))
533 inputs)))
534 (path (string-join
535 (map (lambda (path)
536 (string-append path "/share/lua/5.1/?.lua;"
537 path "/share/lua/5.1/?/?.lua"))
538 (cons out deps))
539 ";"))
540 (cpath (string-join
541 (map (lambda (path)
542 (string-append path "/lib/lua/5.1/?.so;"
543 path "/lib/lua/5.1/?/?.so"))
544 (cons out deps))
545 ";")))
546 (for-each (lambda (file)
547 (wrap-program file
548 `("LUA_PATH" ";" = (,path))
549 `("LUA_CPATH" ";" = (,cpath))))
550 (find-files bin ".*"))
551 #t))))))
552 (inputs
553 `(("libidn" ,libidn)
554 ("openssl" ,openssl)
555 ("lua" ,lua-5.1)
556 ("lua5.1-expat" ,lua5.1-expat)
557 ("lua5.1-socket" ,lua5.1-socket)
558 ("lua5.1-filesystem" ,lua5.1-filesystem)
559 ("lua5.1-sec" ,lua5.1-sec)))
560 (home-page "https://prosody.im/")
561 (synopsis "Jabber (XMPP) server")
562 (description "Prosody is a modern XMPP communication server. It aims to
563 be easy to set up and configure, and efficient with system resources.
564 Additionally, for developers it aims to be easy to extend and give a flexible
565 system on which to rapidly develop added functionality, or prototype new
566 protocols.")
567 (license x11)))
568
569 ;;; messaging.scm ends here