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