gnu: emacs-sly: Update to 20200228.
[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, 2017 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, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
10 ;;; Copyright © 2016, 2017, 2018, 2019 Clément Lassieur <clement@lassieur.org>
11 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
12 ;;; Copyright © 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
14 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
15 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
18 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
19 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
20 ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
21 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages messaging)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages admin)
41 #:use-module (gnu packages aidc)
42 #:use-module (gnu packages aspell)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages avahi)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages bash)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages cpp)
53 #:use-module (gnu packages crypto)
54 #:use-module (gnu packages curl)
55 #:use-module (gnu packages cyrus-sasl)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages enchant)
59 #:use-module (gnu packages fontutils)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnome)
63 #:use-module (gnu packages gnupg)
64 #:use-module (gnu packages gperf)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages guile)
67 #:use-module (gnu packages icu4c)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages less)
70 #:use-module (gnu packages libcanberra)
71 #:use-module (gnu packages libidn)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages logging)
74 #:use-module (gnu packages lua)
75 #:use-module (gnu packages man)
76 #:use-module (gnu packages markup)
77 #:use-module (gnu packages ncurses)
78 #:use-module (gnu packages networking)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages photo)
82 #:use-module (gnu packages php)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages protobuf)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages python-crypto)
87 #:use-module (gnu packages python-web)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages qt)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages sqlite)
92 #:use-module (gnu packages tcl)
93 #:use-module (gnu packages texinfo)
94 #:use-module (gnu packages textutils)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages video)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages xdisorg)
99 #:use-module (gnu packages xiph)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages xorg)
102 #:use-module (guix build-system cmake)
103 #:use-module (guix build-system glib-or-gtk)
104 #:use-module (guix build-system gnu)
105 #:use-module (guix build-system meson)
106 #:use-module (guix build-system perl)
107 #:use-module (guix build-system python)
108 #:use-module (guix build-system qt)
109 #:use-module (guix build-system trivial)
110 #:use-module (guix download)
111 #:use-module (guix git-download)
112 #:use-module (guix hg-download)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (guix packages)
115 #:use-module (guix utils))
116
117 (define-public libotr
118 (package
119 (name "libotr")
120 (version "4.1.1")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append "https://otr.cypherpunks.ca/libotr-"
124 version ".tar.gz"))
125 (sha256
126 (base32
127 "1x8rliydhbibmzwdbyr7pd7n87m2jmxnqkpvaalnf4154hj1hfwb"))
128 (patches (search-patches "libotr-test-auth-fix.patch"))))
129 (build-system gnu-build-system)
130 (propagated-inputs
131 `(("libgcrypt" ,libgcrypt))) ; libotr headers include gcrypt.h
132 (inputs `(("libgpg-error" ,libgpg-error)))
133 (native-inputs `(("perl" ,perl))) ; for the test suite
134 (synopsis "Off-the-Record (OTR) Messaging Library and Toolkit")
135 (description
136 "OTR allows you to have private conversations over instant messaging by
137 providing: (1) Encryption: No one else can read your instant messages. (2)
138 Authentication: You are assured the correspondent is who you think it is. (3)
139 Deniability: The messages you send do not have digital signatures that are
140 checkable by a third party. Anyone can forge messages after a conversation to
141 make them look like they came from you. However, during a conversation, your
142 correspondent is assured the messages he sees are authentic and
143 unmodified. (4) Perfect forward secrecy: If you lose control of your private
144 keys, no previous conversation is compromised.")
145 (home-page "https://otr.cypherpunks.ca/")
146 (license (list license:lgpl2.1 license:gpl2))))
147
148 (define-public libsignal-protocol-c
149 (package
150 (name "libsignal-protocol-c")
151 (version "2.3.2")
152 (source (origin
153 (method url-fetch)
154 (uri (string-append "https://github.com/WhisperSystems/"
155 "libsignal-protocol-c/archive/v" version
156 ".tar.gz"))
157 (file-name (string-append name "-" version ".tar.gz"))
158 (sha256
159 (base32
160 "0380hl6fw3ppf265fg897pyrpqygpx4m9j8ifq118bim8lq6z0pk"))))
161 (arguments
162 `(;; Required for proper linking and for tests to run.
163 #:configure-flags '("-DBUILD_SHARED_LIBS=on" "-DBUILD_TESTING=1")))
164 (build-system cmake-build-system)
165 (inputs `( ;; Required for tests:
166 ("check" ,check)
167 ("openssl" ,openssl)))
168 (native-inputs `(("pkg-config" ,pkg-config)))
169 (home-page "https://github.com/WhisperSystems/libsignal-protocol-c")
170 (synopsis "Implementation of a ratcheting forward secrecy protocol")
171 (description "libsignal-protocol-c is an implementation of a ratcheting
172 forward secrecy protocol that works in synchronous and asynchronous
173 messaging environments. It can be used with messaging software to provide
174 end-to-end encryption.")
175 (license license:gpl3+)))
176
177 (define-public bitlbee
178 (package
179 (name "bitlbee")
180 (version "3.6")
181 (source (origin
182 (method url-fetch)
183 (uri (string-append "https://get.bitlbee.org/src/bitlbee-"
184 version ".tar.gz"))
185 (sha256
186 (base32 "0zhhcbcr59sx9h4maf8zamzv2waya7sbsl7w74gbyilvy93dw5cz"))))
187 (build-system gnu-build-system)
188 (native-inputs `(("pkg-config" ,pkg-config)
189 ;; Note: Change to 'check' for versions > 3.6.
190 ("check" ,check-0.12)))
191 (inputs `(("glib" ,glib)
192 ("libotr" ,libotr)
193 ("gnutls" ,gnutls)
194 ("python" ,python)
195 ("perl" ,perl)))
196 (arguments
197 `(#:phases
198 (modify-phases %standard-phases
199 (add-before 'configure 'set-python
200 (lambda _ (setenv "PYTHON" (which "python3")) #t))
201 (add-after 'install 'install-etc
202 (lambda* (#:key (make-flags '()) #:allow-other-keys)
203 (apply invoke "make" "install-etc" make-flags)))
204 (add-after 'install-etc 'install-lib
205 (lambda* (#:key (make-flags '()) #:allow-other-keys)
206 (apply invoke "make" "install-dev" make-flags)))
207 (replace 'configure
208 ;; bitlbee's configure script does not tolerate many of the
209 ;; variable settings that Guix would pass to it.
210 (lambda* (#:key outputs #:allow-other-keys)
211 (invoke "./configure"
212 (string-append "--prefix="
213 (assoc-ref outputs "out"))
214 "--otr=1"))))))
215 (synopsis "IRC to instant messaging gateway")
216 (description "BitlBee brings IM (instant messaging) to IRC clients, for
217 people who have an IRC client running all the time and don't want to run an
218 additional IM client. BitlBee currently supports XMPP/Jabber (including
219 Google Talk), MSN Messenger, Yahoo! Messenger, AIM and ICQ, and the Twitter
220 microblogging network (plus all other Twitter API compatible services like
221 identi.ca and status.net).")
222 (home-page "https://www.bitlbee.org/")
223 (license (list license:gpl2+ license:bsd-2))))
224
225 (define-public bitlbee-discord
226 (package
227 (name "bitlbee-discord")
228 (version "0.4.2")
229 (source
230 (origin
231 (method git-fetch)
232 (uri (git-reference
233 (url "https://github.com/sm00th/bitlbee-discord.git")
234 (commit version)))
235 (file-name (git-file-name name version))
236 (sha256
237 (base32 "02pigk2vbz0jdz11f96sygdvp1j762yjn62h124fkcsc070g7a2f"))))
238 (build-system gnu-build-system)
239 (arguments
240 `(#:phases
241 (modify-phases %standard-phases
242 (add-after 'unpack 'patch-autogen
243 (lambda _
244 (let ((sh (which "sh")))
245 (substitute* "autogen.sh" (("/bin/sh") sh))
246 (setenv "CONFIG_SHELL" sh))
247 #t))
248 (replace 'configure
249 (lambda* (#:key inputs outputs #:allow-other-keys)
250 (invoke "./configure"
251 (string-append "--with-plugindir="
252 (assoc-ref outputs "out")
253 "/lib/bitlbee/")))))))
254 (inputs `(("glib" ,glib)))
255 (native-inputs `(("pkg-config" ,pkg-config)
256 ("autoconf" ,autoconf)
257 ("automake" ,automake)
258 ("texinfo" ,texinfo)
259 ("libtool" ,libtool)
260 ("bitlbee" ,bitlbee) ; needs bitlbee headers
261 ("bash" ,bash)))
262 (synopsis "Discord plugin for Bitlbee")
263 (description "Bitlbee-discord is a plugin for Bitlbee witch provides
264 access to servers running the Discord protocol.")
265 (home-page "https://github.com/sm00th/bitlbee-discord/")
266 (license license:gpl2+)))
267
268 (define-public hexchat
269 (package
270 (name "hexchat")
271 (version "2.14.3")
272 (source (origin
273 (method url-fetch)
274 (uri (string-append "https://dl.hexchat.net/hexchat/hexchat-"
275 version ".tar.xz"))
276 (sha256
277 (base32
278 "10p829jm1r6kidkgf5lhqhyqc5mxdcq96q3zhadsckasvc9rs6lh"))))
279 (build-system meson-build-system)
280 (native-inputs `(("gettext" ,gettext-minimal)
281 ("glib:bin" ,glib "bin") ;need glib-genmarshal
282 ("perl" ,perl)
283 ("pkg-config" ,pkg-config)))
284 (inputs `(("dbus-glib" ,dbus-glib)
285 ("dbus" ,dbus)
286 ("enchant" ,enchant)
287 ("gtk" ,gtk+-2)
288 ("libcanberra" ,libcanberra)
289 ("libnotify" ,libnotify)
290 ("libproxy" ,libproxy)
291 ("openssl" ,openssl)
292
293 ;; Bindings for add-on scripts.
294 ("luajit" ,luajit)
295 ("perl-xml-parser" ,perl-xml-parser)
296 ("python-2" ,python-2)))
297 (arguments
298 `(#:phases
299 (modify-phases %standard-phases
300 (add-after 'unpack 'skip-desktop-database-updates
301 (lambda _
302 ;; The build scripts update icon and desktop file databases when
303 ;; DESTDIR is not set. We can't update these databases from
304 ;; within the build chroot, but we also don't set DESTDIR. So, we
305 ;; just skip this code.
306 (substitute* "meson_post_install.py"
307 (("if 'DESTDIR' not in os.environ:")
308 "if False:"))
309 #t)))))
310 (synopsis "Graphical IRC Client")
311 (description
312 "HexChat lets you connect to multiple IRC networks at once. The main
313 window shows the list of currently connected networks and their channels, the
314 current conversation and the list of users. It uses colors to differentiate
315 between users and to highlight messages. It checks spelling using available
316 dictionaries. HexChat can be extended with multiple addons.")
317 (home-page "https://hexchat.net/")
318 (license license:gpl2+)))
319
320 (define-public ngircd
321 (package
322 (name "ngircd")
323 (version "25")
324 (source (origin
325 (method url-fetch)
326 (uri (string-append "https://arthur.barton.de/pub/ngircd/ngircd-"
327 version ".tar.xz"))
328 (sha256
329 (base32
330 "0kpf5qi98m9f833r4rx9n6h9p31biwk798jwc1mgzmix7sp7r6f4"))
331 (patches (search-patches "ngircd-handle-zombies.patch"))))
332 (build-system gnu-build-system)
333 ;; Needed for the test suite.
334 (native-inputs `(("procps" ,procps)
335 ("expect" ,expect)
336 ("inetutils" ,inetutils)))
337 ;; XXX Add libident.
338 (inputs `(("zlib" ,zlib)
339 ("libwrap" ,tcp-wrappers)
340 ("gnutls" ,gnutls)
341 ,@(if (string-suffix? "-linux"
342 (or (%current-target-system)
343 (%current-system)))
344 `(("linux-pam" ,linux-pam))
345 '())))
346 (arguments
347 `(#:configure-flags
348 '("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
349 ,@(if (string-suffix? "-linux"
350 (or (%current-target-system)
351 (%current-system)))
352 '("--with-pam")
353 '()))
354 #:phases
355 (modify-phases %standard-phases
356 ;; Necessary for the test suite.
357 (add-after 'configure 'post-configure
358 (lambda _
359 (substitute* "src/ngircd/Makefile"
360 (("/bin/sh") (which "sh")))
361 ;; The default getpid.sh does a sloppy grep over 'ps -ax' output,
362 ;; which fails arbitrarily.
363 (with-output-to-file "src/testsuite/getpid.sh"
364 (lambda ()
365 (display
366 (string-append
367 "#!" (which "sh") "\n"
368 "ps -C \"$1\" -o pid=\n"))))
369 ;; Our variant of getpid.sh does not match interpreter names
370 ;; when the script's shebang is invoked directly as "./foo".
371 ;; Patch cases where the test suite relies on this.
372 (substitute* "src/testsuite/start-server.sh"
373 ;; It runs 'getpid.sh sh' to test if it works at all. Run it on
374 ;; 'make' instead.
375 (("getpid.sh sh") "getpid.sh make")))))))
376 (home-page "https://ngircd.barton.de/")
377 (synopsis "Lightweight Internet Relay Chat server for small networks")
378 (description
379 "ngIRCd is a lightweight @dfn{Internet Relay Chat} (IRC) server for small
380 or private networks. It is easy to configure, can cope with dynamic IP
381 addresses, and supports IPv6, SSL-protected connections, as well as PAM for
382 authentication.")
383 (license license:gpl2+)))
384
385 (define-public pidgin
386 (package
387 (name "pidgin")
388 (version "2.13.0")
389 (source
390 (origin
391 (method url-fetch)
392 (uri (string-append "mirror://sourceforge/pidgin/Pidgin/"
393 version "/pidgin-" version ".tar.bz2"))
394 (sha256
395 (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7"))
396 (patches (search-patches "pidgin-add-search-path.patch"))))
397 (build-system glib-or-gtk-build-system)
398 (native-inputs
399 `(("pkg-config" ,pkg-config)
400 ("check" ,check)
401 ("intltool" ,intltool)
402 ("gconf" ,gconf)
403 ("python" ,python-2)
404 ("doxygen" ,doxygen)))
405 (inputs
406 `(("gtk+" ,gtk+-2)
407 ("libgcrypt" ,libgcrypt)
408 ("gnutls" ,gnutls)
409 ("cyrus-sasl" ,cyrus-sasl)
410 ("dbus" ,dbus)
411 ("dbus-glib" ,dbus-glib)
412 ("python2-dbus" ,python2-dbus)
413 ("libidn" ,libidn)
414 ("libltdl" ,libltdl)
415 ("libxml2" ,libxml2)
416 ;; TODO: gstreamer: patches needed to support gstreamer-1.0 or later
417 ;; TODO: farstream
418 ;; TODO: meanwhile
419 ;; TODO: gtkspell
420 ;; TODO: libxephyr
421 ;; TODO: libgadu
422 ("libxslt" ,libxslt)
423 ("avahi" ,avahi)
424 ("ncurses" ,ncurses)
425 ("network-manager" ,network-manager)
426 ("sqlite" ,sqlite)
427 ("libice" ,libice)
428 ("libsm" ,libsm)
429 ("libxscrnsaver" ,libxscrnsaver)
430 ("startup-notification" ,startup-notification)))
431 (arguments
432 `(#:configure-flags
433 (list "--disable-gtkspell"
434 "--disable-tcl"
435 "--disable-meanwhile"
436 "--disable-vv" ; XXX remove when we have farstream and gstreamer
437 "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
438 "--enable-cyrus-sasl"
439 (string-append "--with-ncurses-headers="
440 (assoc-ref %build-inputs "ncurses")
441 "/include"))))
442 (native-search-paths
443 (list (search-path-specification
444 (variable "PURPLE_PLUGIN_PATH")
445 (files (list (string-append "lib/purple-"
446 (version-major version))
447 "lib/pidgin")))))
448 (home-page "https://www.pidgin.im/")
449 (synopsis "Graphical multi-protocol instant messaging client")
450 (description
451 "Pidgin is a modular instant messaging client that supports many popular
452 chat protocols.")
453 (license
454 (list
455 license:gpl2+ ; Most of the code
456 license:lgpl2.1 ; GG protocol plugin (libpurple/protocols/gg/lib)
457 license:lgpl2.0+ ; OSCAR protocol plugin (libpurple/protocols/oscar)
458 ;; The following licenses cover the zephyr protocol plugin:
459 (license:non-copyleft
460 "file://libpurple/protocols/zephyr/mit-copyright.h"
461 "See libpurple/protocols/zephyr/mit-copyright.h in the distribution.")
462 (license:non-copyleft
463 "file://libpurple/protocols/zephyr/mit-sipb-copyright.h"
464 "See libpurple/protocols/zephyr/mit-sipb-copyright.h in the distribution.")))))
465
466 (define-public pidgin-otr
467 (package
468 (name "pidgin-otr")
469 (version "4.0.2")
470 (source (origin
471 (method url-fetch)
472 (uri (string-append "https://otr.cypherpunks.ca/"
473 name "-" version ".tar.gz"))
474 (sha256
475 (base32
476 "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
477 (build-system gnu-build-system)
478 (native-inputs
479 `(("pkg-config" ,pkg-config)
480 ("intltool" ,intltool)))
481 (inputs
482 `(("pidgin" ,pidgin)
483 ("libotr" ,libotr)
484 ("libgpg-error" ,libgpg-error)
485 ("libgcrypt" ,libgcrypt)
486 ("glib" ,glib)
487 ("gtk+" ,gtk+-2)))
488 (home-page "https://otr.cypherpunks.ca/")
489 (synopsis "Off-the-Record Messaging plugin for Pidgin")
490 (description
491 "Pidgin-OTR is a plugin that adds support for OTR to the Pidgin instant
492 messaging client. OTR (Off-the-Record) Messaging allows you to have private
493 conversations over instant messaging by providing: (1) Encryption: No one else
494 can read your instant messages. (2) Authentication: You are assured the
495 correspondent is who you think it is. (3) Deniability: The messages you send
496 do not have digital signatures that are checkable by a third party. Anyone
497 can forge messages after a conversation to make them look like they came from
498 you. However, during a conversation, your correspondent is assured the
499 messages he sees are authentic and unmodified. (4) Perfect forward secrecy:
500 If you lose control of your private keys, no previous conversation is
501 compromised.")
502 (license license:gpl2)))
503
504 (define-public znc
505 (package
506 (name "znc")
507 (version "1.7.5")
508 (source (origin
509 (method url-fetch)
510 (uri (string-append "http://znc.in/releases/archive/znc-"
511 version ".tar.gz"))
512 (sha256
513 (base32
514 "08a7yb2xs85hyyz8dpzfbsfjwj2r6kcii022lj3l4rf8hl9ix558"))))
515 (build-system cmake-build-system)
516 (arguments
517 `(#:configure-flags
518 (list "-DWANT_CYRUS=ON"
519 "-DWANT_I18N=ON"
520 "-DWANT_PERL=ON"
521 "-DWANT_PYTHON=ON")
522 #:phases
523 (modify-phases %standard-phases
524 (add-after 'unpack 'unpack-googletest
525 ;; Copy the googletest sources to where the CMake build expects them.
526 (lambda* (#:key inputs #:allow-other-keys)
527 (let ((source (assoc-ref inputs "googletest-source"))
528 (target "third_party/googletest"))
529 (mkdir-p target)
530 (copy-recursively source target)
531 #t))))))
532 (native-inputs
533 `(("boost" ,boost)
534 ("gettext" ,gettext-minimal)
535 ("googletest-source" ,(package-source googletest))
536 ("pkg-config" ,pkg-config)))
537 (inputs
538 `(("cyrus-sasl" ,cyrus-sasl)
539 ("icu4c" ,icu4c)
540 ("openssl" ,openssl)
541 ("perl" ,perl)
542 ("python" ,python)
543 ("zlib" ,zlib)))
544 (home-page "https://znc.in")
545 (synopsis "IRC network bouncer")
546 (description "ZNC is an @dfn{IRC network bouncer} or @dfn{BNC}. It can
547 detach the client from the actual IRC server, and also from selected channels.
548 Multiple clients from different locations can connect to a single ZNC account
549 simultaneously and therefore appear under the same nickname on IRC.")
550 (license license:asl2.0)))
551
552 (define-public python-nbxmpp
553 (package
554 (name "python-nbxmpp")
555 (version "0.6.10")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "nbxmpp" version))
560 (sha256
561 (base32
562 "1vq89nhamciblyi5579bppnm4sb0zk5cg5hdipfpz174fxvl2wyd"))))
563 (build-system python-build-system)
564 (arguments
565 `(#:tests? #f)) ; no tests
566 (home-page "https://dev.gajim.org/gajim/python-nbxmpp")
567 (synopsis "Non-blocking Jabber/XMPP module")
568 (description
569 "The goal of this python library is to provide a way for Python
570 applications to use Jabber/XMPP networks in a non-blocking way. This library
571 was initially a fork of xmpppy, but uses non-blocking sockets.")
572 (license license:gpl3+)))
573
574 (define-public python2-nbxmpp
575 (package-with-python2 python-nbxmpp))
576
577 (define-public gajim
578 (package
579 (name "gajim")
580 (version "1.1.3")
581 (source (origin
582 (method url-fetch)
583 (uri (string-append "https://gajim.org/downloads/"
584 (version-major+minor version)
585 "/gajim-" version ".tar.bz2"))
586 (sha256
587 (base32
588 "0bzxwcpdd4ydh6d6mzpr0gxwhcb0x9ympk55fpvm1hcw9d28a716"))))
589 (build-system python-build-system)
590 (arguments
591 `(#:phases
592 (modify-phases %standard-phases
593 (add-after 'unpack 'add-plugin-dirs
594 (lambda _
595 (substitute* "gajim/common/configpaths.py"
596 (("_paths\\['PLUGINS_USER'\\]\\]")
597 "_paths['PLUGINS_USER']] + \
598 ([os.getenv('GAJIM_PLUGIN_PATH')] \
599 if os.getenv('GAJIM_PLUGIN_PATH') \
600 and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() \
601 else [])"))
602 #t))
603 (replace 'check
604 (lambda _
605 (invoke "python" "./setup.py" "test" "-s" "test.no_gui")))
606 (add-after 'install 'wrap-gi-typelib-path
607 (lambda* (#:key outputs #:allow-other-keys)
608 (let ((out (assoc-ref outputs "out")))
609 (for-each
610 (lambda (name)
611 (let ((file (string-append out "/bin/" name))
612 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
613 (wrap-program file
614 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
615 ;; For translations
616 `("XDG_DATA_DIRS" ":" prefix
617 (,(string-append (assoc-ref outputs "out") "/share"))))))
618 '("gajim" "gajim-remote" "gajim-history-manager")))
619 #t))
620 (add-after 'install 'install-icons
621 (lambda* (#:key inputs outputs #:allow-other-keys)
622 (let* ((out (assoc-ref outputs "out"))
623 (adwaita (string-append
624 (assoc-ref inputs "adwaita-icon-theme")
625 "/share/icons/Adwaita"))
626 (hicolor (string-append
627 (assoc-ref inputs "hicolor-icon-theme")
628 "/share/icons/hicolor"))
629 (icons (string-append
630 out "/lib/python"
631 ,(version-major+minor (package-version python))
632 "/site-packages/gajim/data/icons")))
633 (with-directory-excursion icons
634 (symlink adwaita "Adwaita")
635 (copy-recursively hicolor "hicolor")))
636 #t))
637 (add-after 'install-icons 'wrap-gsettings-schema-dir
638 (lambda* (#:key inputs outputs #:allow-other-keys)
639 (wrap-program (string-append (assoc-ref outputs "out")
640 "/bin/gajim")
641 ;; For GtkFileChooserDialog.
642 `("GSETTINGS_SCHEMA_DIR" =
643 (,(string-append (assoc-ref inputs "gtk+")
644 "/share/glib-2.0/schemas"))))
645 #t)))))
646 (native-search-paths
647 (list (search-path-specification
648 (variable "GAJIM_PLUGIN_PATH")
649 (separator #f) ;single entry
650 (files '("share/gajim/plugins")))
651 ;; Gajim needs to use the propagated inputs of its plugins.
652 (search-path-specification
653 (variable "PYTHONPATH")
654 (files (list (string-append
655 "lib/python"
656
657 ;; FIXME: Cannot use this expression as it would
658 ;; introduce a circular dependency at the top level.
659 ;; (version-major+minor (package-version python))
660 "3.7"
661
662 "/site-packages"))))))
663 (native-inputs
664 `(("intltool" ,intltool)
665 ("python-docutils" ,python-docutils)
666 ("xorg-server" ,xorg-server-for-tests)))
667 (inputs
668 `(("adwaita-icon-theme" ,adwaita-icon-theme)
669 ("gnome-keyring" ,gnome-keyring)
670 ("gtk+" ,gtk+)
671 ("gtkspell3" ,gtkspell3)
672 ("hicolor-icon-theme" ,hicolor-icon-theme)
673 ("libsecret" ,libsecret)
674 ("python-cssutils" ,python-cssutils)
675 ("python-dbus" ,python-dbus)
676 ("python-gnupg" ,python-gnupg)
677 ("python-keyring" ,python-keyring)
678 ("python-nbxmpp" ,python-nbxmpp)
679 ("python-pillow" ,python-pillow)
680 ("python-precis-i18n" ,python-precis-i18n)
681 ("python-pycairo" ,python-pycairo)
682 ("python-pygobject" ,python-pygobject)
683 ("python-pyopenssl" ,python-pyopenssl)
684 ("python-qrcode" ,python-qrcode)))
685 (home-page "https://gajim.org/")
686 (synopsis "Jabber (XMPP) client")
687 (description "Gajim is a feature-rich and easy to use Jabber/XMPP client.
688 Among its features are: a tabbed chat window and single window modes; support
689 for group chat (with Multi-User Chat protocol), invitation, chat to group chat
690 transformation; audio and video conferences; file transfer; TLS, GPG and
691 end-to-end encryption support; XML console.")
692 (license license:gpl3)))
693
694 (define-public gajim-omemo
695 (package
696 (name "gajim-omemo")
697 (version "2.6.29")
698 (source (origin
699 (method url-fetch/zipbomb)
700 (uri (string-append
701 "https://ftp.gajim.org/plugins_releases/omemo_"
702 version ".zip"))
703 (sha256
704 (base32
705 "1mif5qkrvxclqbqmq6njini4laznbs5nn82w2f1hkl8c1284dvgi"))))
706 (build-system trivial-build-system)
707 (arguments
708 `(#:modules ((guix build utils))
709 #:builder
710 (begin
711 (use-modules (guix build utils))
712 (let* ((out (assoc-ref %outputs "out"))
713 (share (in-vicinity out "share/gajim/plugins"))
714 (source (assoc-ref %build-inputs "source")))
715 (mkdir-p share)
716 (copy-recursively source share)
717 #t))))
718 (propagated-inputs
719 `(("python-axolotl" ,python-axolotl)))
720 (home-page
721 "https://dev.gajim.org/gajim/gajim-plugins/wikis/OmemoGajimPlugin")
722 (synopsis "Gajim OMEMO plugin")
723 (description
724 "This package provides the Gajim OMEMO plugin. OMEMO is an XMPP
725 Extension Protocol (XEP) for secure multi-client end-to-end encryption based
726 on Axolotl and PEP.")
727 (license license:gpl3+)))
728
729 (define-public dino
730 ;; The only release tarball is for version 0.0, but it is very old and fails
731 ;; to build.
732 (let ((commit "8e14ac6d714b7f88e16de31a6c795e811dc27417")
733 (revision "4"))
734 (package
735 (name "dino")
736 (version (git-version "0.0" revision commit))
737 (source (origin
738 (method git-fetch)
739 (uri (git-reference
740 (url "https://github.com/dino/dino.git")
741 (commit commit)))
742 (file-name (git-file-name name version))
743 (sha256
744 (base32
745 "0xfmwnc2f8lsvmp7m8ggikzqjaw5z6wmxrv6j5ljha5ckffrdd9m"))))
746 (build-system cmake-build-system)
747 (arguments
748 `(#:tests? #f ; there are no tests
749 #:parallel-build? #f ; not supported
750 ; Use our libsignal-protocol-c instead of the git submodule.
751 #:configure-flags '("-DSHARED_SIGNAL_PROTOCOL=yes")
752 #:modules ((guix build cmake-build-system)
753 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
754 (guix build utils))
755 #:imported-modules (,@%gnu-build-system-modules
756 (guix build cmake-build-system)
757 (guix build glib-or-gtk-build-system))
758 #:phases
759 (modify-phases %standard-phases
760 ;; The signal-protocol plugin accesses internal headers of
761 ;; libsignal-protocol-c, so we need to put the sources there.
762 (add-after 'unpack 'unpack-sources
763 (lambda* (#:key inputs #:allow-other-keys)
764 (with-directory-excursion "plugins/signal-protocol/libsignal-protocol-c"
765 (invoke "tar" "xvf"
766 (assoc-ref inputs "libsignal-protocol-c-source")
767 "--strip-components=1"))))
768 (add-after 'install 'glib-or-gtk-wrap
769 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
770 (inputs
771 `(("libgee" ,libgee)
772 ("libsignal-protocol-c" ,libsignal-protocol-c)
773 ("libgcrypt" ,libgcrypt)
774 ("libsoup" ,libsoup)
775 ("qrencode" ,qrencode)
776 ("sqlite" ,sqlite-with-column-metadata)
777 ("gpgme" ,gpgme)
778 ("gtk+" ,gtk+)
779 ("glib-networking" ,glib-networking)
780 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
781 (native-inputs
782 `(("pkg-config" ,pkg-config)
783 ("libsignal-protocol-c-source" ,(package-source libsignal-protocol-c))
784 ("glib" ,glib "bin")
785 ("vala" ,vala)
786 ("gettext" ,gettext-minimal)))
787 (home-page "https://dino.im")
788 (synopsis "Graphical Jabber (XMPP) client")
789 (description "Dino is a Jabber (XMPP) client which aims to fit well into
790 a graphical desktop environment like GNOME.")
791 (license license:gpl3+))))
792
793 (define-public prosody
794 (package
795 (name "prosody")
796 (version "0.11.3")
797 (source (origin
798 (method url-fetch)
799 (uri (string-append "https://prosody.im/downloads/source/"
800 "prosody-" version ".tar.gz"))
801 (sha256
802 (base32
803 "11xz4milv2962qf75vrdwsvd8sy2332nf69202rmvz5989pvvnng"))))
804 (build-system gnu-build-system)
805 (arguments
806 `(#:tests? #f ;tests require "busted"
807 #:configure-flags (list "--no-example-certs")
808 #:modules ((ice-9 match)
809 (srfi srfi-1)
810 (guix build gnu-build-system)
811 (guix build utils))
812 #:phases
813 (modify-phases %standard-phases
814 (add-after 'unpack 'fix-configure-script
815 (lambda _
816 ;; The configure script aborts when it encounters unexpected
817 ;; arguments. Make it more tolerant.
818 (substitute* "configure"
819 (("exit 1") ""))
820 #t))
821 (add-after 'unpack 'fix-makefile
822 (lambda _
823 (substitute* "GNUmakefile"
824 ;; prosodyctl needs to read the configuration file.
825 (("^INSTALLEDCONFIG =.*") "INSTALLEDCONFIG = /etc/prosody\n")
826 ;; prosodyctl needs a place to put auto-generated certificates.
827 (("^INSTALLEDDATA =.*") "INSTALLEDDATA = /var/lib/prosody\n"))
828 #t))
829 (add-after 'install 'wrap-programs
830 (lambda* (#:key inputs outputs #:allow-other-keys)
831 ;; Make sure all executables in "bin" find the required Lua
832 ;; modules at runtime.
833 (let* ((out (assoc-ref outputs "out"))
834 (bin (string-append out "/bin/"))
835 (deps (delete #f (map (match-lambda
836 ((label . directory)
837 (if (string-prefix? "lua" label)
838 directory #f)))
839 inputs)))
840 (lua-path (string-join
841 (map (lambda (path)
842 (string-append
843 path "/share/lua/5.2/?.lua;"
844 path "/share/lua/5.2/?/?.lua"))
845 (cons out deps))
846 ";"))
847 (lua-cpath (string-join
848 (map (lambda (path)
849 (string-append
850 path "/lib/lua/5.2/?.so;"
851 path "/lib/lua/5.2/?/?.so"))
852 (cons out deps))
853 ";"))
854 (openssl (assoc-ref inputs "openssl"))
855 (coreutils (assoc-ref inputs "coreutils"))
856 (path (map (lambda (dir)
857 (string-append dir "/bin"))
858 (list openssl coreutils))))
859 (for-each (lambda (file)
860 (wrap-program file
861 `("LUA_PATH" ";" = (,lua-path))
862 `("LUA_CPATH" ";" = (,lua-cpath))
863 `("PATH" ":" prefix ,path)))
864 (find-files bin ".*"))
865 #t))))))
866 (inputs
867 `(("libidn" ,libidn)
868 ("openssl" ,openssl)
869 ("lua" ,lua-5.2)
870 ("lua5.2-bitop" ,lua5.2-bitop)
871 ("lua5.2-expat" ,lua5.2-expat)
872 ("lua5.2-socket" ,lua5.2-socket)
873 ("lua5.2-filesystem" ,lua5.2-filesystem)
874 ("lua5.2-sec" ,lua5.2-sec)))
875 (home-page "https://prosody.im/")
876 (synopsis "Jabber (XMPP) server")
877 (description "Prosody is a modern XMPP communication server. It aims to
878 be easy to set up and configure, and efficient with system resources.
879 Additionally, for developers it aims to be easy to extend and give a flexible
880 system on which to rapidly develop added functionality, or prototype new
881 protocols.")
882 (license license:x11)))
883
884 (define-public prosody-http-upload
885 (let ((changeset "765735bb590b")
886 (revision "1"))
887 (package
888 (name "prosody-http-upload")
889 (version (string-append "0-" revision "." (string-take changeset 7)))
890 (source (origin
891 (method hg-fetch)
892 (uri (hg-reference
893 (url "https://hg.prosody.im/prosody-modules/")
894 (changeset changeset)))
895 (file-name (string-append name "-" version "-checkout"))
896 (sha256
897 (base32
898 "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
899 (build-system trivial-build-system)
900 (arguments
901 '(#:modules ((guix build utils))
902 #:builder
903 (begin
904 (use-modules (guix build utils))
905 (let ((out (assoc-ref %outputs "out"))
906 (source (assoc-ref %build-inputs "source")))
907 (with-directory-excursion (in-vicinity source "mod_http_upload")
908 (install-file "mod_http_upload.lua" out))
909 #t))))
910 (home-page "https://modules.prosody.im/mod_http_upload.html")
911 (synopsis "XEP-0363: Allow clients to upload files over HTTP")
912 (description "This module implements XEP-0363: it allows clients to
913 upload files over HTTP.")
914 (license (package-license prosody)))))
915
916 (define-public prosody-smacks
917 (let ((changeset "67f1d1f22625")
918 (revision "1"))
919 (package
920 (name "prosody-smacks")
921 (version (string-append "0-" revision "." (string-take changeset 7)))
922 (source (origin
923 (method hg-fetch)
924 (uri (hg-reference
925 (url "https://hg.prosody.im/prosody-modules/")
926 (changeset changeset)))
927 (file-name (string-append name "-" version "-checkout"))
928 (sha256
929 (base32
930 "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs"))))
931 (build-system trivial-build-system)
932 (arguments
933 '(#:modules ((guix build utils))
934 #:builder
935 (begin
936 (use-modules (guix build utils))
937 (let ((out (assoc-ref %outputs "out"))
938 (source (assoc-ref %build-inputs "source")))
939 (with-directory-excursion (in-vicinity source "mod_smacks")
940 (install-file "mod_smacks.lua" out))
941 #t))))
942 (home-page "https://modules.prosody.im/mod_smacks.html")
943 (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
944 (description "This module implements XEP-0198: when supported by both
945 the client and server, it can allow clients to resume a disconnected session,
946 and prevent message loss.")
947 (license (package-license prosody)))))
948
949 (define-public libtoxcore
950 (let ((revision "2")
951 (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21"))
952 (package
953 (name "libtoxcore")
954 (version (string-append "0.0.0" "-"
955 revision "."(string-take commit 7)))
956 (source (origin
957 (method git-fetch)
958 (uri (git-reference
959 (url "https://github.com/irungentoo/toxcore.git")
960 (commit commit)))
961 (file-name (string-append name "-" version "-checkout"))
962 (sha256
963 (base32
964 "11lqra4yd7v293cp286ynff5lqz1pprzg8vn3wq6vryj08g88zqb"))))
965 (build-system gnu-build-system)
966 (arguments `(#:tests? #f)) ; FIXME: tests hang, some fail.
967 (native-inputs
968 `(("autoconf" ,autoconf)
969 ("automake" ,automake)
970 ("libtool" ,libtool)
971 ("check" ,check)
972 ("pkg-config" ,pkg-config)))
973 (inputs
974 `(("libsodium" ,libsodium)
975 ("opus" ,opus)
976 ("libvpx" ,libvpx)))
977 (synopsis "Library for the Tox encrypted messenger protocol")
978 (description
979 "C library implementation of the Tox encrypted messenger protocol.")
980 (license license:gpl3+)
981 (home-page "https://tox.chat"))))
982
983 ;; Some tox clients move to c-toxcore, which seems to be where all the
984 ;; recent development happens. It is run by the same developers as toxcore,
985 ;; forked into a group namespace.
986 (define-public c-toxcore
987 (package
988 (name "c-toxcore")
989 (version "0.2.9")
990 (source
991 (origin
992 (method git-fetch)
993 (uri (git-reference
994 (url "https://github.com/TokTok/c-toxcore.git")
995 (commit (string-append "v" version))))
996 (file-name (git-file-name name version))
997 (sha256
998 (base32
999 "0aljr9hqybla6p61af6fdkv0x8gph7c2wacqqa9hq2z9w0p4fs5j"))))
1000 (arguments
1001 `(#:tests? #f)) ; FIXME: Testsuite seems to stay stuck on test 3. Disable
1002 ; for now.
1003 (build-system cmake-build-system)
1004 (native-inputs
1005 `(("pkg-config" ,pkg-config)))
1006 (propagated-inputs
1007 `(("libsodium" ,libsodium)
1008 ("opus" ,opus)
1009 ("libvpx" ,libvpx)))
1010 (home-page "https://tox.chat")
1011 (synopsis "Library for the Tox encrypted messenger protocol")
1012 (description
1013 "Official fork of the C library implementation of the Tox encrypted
1014 messenger protocol.")
1015 (license license:gpl3+)))
1016
1017 (define-public utox
1018 (package
1019 (name "utox")
1020 (version "0.17.1")
1021 (source
1022 (origin
1023 (method git-fetch)
1024 (uri (git-reference
1025 (url "https://github.com/uTox/uTox.git")
1026 (commit (string-append "v" version))
1027 (recursive? #t))) ;; Needed for 'minini' git submodule.
1028 (file-name (string-append name "-" version "-checkout"))
1029 (sha256
1030 (base32
1031 "17kwqw24iqljp2icih9k6ikx12gzr8zzqr8y5h35bg8m5s8pasq5"))))
1032 (build-system cmake-build-system)
1033 (arguments
1034 `(#:configure-flags '("-DENABLE_TESTS=on")
1035 #:phases
1036 (modify-phases %standard-phases
1037 (add-before 'build 'patch-absolute-filename-libgtk-3
1038 (lambda* (#:key inputs outputs #:allow-other-keys)
1039 (substitute* "../source/src/xlib/gtk.c"
1040 (("libgtk-3.so")
1041 (string-append (assoc-ref inputs "gtk+")
1042 "/lib/libgtk-3.so")))))
1043 (add-after 'install 'wrap-program
1044 (lambda* (#:key inputs outputs #:allow-other-keys)
1045 (wrap-program (string-append (assoc-ref outputs "out")
1046 "/bin/utox")
1047 ;; For GtkFileChooserDialog.
1048 `("GSETTINGS_SCHEMA_DIR" =
1049 (,(string-append (assoc-ref inputs "gtk+")
1050 "/share/glib-2.0/schemas")))))))))
1051 (inputs
1052 `(("dbus" ,dbus)
1053 ("filteraudio" ,filteraudio)
1054 ("fontconfig" ,fontconfig)
1055 ("freetype" ,freetype)
1056 ("libsodium" ,libsodium)
1057 ("c-toxcore" ,c-toxcore)
1058 ("gtk+" ,gtk+)
1059 ("libvpx" ,libvpx)
1060 ("libx11" ,libx11)
1061 ("libxext" ,libxext)
1062 ("libxrender" ,libxrender)
1063 ("openal" ,openal)
1064 ("v4l-utils" ,v4l-utils)))
1065 (native-inputs
1066 `(("check" ,check)
1067 ("pkg-config" ,pkg-config)))
1068 (synopsis "Lightweight Tox client")
1069 (description
1070 "Utox is a lightweight Tox client. Tox is a distributed and secure
1071 instant messenger with audio and video chat capabilities.")
1072 (home-page "http://utox.org/")
1073 (license license:gpl3)))
1074
1075 (define-public qtox
1076 (package
1077 (name "qtox")
1078 (version "1.16.3")
1079 (source (origin
1080 (method url-fetch)
1081 (uri (string-append "https://github.com/qTox/qTox/archive/v"
1082 version ".tar.gz"))
1083 (sha256
1084 (base32
1085 "10n3cgw9xaqin9la8wpd8v83bkjmimicgbyp5ninsdgsrgky4hmq"))
1086 (file-name (string-append name "-" version ".tar.gz"))))
1087 (build-system cmake-build-system)
1088 (arguments
1089 '(#:phases
1090 (modify-phases %standard-phases
1091 (add-after 'unpack 'fix-reproducibility-issues
1092 (lambda _
1093 (substitute* "src/main.cpp"
1094 (("__DATE__") "\"\"")
1095 (("__TIME__") "\"\"")
1096 (("TIMESTAMP") "\"\""))
1097 #t))
1098 ;; Ensure that icons are found at runtime.
1099 (add-after 'install 'wrap-executable
1100 (lambda* (#:key inputs outputs #:allow-other-keys)
1101 (let ((out (assoc-ref outputs "out")))
1102 (wrap-program (string-append out "/bin/qtox")
1103 `("QT_PLUGIN_PATH" prefix
1104 ,(list (string-append (assoc-ref inputs "qtsvg")
1105 "/lib/qt5/plugins/"))))))))))
1106 (inputs
1107 `(("ffmpeg" ,ffmpeg)
1108 ("filteraudio" ,filteraudio)
1109 ("glib" ,glib)
1110 ("gtk+" ,gtk+-2)
1111 ("libsodium" ,libsodium)
1112 ("c-toxcore" ,c-toxcore)
1113 ("libvpx" ,libvpx)
1114 ("libxscrnsaver" ,libxscrnsaver)
1115 ("libx11" ,libx11)
1116 ("libexif" ,libexif)
1117 ("sqlite" ,sqlite)
1118 ("openal" ,openal)
1119 ("qrencode" ,qrencode)
1120 ("qtbase" ,qtbase)
1121 ("qtsvg" ,qtsvg)
1122 ("sqlcipher" ,sqlcipher)))
1123 (native-inputs
1124 `(("pkg-config" ,pkg-config)
1125 ("qmake" ,qttools)))
1126 (home-page "https://qtox.github.io/")
1127 (synopsis "Tox chat client using Qt")
1128 (description "qTox is a Tox client that follows the Tox design
1129 guidelines. It provides an easy to use application that allows you to
1130 connect with friends and family without anyone else listening in.")
1131 (license license:gpl3+)))
1132
1133 (define-public pybitmessage
1134 (package
1135 (name "pybitmessage")
1136 (version "0.6.3.2")
1137 (source
1138 (origin
1139 (method git-fetch)
1140 (uri (git-reference
1141 (url "https://github.com/Bitmessage/PyBitmessage.git")
1142 (commit version)))
1143 (file-name (string-append name "-" version "-checkout"))
1144 (sha256
1145 (base32
1146 "1lmhbpwsqh1v93krlqqhafw2pc3y0qp8zby186yllbph6s8kdp35"))))
1147 (propagated-inputs
1148 ;; TODO:
1149 ;; Package "pyopencl", required in addition to numpy for OpenCL support.
1150 ;; Package "gst123", required in addition to alsa-utils and
1151 ;; mpg123 for sound support.
1152 `(("python2-msgpack" ,python2-msgpack)
1153 ("python2-pythondialog" ,python2-pythondialog)
1154 ("python2-pyqt-4" ,python2-pyqt-4)
1155 ("python2-sip" ,python2-sip)
1156 ("python2-pysqlite" ,python2-pysqlite)
1157 ("python2-pyopenssl" ,python2-pyopenssl)))
1158 (native-inputs
1159 `(("openssl" ,openssl)))
1160 (build-system python-build-system)
1161 (arguments
1162 `(#:modules ((guix build python-build-system)
1163 (guix build utils))
1164 #:tests? #f ;no test target
1165 #:python ,python-2
1166 #:phases
1167 (modify-phases %standard-phases
1168 (add-after 'unpack 'fix-unmatched-python-shebangs
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (substitute* "src/bitmessagemain.py"
1171 (("#!/usr/bin/env python2.7")
1172 (string-append "#!" (which "python"))))
1173 (substitute* "src/bitmessagecli.py"
1174 (("#!/usr/bin/env python2.7.x")
1175 (string-append "#!" (which "python"))))
1176 #t))
1177 (add-after 'unpack 'fix-depends
1178 (lambda* (#:key inputs #:allow-other-keys)
1179 (substitute* "src/depends.py"
1180 (("libcrypto.so")
1181 (string-append (assoc-ref inputs "openssl")
1182 "/lib/libcrypto.so")))
1183 #t))
1184 (add-after 'unpack 'fix-local-files-in-paths
1185 (lambda* (#:key outputs #:allow-other-keys)
1186 (substitute* "src/proofofwork.py"
1187 (("bitmsghash.so")
1188 (string-append (assoc-ref outputs "out")
1189 "/lib/bitmsghash.so")))
1190 #t))
1191 (add-after 'unpack 'fix-pyelliptic
1192 (lambda* (#:key inputs #:allow-other-keys)
1193 (substitute* "src/pyelliptic/openssl.py"
1194 (("libcrypto.so")
1195 (string-append (assoc-ref inputs "openssl")
1196 "/lib/libcrypto.so"))
1197 (("libssl.so")
1198 (string-append (assoc-ref inputs "openssl")
1199 "/lib/libssl.so")))
1200 #t))
1201 (add-after 'unpack 'noninteractive-build
1202 ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20
1203 (lambda _
1204 (substitute* "setup.py"
1205 (("except NameError")
1206 "except EOFError, NameError"))
1207 #t))
1208 ;; XXX: python setup.py does not build and install bitmsghash,
1209 ;; without it PyBitmessage tries to compile it at first run
1210 ;; in the store, which due to obvious reasons fails. Do it
1211 ;; and place it in /lib.
1212 (add-after 'unpack 'build-and-install-bitmsghash
1213 (lambda* (#:key outputs #:allow-other-keys)
1214 (with-directory-excursion "src/bitmsghash"
1215 (system* "make")
1216 (install-file "bitmsghash.so"
1217 (string-append (assoc-ref outputs "out") "/lib")))
1218 #t)))))
1219 (license license:expat)
1220 (description
1221 "Distributed and trustless peer-to-peer communications protocol
1222 for sending encrypted messages to one person or many subscribers.")
1223 (synopsis "Distributed peer-to-peer communication")
1224 (home-page "https://bitmessage.org/")))
1225
1226 (define-public ytalk
1227 (package
1228 (name "ytalk")
1229 (version "3.3.0")
1230 (source
1231 (origin
1232 (method url-fetch)
1233 (uri (string-append "ftp://ftp.ourproject.org/pub/ytalk/ytalk-"
1234 version ".tar.gz"))
1235 (sha256
1236 (base32
1237 "1d3jhnj8rgzxyxjwfa22vh45qwzjvxw1qh8fz6b7nfkj3zvk9jvf"))))
1238 (build-system gnu-build-system)
1239 (inputs
1240 `(("ncurses" ,ncurses)))
1241 (home-page "https://ytalk.ourproject.org")
1242 (synopsis "Multi-user chat program")
1243 (description "Ytalk is a replacement for the BSD talk program. Its main
1244 advantage is the ability to communicate with any arbitrary number of users at
1245 once. It supports both talk protocols (\"talk\" and \"ntalk\") and can communicate
1246 with several different talk daemons at the same time.")
1247 (license license:gpl2+)))
1248
1249 (define-public gloox
1250 (package
1251 (name "gloox")
1252 (version "1.0.23")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (string-append "https://camaya.net/download/gloox-"
1257 version ".tar.bz2"))
1258 (sha256
1259 (base32 "12jz8glg9zmyk0iyv1ywf5i0hq93dfq8lvn6lyjgy8730w66mjwp"))))
1260 (build-system gnu-build-system)
1261 (inputs
1262 `(("libidn" ,libidn)
1263 ("gnutls" ,gnutls)
1264 ("zlib" ,zlib)))
1265 (native-inputs
1266 `(("pkg-config" ,pkg-config)))
1267 (synopsis "Portable high-level Jabber/XMPP library for C++")
1268 (description
1269 "gloox is a full-featured Jabber/XMPP client library,
1270 written in ANSI C++. It makes writing spec-compliant clients easy
1271 and allows for hassle-free integration of Jabber/XMPP functionality
1272 into existing applications.")
1273 (home-page "https://camaya.net/gloox")
1274 (license license:gpl3)))
1275
1276 (define-public perl-net-psyc
1277 (package
1278 (name "perl-net-psyc")
1279 (version "1.3")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (string-append "http://perlpsyc.psyc.eu/"
1284 "perlpsyc-" version ".zip"))
1285 (file-name (string-append name "-" version ".zip"))
1286 (sha256
1287 (base32
1288 "0vsjclglkwgbyd9m5ad642fyysxw2x725nhq4r2m9pvqaq6s5yf2"))))
1289 (build-system perl-build-system)
1290 (native-inputs
1291 `(("unzip" ,unzip)))
1292 (inputs
1293 `(("perl-curses" ,perl-curses)
1294 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
1295 (arguments
1296 `(#:phases
1297 (modify-phases %standard-phases
1298 (delete 'configure) ; No configure script
1299 ;; There is a Makefile, but it does not install everything
1300 ;; (leaves out psycion) and says
1301 ;; "# Just to give you a rough idea". XXX: Fix it upstream.
1302 (replace 'build
1303 (lambda _ (invoke "make" "manuals")))
1304 (replace 'install
1305 (lambda* (#:key outputs #:allow-other-keys)
1306 (let* ((out (assoc-ref outputs "out"))
1307 (doc (string-append out "/share/doc/perl-net-psyc"))
1308 (man1 (string-append out "/share/man/man1"))
1309 (man3 (string-append out "/share/man/man3"))
1310 (bin (string-append out "/bin"))
1311 (libpsyc (string-append out "/lib/psyc/ion"))
1312 (libperl (string-append out "/lib/perl5/site_perl/"
1313 ,(package-version perl))))
1314
1315 (copy-recursively "lib/perl5" libperl)
1316 (copy-recursively "lib/psycion" libpsyc)
1317 (copy-recursively "bin" bin)
1318 (install-file "cgi/psycpager" (string-append doc "/cgi"))
1319 (copy-recursively "contrib" (string-append doc "/contrib"))
1320 (copy-recursively "hooks" (string-append doc "/hooks"))
1321 (copy-recursively "sdj" (string-append doc "/sdj"))
1322 (install-file "README.txt" doc)
1323 (install-file "TODO.txt" doc)
1324 (copy-recursively "share/man/man1" man1)
1325 (copy-recursively "share/man/man3" man3)
1326 #t)))
1327 (add-after 'install 'wrap-programs
1328 (lambda* (#:key outputs #:allow-other-keys)
1329 ;; Make sure all executables in "bin" find the Perl modules
1330 ;; provided by this package at runtime.
1331 (let* ((out (assoc-ref outputs "out"))
1332 (bin (string-append out "/bin/"))
1333 (path (getenv "PERL5LIB")))
1334 (for-each (lambda (file)
1335 (wrap-program file
1336 `("PERL5LIB" ":" prefix (,path))))
1337 (find-files bin "\\.*$"))
1338 #t))))))
1339 (description
1340 "@code{Net::PSYC} with support for TCP, UDP, Event.pm, @code{IO::Select} and
1341 Gtk2 event loops. This package includes 12 applications and additional scripts:
1342 psycion (a @uref{http://about.psyc.eu,PSYC} chat client), remotor (a control console
1343 for @uref{https://torproject.org,tor} router) and many more.")
1344 (synopsis "Perl implementation of PSYC protocol")
1345 (home-page "http://perlpsyc.psyc.eu/")
1346 (license (list license:gpl2
1347 license:perl-license
1348 ;; contrib/irssi-psyc.pl:
1349 license:public-domain
1350 ;; bin/psycplay states AGPL with no version:
1351 license:agpl3+))))
1352
1353 (define-public libpsyc
1354 (package
1355 (name "libpsyc")
1356 (version "20160913")
1357 (source (origin
1358 (method url-fetch)
1359 (uri (string-append "http://www.psyced.org/files/"
1360 name "-" version ".tar.xz"))
1361 (sha256
1362 (base32
1363 "14q89fxap05ajkfn20rnhc6b1h4i3i2adyr7y6hs5zqwb2lcmc1p"))))
1364 (build-system gnu-build-system)
1365 (native-inputs
1366 `(("perl" ,perl)
1367 ("netcat" ,netcat)
1368 ("procps" ,procps)))
1369 (arguments
1370 `(#:make-flags
1371 (list "CC=gcc"
1372 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1373 #:phases
1374 (modify-phases %standard-phases
1375 ;; The rust bindings are the only ones in use, the lpc bindings
1376 ;; are in psyclpc. The other bindings are not used by anything,
1377 ;; the chances are high that the bindings do not even work,
1378 ;; therefore we do not include them.
1379 ;; TODO: Get a cargo build system in Guix.
1380 (delete 'configure)))) ; no configure script
1381 (home-page "http://about.psyc.eu/libpsyc")
1382 (description
1383 "@code{libpsyc} is a PSYC library in C which implements
1384 core aspects of PSYC, useful for all kinds of clients and servers
1385 including psyced.")
1386 (synopsis "PSYC library in C")
1387 (license license:agpl3+)))
1388
1389 ;; This commit removes the historic bundled pcre and makes psyclpc reproducible.
1390 (define-public psyclpc
1391 (let* ((commit "61cf9aa81297085e5c40170fd01221c752f8deba")
1392 (revision "2"))
1393 (package
1394 (name "psyclpc")
1395 (version (string-append "20160821-" revision "." (string-take commit 7)))
1396 (source (origin
1397 (method git-fetch)
1398 (uri (git-reference
1399 (url "git://git.psyced.org/git/psyclpc")
1400 (commit commit)))
1401 (file-name (string-append name "-" version "-checkout"))
1402 (sha256
1403 (base32
1404 "1viwqymbhn3cwvx0zl58rlzl5gw47zxn0ldg2nbi55ghm5zxl1z5"))))
1405 (build-system gnu-build-system)
1406 (arguments
1407 `(#:tests? #f ; There are no tests/checks.
1408 #:configure-flags
1409 ;; If you have questions about this part, look at
1410 ;; "src/settings/psyced" and the ebuild.
1411 (list
1412 "--enable-use-tls=yes"
1413 "--enable-use-mccp" ; Mud Client Compression Protocol, leave this enabled.
1414 (string-append "--prefix="
1415 (assoc-ref %outputs "out"))
1416 ;; src/Makefile: Set MUD_LIB to the directory which contains
1417 ;; the mud data. defaults to MUD_LIB = @libdir@
1418 (string-append "--libdir="
1419 (assoc-ref %outputs "out")
1420 "/opt/psyced/world")
1421 (string-append "--bindir="
1422 (assoc-ref %outputs "out")
1423 "/opt/psyced/bin")
1424 ;; src/Makefile: Set ERQ_DIR to directory which contains the
1425 ;; stuff which ERQ can execute (hopefully) savely. Was formerly
1426 ;; defined in config.h. defaults to ERQ_DIR= @libexecdir@
1427 (string-append "--libexecdir="
1428 (assoc-ref %outputs "out")
1429 "/opt/psyced/run"))
1430 #:phases
1431 (modify-phases %standard-phases
1432 (add-before 'configure 'chdir-to-src
1433 ;; We need to pass this as env variables
1434 ;; and manually change the directory.
1435 (lambda _
1436 (chdir "src")
1437 (setenv "CONFIG_SHELL" (which "sh"))
1438 (setenv "SHELL" (which "sh"))
1439 #t)))
1440 #:make-flags (list "install-all")))
1441 (inputs
1442 `(("zlib" ,zlib)
1443 ("openssl" ,openssl-1.0)
1444 ("pcre" ,pcre)))
1445 (native-inputs
1446 `(("pkg-config" ,pkg-config)
1447 ("bison" ,bison)
1448 ("gettext" ,gettext-minimal)
1449 ("help2man" ,help2man)
1450 ("autoconf" ,autoconf)
1451 ("automake" ,automake)))
1452 (home-page "http://lpc.psyc.eu/")
1453 (synopsis "psycLPC is a multi-user network server programming language")
1454 (description
1455 "LPC is a bytecode language, invented to specifically implement
1456 multi user virtual environments on the internet. This technology is used for
1457 MUDs and also the psyced implementation of the Protocol for SYnchronous
1458 Conferencing (PSYC). psycLPC is a fork of LDMud with some new features and
1459 many bug fixes.")
1460 (license license:gpl2))))
1461
1462 (define-public loudmouth
1463 (package
1464 (name "loudmouth")
1465 (version "1.5.3")
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (string-append "https://mcabber.com/files/loudmouth/"
1470 name "-" version ".tar.bz2"))
1471 (sha256
1472 (base32
1473 "0b6kd5gpndl9nzis3n6hcl0ldz74bnbiypqgqa1vgb0vrcar8cjl"))))
1474 (build-system gnu-build-system)
1475 (inputs
1476 `(("glib" ,glib)
1477 ("gnutls" ,gnutls)
1478 ("libidn" ,libidn)))
1479 (native-inputs
1480 `(("pkg-config" ,pkg-config)
1481 ("check" ,check)
1482 ("glib" ,glib "bin") ; gtester
1483 ("gtk-doc" ,gtk-doc)))
1484 (home-page "https://mcabber.com/")
1485 (description
1486 "Loudmouth is a lightweight and easy-to-use C library for programming
1487 with the XMPP (formerly known as Jabber) protocol. It is designed to be
1488 easy to get started with and yet extensible to let you do anything the XMPP
1489 protocol allows.")
1490 (synopsis "Asynchronous XMPP library")
1491 ;; The files have LGPL2.0+ headers, but COPYING specifies LGPL2.1.
1492 (license license:lgpl2.0+)))
1493
1494 (define-public mcabber
1495 (package
1496 (name "mcabber")
1497 (version "1.1.0")
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (string-append "https://mcabber.com/files/"
1502 name "-" version ".tar.bz2"))
1503 (sha256
1504 (base32
1505 "1ggh865p1rf10ffsnf4g6qv9i8bls36dxdb1nzs5r9vdqci2rz04"))))
1506 (build-system gnu-build-system)
1507 (arguments
1508 '(#:configure-flags (list "--enable-otr"
1509 "--enable-aspell")))
1510 (inputs
1511 `(("gpgme" ,gpgme)
1512 ("libotr" ,libotr)
1513 ("aspell" ,aspell)
1514 ("libidn" ,libidn)
1515 ("glib" ,glib)
1516 ("ncurses" ,ncurses)
1517 ("loudmouth" ,loudmouth)))
1518 (native-inputs
1519 `(("pkg-config" ,pkg-config)))
1520 (home-page "https://mcabber.com")
1521 (description
1522 "Mcabber is a small XMPP (Jabber) console client, which includes features
1523 such as SASL and TLS support, @dfn{Multi-User Chat} (MUC) support, logging,
1524 command-completion, OpenPGP encryption, @dfn{Off-the-Record Messaging} (OTR)
1525 support, and more.")
1526 (synopsis "Small XMPP console client")
1527 (license license:gpl2+)))
1528
1529 (define-public freetalk
1530 (package
1531 (name "freetalk")
1532 (version "4.1")
1533 (source (origin
1534 (method url-fetch)
1535 (uri (string-append "mirror://gnu/freetalk/freetalk-"
1536 version ".tar.gz"))
1537 (sha256
1538 (base32
1539 "1rmrn7a1bb7vm26yaklrvx008a9qhwc32s57dwrlf40lv9gffwny"))))
1540 (build-system gnu-build-system)
1541 (arguments
1542 `(#:phases
1543 (modify-phases %standard-phases
1544 ;; For 'system' commands in Scheme code.
1545 (add-after 'install 'wrap-program
1546 (lambda* (#:key inputs outputs #:allow-other-keys)
1547 (let* ((out (assoc-ref outputs "out"))
1548 (bash (assoc-ref inputs "bash"))
1549 (coreutils (assoc-ref inputs "coreutils"))
1550 (less (assoc-ref inputs "less")))
1551 (wrap-program (string-append out "/bin/freetalk")
1552 `("PATH" ":" prefix
1553 ,(map (lambda (dir)
1554 (string-append dir "/bin"))
1555 (list bash coreutils less))))
1556 #t))))))
1557 (native-inputs
1558 `(("autoconf" ,autoconf)
1559 ("automake" ,automake)
1560 ("pkg-config" ,pkg-config)
1561 ("texinfo" ,texinfo)))
1562 (inputs
1563 `(("bash" ,bash)
1564 ("glib" ,glib)
1565 ("guile" ,guile-2.0)
1566 ("less" ,less)
1567 ("loudmouth" ,loudmouth)
1568 ("readline" ,readline)))
1569 (synopsis "Extensible console-based Jabber client")
1570 (description
1571 "GNU Freetalk is a command-line Jabber/XMPP chat client. It notably uses
1572 the Readline library to handle input, so it features convenient navigation of
1573 text as well as tab-completion of buddy names, commands and English words. It
1574 is also scriptable and extensible via Guile.")
1575 (home-page "https://www.gnu.org/software/freetalk/")
1576 (license license:gpl3+)))
1577
1578 (define-public libmesode
1579 (package
1580 (name "libmesode")
1581 (version "0.9.3")
1582 (source (origin
1583 (method git-fetch)
1584 (uri (git-reference
1585 (url "https://github.com/boothj5/libmesode.git")
1586 (commit version)))
1587 (file-name (git-file-name name version))
1588 (sha256
1589 (base32
1590 "0xzfg1xx88cn36352nnjlb1p7xyw32yqkhjzq10px88iaaqz1vv0"))))
1591 (build-system gnu-build-system)
1592 (inputs
1593 `(("expat" ,expat)
1594 ("openssl" ,openssl)))
1595 (native-inputs
1596 `(("autoconf" ,autoconf)
1597 ("automake" ,automake)
1598 ("libtool" ,libtool)
1599 ("pkg-config" ,pkg-config)))
1600 (synopsis "C library for writing XMPP clients")
1601 (description "Libmesode is a fork of libstrophe for use with Profanity
1602 XMPP Client. In particular, libmesode provides extra TLS functionality such as
1603 manual SSL certificate verification.")
1604 (home-page "https://github.com/boothj5/libmesode")
1605 ;; Dual-licensed.
1606 (license (list license:gpl3+ license:x11))))
1607
1608 (define-public libstrophe
1609 (package
1610 (name "libstrophe")
1611 (version "0.9.3")
1612 (source
1613 (origin
1614 (method git-fetch)
1615 (uri (git-reference
1616 (url "https://github.com/strophe/libstrophe.git")
1617 (commit version)))
1618 (file-name (git-file-name name version))
1619 (sha256
1620 (base32 "1g1l0w9z9hdy5ncdvd9097gi7k7783did6py5h9camlpb2fnk5mk"))))
1621 (build-system gnu-build-system)
1622 (inputs
1623 `(("expat" ,expat)
1624 ("openssl" ,openssl)))
1625 (native-inputs
1626 `(("autoconf" ,autoconf)
1627 ("automake" ,automake)
1628 ("libtool" ,libtool)
1629 ("pkg-config" ,pkg-config)))
1630 (synopsis "C library for writing XMPP clients")
1631 (description "Libstrophe is a minimal XMPP library written in C. It has
1632 almost no external dependencies, only an XML parsing library (expat or libxml
1633 are both supported).")
1634 (home-page "http://strophe.im/libstrophe")
1635 ;; Dual-licensed.
1636 (license (list license:gpl3+ license:x11))))
1637
1638 (define-public profanity
1639 (package
1640 (name "profanity")
1641 (version "0.8.1")
1642 (source (origin
1643 (method url-fetch)
1644 (uri (string-append "https://profanity-im.github.io/profanity-"
1645 version ".tar.gz"))
1646 (sha256
1647 (base32
1648 "15yrx2ir2bilxpjfaxpjb93yjpvpvcvh5r7wbsjx6kmmy7qg2zvb"))))
1649 (build-system gnu-build-system)
1650 (arguments
1651 '(#:configure-flags
1652 (list "--enable-c-plugins"
1653 "--enable-otr"
1654 "--enable-omemo"
1655 "--enable-pgp"
1656 "--enable-icons"
1657 "--enable-notifications")))
1658 (inputs
1659 `(("curl" ,curl)
1660 ("expat" ,expat)
1661 ("glib" ,glib)
1662 ("gpgme" ,gpgme)
1663 ("libmesode" ,libmesode)
1664 ("libotr" ,libotr)
1665 ("ncurses" ,ncurses)
1666 ("openssl" ,openssl)
1667 ("readline" ,readline)))
1668 (native-inputs
1669 `(("autoconf" ,autoconf)
1670 ("autoconf-archive" ,autoconf-archive)
1671 ("automake" ,automake)
1672 ("cmocka" ,cmocka)
1673 ("gtk+" ,gtk+-2)
1674 ("libnotify" ,libnotify)
1675 ("libtool" ,libtool)
1676 ("libsignal-protocol-c" ,libsignal-protocol-c)
1677 ("pkg-config" ,pkg-config)))
1678 (synopsis "Console-based XMPP client")
1679 (description "Profanity is a console based XMPP client written in C
1680 using ncurses and libmesode, inspired by Irssi.")
1681 (home-page "https://profanity-im.github.io")
1682 (license license:gpl3+)))
1683
1684 (define-public libircclient
1685 (package
1686 (name "libircclient")
1687 (version "1.10")
1688 (source
1689 (origin
1690 (method url-fetch)
1691 (uri (string-append "mirror://sourceforge/libircclient/libircclient/"
1692 version "/libircclient-" version ".tar.gz"))
1693 (sha256
1694 (base32
1695 "0b9wa0h3xc31wpqlvgxgnvqp5wgx3kwsf5s9432m5cj8ycx6zcmv"))))
1696 (build-system gnu-build-system)
1697 (inputs
1698 `(("openssl" ,openssl)))
1699 (arguments
1700 `(#:configure-flags
1701 (list (string-append "--libdir="
1702 (assoc-ref %outputs "out") "/lib")
1703 "--enable-shared"
1704 "--enable-ipv6"
1705 "--enable-openssl")
1706 #:tests? #f)) ; no test suite
1707 (home-page "https://www.ulduzsoft.com/libircclient/")
1708 (synopsis "Library implementing the client IRC protocol")
1709 (description "Libircclient is a library which implements the client IRC
1710 protocol. It is designed to be small, fast, portable and compatible with the
1711 RFC standards as well as non-standard but popular features. It can be used for
1712 building the IRC clients and bots.")
1713 (license license:lgpl3+)))
1714
1715 (define-public toxic
1716 (package
1717 (name "toxic")
1718 (version "0.8.3")
1719 (source
1720 (origin
1721 (method git-fetch)
1722 (uri (git-reference
1723 (url "https://github.com/JFreegman/toxic.git")
1724 (commit (string-append "v" version))))
1725 (sha256
1726 (base32 "09l2j3lwvrq7bf3051vjsnml9w63790ly3iylgf26gkrmld6k31w"))
1727 (file-name (git-file-name name version))))
1728 (build-system gnu-build-system)
1729 (arguments
1730 `(#:tests? #f ; no tests
1731 #:make-flags
1732 (list
1733 "CC=gcc"
1734 (string-append "PREFIX="
1735 (assoc-ref %outputs "out")))
1736 #:phases
1737 (modify-phases %standard-phases
1738 (delete 'configure)
1739 (add-before 'build 'enable-python-scripting
1740 (lambda _
1741 (setenv "ENABLE_PYTHON" "1")
1742 #t)))))
1743 (inputs
1744 `(("c-toxcore" ,c-toxcore)
1745 ("curl" ,curl)
1746 ("freealut" ,freealut)
1747 ("gdk-pixbuf" ,gdk-pixbuf) ; for libnotify.pc
1748 ("libconfig" ,libconfig)
1749 ("libnotify" ,libnotify)
1750 ("libpng" ,libpng)
1751 ("libvpx" ,libvpx)
1752 ("libx11" ,libx11)
1753 ("ncurses" ,ncurses)
1754 ("openal" ,openal)
1755 ("python" ,python)
1756 ("qrencode" ,qrencode)))
1757 (native-inputs
1758 `(("pkg-config" ,pkg-config)))
1759 (home-page "https://github.com/JFreegman/toxic")
1760 (synopsis "Tox chat client using ncurses")
1761 (description "Toxic is a console-based instant messaging client, using
1762 c-toxcore and ncurses. It provides audio calls, sound and desktop
1763 notifications, and Python scripting support.")
1764 (license license:gpl3+)))
1765
1766 (define-public libqmatrixclient
1767 (package
1768 (name "libqmatrixclient")
1769 (version "0.5.2")
1770 (source
1771 (origin
1772 (method git-fetch)
1773 (uri (git-reference
1774 (url "https://github.com/QMatrixClient/libqmatrixclient")
1775 (commit version)))
1776 (file-name (git-file-name name version))
1777 (sha256
1778 (base32 "1bhlqfs7251fss4icx794ka614npr6zyrpp4qwc4q5408ykfm7lr"))))
1779 (build-system cmake-build-system)
1780 (inputs
1781 `(("qtbase" ,qtbase)
1782 ("qtmultimedia" ,qtmultimedia)))
1783 (arguments
1784 `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON")
1785 #:tests? #f)) ; no tests
1786 (home-page "https://matrix.org/docs/projects/sdk/libqmatrixclient.html")
1787 (synopsis "Qt5 client library for the Matrix instant messaging protocol")
1788 (description "libqmatrixclient is a Qt5 library to write clients for the
1789 Matrix instant messaging protocol. Quaternion is the reference client
1790 implementation. Quaternion and libqmatrixclient together form the
1791 QMatrixClient project.")
1792 (license license:lgpl2.1+)))
1793
1794 (define-public mtxclient
1795 (package
1796 (name "mtxclient")
1797 (version "0.2.1")
1798 (source
1799 (origin
1800 (method git-fetch)
1801 (uri (git-reference
1802 (url "https://github.com/Nheko-Reborn/mtxclient.git")
1803 (commit (string-append "v" version))))
1804 (file-name (git-file-name name version))
1805 (sha256
1806 (base32 "0pycznrvj57ff6gbwfn1xj943d2dr4vadl79hii1z16gn0nzxpmj"))))
1807 (arguments
1808 `(#:configure-flags
1809 (list
1810 ;; Disable example binaries (not installed)
1811 "-DBUILD_LIB_EXAMPLES=OFF")
1812 #:phases
1813 (modify-phases %standard-phases
1814 (add-before 'configure 'disable-network-tests
1815 (lambda _
1816 (substitute* "CMakeLists.txt"
1817 (("add_test\\((BasicConnectivity|ClientAPI|MediaAPI|Encryption)")
1818 "# add_test"))
1819 #t))
1820 (add-before 'configure 'set-home
1821 (lambda _
1822 ;; Tries to create package registry file
1823 ;; So, set HOME.
1824 (setenv "HOME" "/tmp")
1825 #t)))))
1826 (build-system cmake-build-system)
1827 (inputs
1828 `(("boost" ,boost)
1829 ("json-modern-cxx" ,json-modern-cxx)
1830 ("libolm" ,libolm)
1831 ("libsodium" ,libsodium)
1832 ("openssl" ,openssl)
1833 ("spdlog" ,spdlog)
1834 ("zlib" ,zlib)))
1835 (native-inputs
1836 `(("googletest" ,googletest)
1837 ("pkg-config" ,pkg-config)))
1838 (home-page "https://github.com/Nheko-Reborn/mtxclient")
1839 (synopsis "Client API library for the Matrix protocol")
1840 (description "@code{mtxclient} is a C++ library that implements client API
1841 for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
1842 (license license:expat)))
1843
1844 (define-public nheko
1845 (package
1846 (name "nheko")
1847 (version "0.6.4")
1848 (source
1849 (origin
1850 (method git-fetch)
1851 (uri (git-reference
1852 (url "https://github.com/Nheko-Reborn/nheko.git")
1853 (commit (string-append "v" version))))
1854 (file-name (git-file-name name version))
1855 (sha256
1856 (base32 "19dkc98l1q4070v6mli4ybqn0ip0za607w39hjf0x8rqdxq45iwm"))))
1857 (arguments
1858 `(#:tests? #f ;no test target
1859 #:configure-flags
1860 (list
1861 "-DCMAKE_BUILD_TYPE=Release"
1862 "-DCMAKE_CXX_FLAGS=-fpermissive")
1863 #:phases
1864 (modify-phases %standard-phases
1865 (add-after 'unpack 'remove-Werror
1866 (lambda _
1867 (substitute* "CMakeLists.txt"
1868 (("-Werror") ""))
1869 #t))
1870 (add-after 'unpack 'fix-determinism
1871 (lambda _
1872 ;; Make Qt deterministic.
1873 (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
1874 #t)))))
1875 (build-system qt-build-system)
1876 (inputs
1877 `(("boost" ,boost)
1878 ("cmark" ,cmark)
1879 ("json-modern-cxx" ,json-modern-cxx)
1880 ("libolm" ,libolm)
1881 ("lmdb" ,lmdb)
1882 ("lmdbxx" ,lmdbxx)
1883 ("mtxclient" ,mtxclient)
1884 ("openssl" ,openssl)
1885 ("qtbase" ,qtbase)
1886 ("qtsvg" ,qtsvg)
1887 ("qtmultimedia" ,qtmultimedia)
1888 ("spdlog" ,spdlog)
1889 ("tweeny" ,tweeny)
1890 ("zlib" ,zlib)))
1891 (native-inputs
1892 `(("pkg-config" ,pkg-config)
1893 ("qtlinguist" ,qttools)))
1894 (home-page "https://github.com/Nheko-Reborn/nheko")
1895 (synopsis "Desktop client for Matrix using Qt and C++14")
1896 (description "@code{Nheko} want to provide a native desktop app for the
1897 Matrix protocol that feels more like a mainstream chat app and less like an IRC
1898 client.
1899
1900 There is support for:
1901 @itemize
1902 @item E2E encryption (text messages only: attachments are currently sent unencrypted).
1903 @item User registration.
1904 @item Creating, joining & leaving rooms.
1905 @item Sending & receiving invites.
1906 @item Sending & receiving files and emoji.
1907 @item Typing notifications.
1908 @item Username auto-completion.
1909 @item Message & mention notifications.
1910 @item Redacting messages.
1911 @item Read receipts.
1912 @item Basic communities support.
1913 @item Room switcher (@key{ctrl-K}).
1914 @item Light, Dark & System themes.
1915 @end itemize")
1916 (license license:gpl3+)))
1917
1918 (define-public quaternion
1919 (package
1920 (name "quaternion")
1921 (version "0.0.9.4c")
1922 (source
1923 (origin
1924 (method git-fetch)
1925 (uri (git-reference
1926 (url "https://github.com/QMatrixClient/Quaternion")
1927 (commit version)))
1928 (file-name (git-file-name name version))
1929 (sha256
1930 (base32 "0gpv6b3nn3lsyym8809kiqkpdszfasldqjpk5s542zyn41gdlql4"))))
1931 (build-system qt-build-system)
1932 (inputs
1933 `(("libqmatrixclient" ,libqmatrixclient)
1934 ("qtbase" ,qtbase)
1935 ("qtdeclarative" ,qtdeclarative)
1936 ("qtmultimedia" ,qtmultimedia)
1937 ("qtquickcontrols" ,qtquickcontrols)
1938 ("qtquickcontrols2" ,qtquickcontrols2)
1939 ("qtsvg" ,qtsvg)
1940 ("qttools" ,qttools)))
1941 (arguments
1942 `(#:tests? #f)) ; no tests
1943 (home-page "https://matrix.org/docs/projects/client/quaternion.html")
1944 (synopsis "Graphical client for the Matrix instant messaging protocol")
1945 (description "Quaternion is a Qt5 desktop client for the Matrix instant
1946 messaging protocol. It uses libqmatrixclient and is its reference client
1947 implementation. Quaternion and libqmatrixclient together form the
1948 QMatrixClient project.")
1949 (license (list license:gpl3+ ; all source code
1950 license:lgpl3+)))) ; icons/breeze
1951
1952 (define-public hangups
1953 (package
1954 (name "hangups")
1955 (version "0.4.10")
1956 (source
1957 (origin
1958 (method url-fetch)
1959 (uri (pypi-uri "hangups" version))
1960 (sha256
1961 (base32 "0ww9z9kcb02pwnr8q1ll31wkzspc1fci1ly8ifrwzxysp4rxy3j5"))))
1962 (build-system python-build-system)
1963 (arguments
1964 `(#:phases
1965 (modify-phases %standard-phases
1966 (add-before 'build 'relax-dependencies
1967 ;; Relax overly strict package version specifications.
1968 (lambda _
1969 (substitute* "setup.py"
1970 (("==") ">="))
1971 #t)))))
1972 (propagated-inputs
1973 `(("python-aiohttp" ,python-aiohttp)
1974 ("python-appdirs" ,python-appdirs)
1975 ("python-async-timeout" ,python-async-timeout)
1976 ("python-configargparse" ,python-configargparse)
1977 ("python-mechanicalsoup" ,python-mechanicalsoup)
1978 ("python-protobuf" ,python-protobuf-3.6)
1979 ("python-readlike" ,python-readlike)
1980 ("python-reparser" ,python-reparser)
1981 ("python-requests" ,python-requests)
1982 ("python-urwid" ,python-urwid)))
1983 (native-inputs
1984 `(("python-httpretty" ,python-httpretty)
1985 ("python-pytest" ,python-pytest)))
1986 (home-page "https://hangups.readthedocs.io/")
1987 (synopsis "Instant messaging client for Google Hangouts")
1988 (description
1989 "Hangups is an instant messaging client for Google Hangouts. It includes
1990 both a Python library and a reference client with a text-based user interface.
1991
1992 Hangups is implements a reverse-engineered version of Hangouts' proprietary,
1993 non-interoperable protocol, which allows it to support features like group
1994 messaging that aren’t available to clients that connect over XMPP.")
1995 (license license:expat)))
1996
1997 (define-public telegram-purple
1998 (package
1999 (name "telegram-purple")
2000 (version "1.4.2")
2001 (home-page "https://github.com/majn/telegram-purple")
2002 (source (origin
2003 (method git-fetch)
2004 (uri (git-reference
2005 (url home-page)
2006 (commit (string-append "v" version))
2007 (recursive? #t)))
2008 (sha256
2009 (base32
2010 "0imbzhhq9qbj6gvkckrnjhls2vvmmy8db7l6gsd7lng2pbfcn522"))
2011 (modules '((guix build utils)))
2012 (snippet
2013 '(begin
2014 (substitute* "Makefile.in"
2015 ;; By default these two directories point to Pidgin's own
2016 ;; prefix.
2017 (("^PLUGIN_DIR_PURPLE=.*")
2018 (string-append
2019 "exec_prefix := @exec_prefix@\n"
2020 "PLUGIN_DIR_PURPLE := @libdir@/purple-2\n"))
2021 (("^DATA_ROOT_DIR_PURPLE=.*")
2022 "DATA_ROOT_DIR_PURPLE := @datarootdir@\n")
2023
2024 ;; Honor sysconfdir instead of trying to write to /etc.
2025 (("DESTDIR\\)/etc/telegram-purple")
2026 "DESTDIR)@sysconfdir@/telegram-purple"))
2027 #t))
2028 (patches (search-patches "telegram-purple-adjust-test.patch"))
2029 (file-name (git-file-name name version))))
2030 (build-system gnu-build-system)
2031 (native-inputs
2032 `(("pkg-config" ,pkg-config)
2033 ("which" ,which)))
2034 (inputs
2035 `(("pidgin" ,pidgin)
2036 ("libgcrypt" ,libgcrypt)
2037 ("libwebp" ,libwebp)
2038 ("glib" ,glib)
2039 ("gettext" ,gnu-gettext)
2040 ("gtk+" ,gtk+-2)
2041 ("zlib" ,zlib)))
2042 (arguments
2043 `(#:phases
2044 (modify-phases %standard-phases
2045 ;; We're using release tag for repository checkout - let's prepare
2046 ;; header defining GIT_COMMIT manually instead of running git to
2047 ;; identify version which is being compiled. Git repository
2048 ;; is removed anyway and only source code is kept.
2049 (add-after 'unpack 'prepare-commit.h
2050 (lambda _
2051 (with-output-to-file "./commit.h"
2052 (lambda ()
2053 (display
2054 (string-append "//generated by guix, use version instead of "
2055 "commit\n"
2056 "#ifndef GIT_COMMIT\n"
2057 "# define GIT_COMMIT \"v"
2058 ,version "\"\n"
2059 "#endif\n"))))
2060 #t))
2061 (add-before 'configure 'set-SHELL-variables
2062 ;; Set these environment variables so that 'tgl/configure' uses the
2063 ;; right shell and not /bin/sh.
2064 (lambda _
2065 (let ((bash (which "bash")))
2066 (setenv "SHELL" bash)
2067 (setenv "CONFIG_SHELL" bash)
2068 #t))))))
2069 (synopsis "Telegram messaging support for Pidgin")
2070 (description
2071 "Telegram-purple is a plugin for Libpurple, the communication library
2072 used by the Pidgin instant messaging client, that adds support for the
2073 Telegram messenger.")
2074
2075 ;; Code under tgl/ (the Telegram library) is LGPLv2.1+, but the plugin
2076 ;; itself is GPLv2+.
2077 (license license:gpl2+)))
2078
2079 (define-public tdlib
2080 (let ((commit "278c7acdec83c5ac17d8e1ed0bb2cacbcea62460")
2081 (revision "0")
2082 (version "1.6.0"))
2083 (package
2084 (name "tdlib")
2085 (version (git-version version revision commit))
2086 (source (origin
2087 (method git-fetch)
2088 (uri (git-reference
2089 (url "https://github.com/tdlib/td.git")
2090 (commit commit)))
2091 (sha256
2092 (base32
2093 "0zlzpl6fgszg18kwycyyyrnkm255dvc6fkq0b0y32m5wvwwl36cv"))
2094 (file-name (git-file-name name version))))
2095 (build-system cmake-build-system)
2096 (arguments
2097 `(#:tests? #t
2098 #:configure-flags
2099 (list "-DCMAKE_BUILD_TYPE=Release"
2100 "-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
2101 #:phases
2102 (modify-phases %standard-phases
2103 (add-after 'unpack 'remove-failing-tests
2104 (lambda _
2105 (substitute* "test/CMakeLists.txt"
2106 ;; The test cases are compiled into a distinct binary
2107 ;; which uses mtproto.cpp to attempt to connect to
2108 ;; a remote server. Removing this file from the sources
2109 ;; list disables those specific test cases.
2110 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/mtproto.cpp") ""))
2111 #t)))))
2112 (native-inputs
2113 `(("gperf" ,gperf)
2114 ("openssl" ,openssl)
2115 ("zlib" ,zlib)
2116 ("php" ,php)
2117 ("doxygen" ,doxygen)))
2118 (synopsis "Cross-platform library for building Telegram clients")
2119 (description "Tdlib is a cross-platform library for creating custom
2120 Telegram clients following the official Telegram API. It can be easily used
2121 from almost any programming language with a C-FFI and features first-class
2122 support for high performance Telegram Bot creation.")
2123 (home-page "https://core.telegram.org/tdlib")
2124 (license license:boost1.0))))
2125
2126 ;;; messaging.scm ends here