gnu: python-babel: Update to 2.7.0.
[guix.git] / gnu / packages / messaging.scm
blob7d036ad4735d458a76030e0d4ba913df925c098b
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 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 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 ;;;
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/>.
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))
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))))
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+)))
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              (apply invoke "make" "install-etc" make-flags)))
190          (add-after 'install-etc 'install-lib
191            (lambda* (#:key (make-flags '()) #:allow-other-keys)
192              (apply invoke "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              (invoke "./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))))
211 (define-public bitlbee-discord
212   (package
213     (name "bitlbee-discord")
214     (version "0.4.2")
215     (source
216      (origin
217        (method git-fetch)
218        (uri (git-reference
219              (url "https://github.com/sm00th/bitlbee-discord.git")
220              (commit version)))
221        (file-name (git-file-name name version))
222        (sha256
223         (base32 "02pigk2vbz0jdz11f96sygdvp1j762yjn62h124fkcsc070g7a2f"))))
224     (build-system gnu-build-system)
225     (arguments
226      `(#:phases
227        (modify-phases %standard-phases
228          (add-after 'unpack 'patch-autogen
229            (lambda _
230              (let ((sh (which "sh")))
231                (substitute* "autogen.sh" (("/bin/sh") sh))
232                (setenv "CONFIG_SHELL" sh))
233              #t))
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+)))
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)
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+)))
306 (define-public ngircd
307   (package
308     (name "ngircd")
309     (version "25")
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                 "0kpf5qi98m9f833r4rx9n6h9p31biwk798jwc1mgzmix7sp7r6f4"))
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+)))
371 (define-public pidgin
372   (package
373     (name "pidgin")
374     (version "2.13.0")
375     (source
376      (origin
377        (method url-fetch)
378        (uri (string-append "mirror://sourceforge/pidgin/Pidgin/"
379                            version "/pidgin-" version ".tar.bz2"))
380        (sha256
381         (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7"))
382        (patches (search-patches "pidgin-add-search-path.patch"))))
383     (build-system glib-or-gtk-build-system)
384     (native-inputs
385      `(("pkg-config" ,pkg-config)
386        ("check" ,check)
387        ("intltool" ,intltool)
388        ("gconf" ,gconf)
389        ("python" ,python-2)
390        ("doxygen" ,doxygen)))
391     (inputs
392      `(("gtk+" ,gtk+-2)
393        ("libgcrypt" ,libgcrypt)
394        ("gnutls" ,gnutls)
395        ("cyrus-sasl" ,cyrus-sasl)
396        ("dbus" ,dbus)
397        ("dbus-glib" ,dbus-glib)
398        ("python2-dbus" ,python2-dbus)
399        ("libidn" ,libidn)
400        ("libltdl" ,libltdl)
401        ("libxml2" ,libxml2)
402        ;; TODO: gstreamer: patches needed to support gstreamer-1.0 or later
403        ;; TODO: farstream
404        ;; TODO: meanwhile
405        ;; TODO: gtkspell
406        ;; TODO: libxephyr
407        ;; TODO: libgadu
408        ("libxslt" ,libxslt)
409        ("avahi" ,avahi)
410        ("ncurses" ,ncurses)
411        ("network-manager" ,network-manager)
412        ("sqlite" ,sqlite)
413        ("libice" ,libice)
414        ("libsm" ,libsm)
415        ("libxscrnsaver" ,libxscrnsaver)
416        ("startup-notification" ,startup-notification)))
417     (arguments
418      `(#:configure-flags
419        (list "--disable-gtkspell"
420              "--disable-tcl"
421              "--disable-meanwhile"
422              "--disable-vv"  ; XXX remove when we have farstream and gstreamer
423              "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0
424              "--enable-cyrus-sasl"
425              (string-append "--with-ncurses-headers="
426                             (assoc-ref %build-inputs "ncurses")
427                             "/include"))))
428     (native-search-paths
429      (list (search-path-specification
430             (variable "PURPLE_PLUGIN_PATH")
431             (files (list (string-append "lib/purple-"
432                                         (version-major version))
433                          "lib/pidgin")))))
434     (home-page "https://www.pidgin.im/")
435     (synopsis "Graphical multi-protocol instant messaging client")
436     (description
437      "Pidgin is a modular instant messaging client that supports many popular
438 chat protocols.")
439     (license
440      (list
441       license:gpl2+    ; Most of the code
442       license:lgpl2.1  ; GG protocol plugin (libpurple/protocols/gg/lib)
443       license:lgpl2.0+ ; OSCAR protocol plugin (libpurple/protocols/oscar)
444       ;; The following licenses cover the zephyr protocol plugin:
445       (license:non-copyleft
446        "file://libpurple/protocols/zephyr/mit-copyright.h"
447        "See libpurple/protocols/zephyr/mit-copyright.h in the distribution.")
448       (license:non-copyleft
449        "file://libpurple/protocols/zephyr/mit-sipb-copyright.h"
450        "See libpurple/protocols/zephyr/mit-sipb-copyright.h in the distribution.")))))
452 (define-public pidgin-otr
453   (package
454     (name "pidgin-otr")
455     (version "4.0.2")
456     (source (origin
457               (method url-fetch)
458               (uri (string-append "https://otr.cypherpunks.ca/"
459                                   name "-" version ".tar.gz"))
460               (sha256
461                (base32
462                 "1i5s9rrgbyss9rszq6c6y53hwqyw1k86s40cpsfx5ccl9bprxdgl"))))
463     (build-system gnu-build-system)
464     (native-inputs
465      `(("pkg-config" ,pkg-config)
466        ("intltool" ,intltool)))
467     (inputs
468      `(("pidgin" ,pidgin)
469        ("libotr" ,libotr)
470        ("libgpg-error" ,libgpg-error)
471        ("libgcrypt" ,libgcrypt)
472        ("glib" ,glib)
473        ("gtk+" ,gtk+-2)))
474     (home-page "https://otr.cypherpunks.ca/")
475     (synopsis "Off-the-Record Messaging plugin for Pidgin")
476     (description
477      "Pidgin-OTR is a plugin that adds support for OTR to the Pidgin instant
478 messaging client.  OTR (Off-the-Record) Messaging allows you to have private
479 conversations over instant messaging by providing: (1) Encryption: No one else
480 can read your instant messages.  (2) Authentication: You are assured the
481 correspondent is who you think it is.  (3) Deniability: The messages you send
482 do not have digital signatures that are checkable by a third party.  Anyone
483 can forge messages after a conversation to make them look like they came from
484 you.  However, during a conversation, your correspondent is assured the
485 messages he sees are authentic and unmodified.  (4) Perfect forward secrecy:
486 If you lose control of your private keys, no previous conversation is
487 compromised.")
488     (license license:gpl2)))
490 (define-public znc
491   (package
492     (name "znc")
493     (version "1.7.3")
494     (source (origin
495               (method url-fetch)
496               (uri (string-append "http://znc.in/releases/archive/znc-"
497                                   version ".tar.gz"))
498               (sha256
499                (base32
500                 "0g8i5hsl4kinpz1wp0a2zniidv3w2sd6awq8676fds516wcc6k0y"))))
501     ;; TODO: autotools support has been deprecated, and new features like i18n
502     ;; are only supported when building with cmake.
503     (build-system gnu-build-system)
504     (arguments
505      `(#:phases
506        (modify-phases %standard-phases
507          (add-after 'unpack 'unpack-googletest
508            (lambda* (#:key inputs #:allow-other-keys)
509              (mkdir-p "googletest")
510              (copy-recursively (assoc-ref inputs "googletest-source")
511                                "googletest")
512              #t)))
513        #:configure-flags '("--enable-python"
514                            "--enable-perl"
515                            "--enable-cyrus"
516                            "--with-gmock=googletest/googlemock"
517                            "--with-gtest=googletest/googletest")
518        #:test-target "test"))
519     (native-inputs
520      `(("googletest-source"
521         ;; ZNC 1.7 needs a newer, unreleased googletest (a release is planned
522         ;; <https://github.com/google/googletest/issues/1583>, so don't update
523         ;; the public GOOGLETEST to an unstable version).  The commit is taken
524         ;; from ‘third_party/googletest’ in the ZNC git repository.
525         ,(let ((commit "9737e63c69e94ac5777caa0bc77c77d5206467f3"))
526            (origin
527              (method git-fetch)
528              (uri (git-reference
529                    (url "https://github.com/google/googletest")
530                    (commit commit)))
531              (file-name (git-file-name "googletest-for-znc" commit))
532              (sha256
533               (base32
534                "0ya36n8d62zbxk6p22yffgx43mqhx2fz41gqqwbpdshjryf3wvxj")))))
535        ("pkg-config" ,pkg-config)
536        ("perl" ,perl)
537        ("python" ,python)))
538     (inputs
539      `(("openssl" ,openssl)
540        ("zlib" ,zlib)
541        ("icu4c" ,icu4c)
542        ("cyrus-sasl" ,cyrus-sasl)))
543     (home-page "https://znc.in")
544     (synopsis "IRC network bouncer")
545     (description "ZNC is an @dfn{IRC network bouncer} or @dfn{BNC}.  It can
546 detach the client from the actual IRC server, and also from selected channels.
547 Multiple clients from different locations can connect to a single ZNC account
548 simultaneously and therefore appear under the same nickname on IRC.")
549     (license license:asl2.0)))
551 (define-public python-nbxmpp
552   (package
553     (name "python-nbxmpp")
554     (version "0.6.10")
555     (source
556      (origin
557        (method url-fetch)
558        (uri (pypi-uri "nbxmpp" version))
559        (sha256
560         (base32
561          "1vq89nhamciblyi5579bppnm4sb0zk5cg5hdipfpz174fxvl2wyd"))))
562     (build-system python-build-system)
563     (arguments
564      `(#:tests? #f))                    ; no tests
565     (home-page "https://dev.gajim.org/gajim/python-nbxmpp")
566     (synopsis "Non-blocking Jabber/XMPP module")
567     (description
568      "The goal of this python library is to provide a way for Python
569 applications to use Jabber/XMPP networks in a non-blocking way.  This library
570 was initially a fork of xmpppy, but uses non-blocking sockets.")
571     (license license:gpl3+)))
573 (define-public python2-nbxmpp
574   (package-with-python2 python-nbxmpp))
576 (define-public gajim
577   (package
578     (name "gajim")
579     (version "1.1.3")
580     (source (origin
581               (method url-fetch)
582               (uri (string-append "https://gajim.org/downloads/"
583                                   (version-major+minor version)
584                                   "/gajim-" version ".tar.bz2"))
585               (sha256
586                (base32
587                 "0bzxwcpdd4ydh6d6mzpr0gxwhcb0x9ympk55fpvm1hcw9d28a716"))))
588     (build-system python-build-system)
589     (arguments
590      `(#:phases
591        (modify-phases %standard-phases
592          (add-after 'unpack 'add-plugin-dirs
593            (lambda _
594              (substitute* "gajim/common/configpaths.py"
595                (("_paths\\['PLUGINS_USER'\\]\\]")
596                 "_paths['PLUGINS_USER']] + \
597 ([os.getenv('GAJIM_PLUGIN_PATH')] \
598 if os.getenv('GAJIM_PLUGIN_PATH') \
599 and Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() \
600 else [])"))
601              #t))
602          (replace 'check
603            (lambda _
604              (invoke "python" "./setup.py" "test" "-s" "test.no_gui")))
605          (add-after 'install 'wrap-gi-typelib-path
606            (lambda* (#:key outputs #:allow-other-keys)
607              (let ((out (assoc-ref outputs "out")))
608                (for-each
609                 (lambda (name)
610                   (let ((file (string-append out "/bin/" name))
611                         (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
612                     (wrap-program file
613                       `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))
614                 '("gajim" "gajim-remote" "gajim-history-manager")))
615              #t))
616          (add-after 'install 'install-icons
617            (lambda* (#:key inputs outputs #:allow-other-keys)
618              (let* ((out (assoc-ref outputs "out"))
619                     (adwaita (string-append
620                               (assoc-ref inputs "adwaita-icon-theme")
621                               "/share/icons/Adwaita"))
622                     (hicolor (string-append
623                               (assoc-ref inputs "hicolor-icon-theme")
624                               "/share/icons/hicolor"))
625                     (icons (string-append
626                             out "/lib/python"
627                             ,(version-major+minor (package-version python))
628                             "/site-packages/gajim/data/icons")))
629                (with-directory-excursion icons
630                  (symlink adwaita "Adwaita")
631                  (copy-recursively hicolor "hicolor")))
632              #t))
633          (add-after 'install-icons 'wrap-gsettings-schema-dir
634            (lambda* (#:key inputs outputs #:allow-other-keys)
635              (wrap-program (string-append (assoc-ref outputs "out")
636                                           "/bin/gajim")
637                ;; For GtkFileChooserDialog.
638                `("GSETTINGS_SCHEMA_DIR" =
639                  (,(string-append (assoc-ref inputs "gtk+")
640                                   "/share/glib-2.0/schemas"))))
641              #t)))))
642     (native-search-paths
643      (list (search-path-specification
644             (variable "GAJIM_PLUGIN_PATH")
645             (separator #f)              ;single entry
646             (files '("share/gajim/plugins")))
647            ;; Gajim needs to use the propagated inputs of its plugins.
648            (search-path-specification
649             (variable "PYTHONPATH")
650             (files (list (string-append
651                           "lib/python"
652                           (version-major+minor (package-version python))
653                           "/site-packages"))))))
654     (native-inputs
655      `(("intltool" ,intltool)
656        ("python-docutils" ,python-docutils)
657        ("xorg-server" ,xorg-server)))
658     (inputs
659      `(("adwaita-icon-theme" ,adwaita-icon-theme)
660        ("gnome-keyring" ,gnome-keyring)
661        ("gtk+" ,gtk+)
662        ("gtkspell3" ,gtkspell3)
663        ("hicolor-icon-theme" ,hicolor-icon-theme)
664        ("libsecret" ,libsecret)
665        ("python-cssutils" ,python-cssutils)
666        ("python-dbus" ,python-dbus)
667        ("python-gnupg" ,python-gnupg)
668        ("python-keyring" ,python-keyring)
669        ("python-nbxmpp" ,python-nbxmpp)
670        ("python-pillow" ,python-pillow)
671        ("python-precis-i18n" ,python-precis-i18n)
672        ("python-pycairo" ,python-pycairo)
673        ("python-pygobject" ,python-pygobject)
674        ("python-pyopenssl" ,python-pyopenssl)
675        ("python-qrcode" ,python-qrcode)))
676     (home-page "https://gajim.org/")
677     (synopsis "Jabber (XMPP) client")
678     (description "Gajim is a feature-rich and easy to use Jabber/XMPP client.
679 Among its features are: a tabbed chat window and single window modes; support
680 for group chat (with Multi-User Chat protocol), invitation, chat to group chat
681 transformation; audio and video conferences; file transfer; TLS, GPG and
682 end-to-end encryption support; XML console.")
683     (license license:gpl3)))
685 (define-public gajim-omemo
686   (package
687     (name "gajim-omemo")
688     (version "2.6.29")
689     (source (origin
690               (method url-fetch/zipbomb)
691               (uri (string-append
692                     "https://ftp.gajim.org/plugins_releases/omemo_"
693                     version ".zip"))
694               (sha256
695                (base32
696                 "1mif5qkrvxclqbqmq6njini4laznbs5nn82w2f1hkl8c1284dvgi"))))
697     (build-system trivial-build-system)
698     (arguments
699      `(#:modules ((guix build utils))
700        #:builder
701        (begin
702          (use-modules (guix build utils))
703          (let* ((out (assoc-ref %outputs "out"))
704                 (share (in-vicinity out "share/gajim/plugins"))
705                 (source (assoc-ref %build-inputs "source")))
706            (mkdir-p share)
707            (copy-recursively source share)
708            #t))))
709     (propagated-inputs
710      `(("python-axolotl" ,python-axolotl)))
711     (home-page
712      "https://dev.gajim.org/gajim/gajim-plugins/wikis/OmemoGajimPlugin")
713     (synopsis "Gajim OMEMO plugin")
714     (description
715      "This package provides the Gajim OMEMO plugin.  OMEMO is an XMPP
716 Extension Protocol (XEP) for secure multi-client end-to-end encryption based
717 on Axolotl and PEP.")
718     (license license:gpl3+)))
720 (define-public dino
721   ;; The only release tarball is for version 0.0, but it is very old and fails
722   ;; to build.
723   (let ((commit "8e14ac6d714b7f88e16de31a6c795e811dc27417")
724         (revision "4"))
725     (package
726       (name "dino")
727       (version (git-version "0.0" revision commit))
728       (source (origin
729                 (method git-fetch)
730                 (uri (git-reference
731                       (url "https://github.com/dino/dino.git")
732                       (commit commit)))
733                 (file-name (git-file-name name version))
734                 (sha256
735                  (base32
736                   "0xfmwnc2f8lsvmp7m8ggikzqjaw5z6wmxrv6j5ljha5ckffrdd9m"))))
737       (build-system cmake-build-system)
738       (arguments
739        `(#:tests? #f ; there are no tests
740          #:parallel-build? #f ; not supported
741          ; Use our libsignal-protocol-c instead of the git submodule.
742          #:configure-flags '("-DSHARED_SIGNAL_PROTOCOL=yes")
743          #:modules ((guix build cmake-build-system)
744                     ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
745                     (guix build utils))
746          #:imported-modules (,@%gnu-build-system-modules
747                              (guix build cmake-build-system)
748                              (guix build glib-or-gtk-build-system))
749          #:phases
750          (modify-phases %standard-phases
751            ;; The signal-protocol plugin accesses internal headers of
752            ;; libsignal-protocol-c, so we need to put the sources there.
753            (add-after 'unpack 'unpack-sources
754              (lambda* (#:key inputs #:allow-other-keys)
755                (with-directory-excursion "plugins/signal-protocol/libsignal-protocol-c"
756                  (invoke "tar" "xvf"
757                          (assoc-ref inputs "libsignal-protocol-c-source")
758                          "--strip-components=1"))))
759            (add-after 'install 'glib-or-gtk-wrap
760              (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
761       (inputs
762        `(("libgee" ,libgee)
763          ("libsignal-protocol-c" ,libsignal-protocol-c)
764          ("libgcrypt" ,libgcrypt)
765          ("libsoup" ,libsoup)
766          ("qrencode" ,qrencode)
767          ("sqlite" ,sqlite-with-column-metadata)
768          ("gpgme" ,gpgme)
769          ("gtk+" ,gtk+)
770          ("glib-networking" ,glib-networking)
771          ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
772       (native-inputs
773        `(("pkg-config" ,pkg-config)
774          ("libsignal-protocol-c-source" ,(package-source libsignal-protocol-c))
775          ("glib" ,glib "bin")
776          ("vala" ,vala)
777          ("gettext" ,gettext-minimal)))
778       (home-page "https://dino.im")
779       (synopsis "Graphical Jabber (XMPP) client")
780       (description "Dino is a Jabber (XMPP) client which aims to fit well into
781 a graphical desktop environment like GNOME.")
782       (license license:gpl3+))))
784 (define-public prosody
785   (package
786     (name "prosody")
787     (version "0.11.2")
788     (source (origin
789               (method url-fetch)
790               (uri (string-append "https://prosody.im/downloads/source/"
791                                   "prosody-" version ".tar.gz"))
792               (sha256
793                (base32
794                 "0ca8ivqb4hxqka08pwnaqi1bqxrdl8zw47g6z7nw9q5r57fgc4c9"))))
795     (build-system gnu-build-system)
796     (arguments
797      `(#:tests? #f                      ;tests require "busted"
798        #:configure-flags (list "--no-example-certs")
799        #:modules ((ice-9 match)
800                   (srfi srfi-1)
801                   (guix build gnu-build-system)
802                   (guix build utils))
803        #:phases
804        (modify-phases %standard-phases
805          (add-after 'unpack 'fix-configure-script
806            (lambda _
807              ;; The configure script aborts when it encounters unexpected
808              ;; arguments.  Make it more tolerant.
809              (substitute* "configure"
810                (("exit 1") ""))
811              #t))
812          (add-after 'unpack 'fix-makefile
813            (lambda _
814              (substitute* "GNUmakefile"
815                ;; prosodyctl needs to read the configuration file.
816                (("^INSTALLEDCONFIG =.*") "INSTALLEDCONFIG = /etc/prosody\n")
817                ;; prosodyctl needs a place to put auto-generated certificates.
818                (("^INSTALLEDDATA =.*") "INSTALLEDDATA = /var/lib/prosody\n"))
819              #t))
820          (add-after 'install 'wrap-programs
821            (lambda* (#:key inputs outputs #:allow-other-keys)
822              ;; Make sure all executables in "bin" find the required Lua
823              ;; modules at runtime.
824              (let* ((out   (assoc-ref outputs "out"))
825                     (bin   (string-append out "/bin/"))
826                     (deps  (delete #f (map (match-lambda
827                                              ((label . directory)
828                                               (if (string-prefix? "lua" label)
829                                                   directory #f)))
830                                            inputs)))
831                     (lua-path (string-join
832                                (map (lambda (path)
833                                       (string-append
834                                        path "/share/lua/5.2/?.lua;"
835                                        path "/share/lua/5.2/?/?.lua"))
836                                     (cons out deps))
837                                ";"))
838                     (lua-cpath (string-join
839                                 (map (lambda (path)
840                                        (string-append
841                                         path "/lib/lua/5.2/?.so;"
842                                         path "/lib/lua/5.2/?/?.so"))
843                                      (cons out deps))
844                                 ";"))
845                     (openssl (assoc-ref inputs "openssl"))
846                     (coreutils (assoc-ref inputs "coreutils"))
847                     (path (map (lambda (dir)
848                                  (string-append dir "/bin"))
849                                (list openssl coreutils))))
850                (for-each (lambda (file)
851                            (wrap-program file
852                              `("LUA_PATH"  ";" = (,lua-path))
853                              `("LUA_CPATH" ";" = (,lua-cpath))
854                              `("PATH" ":" prefix ,path)))
855                          (find-files bin ".*"))
856                #t))))))
857     (inputs
858      `(("libidn" ,libidn)
859        ("openssl" ,openssl)
860        ("lua" ,lua-5.2)
861        ("lua5.2-bitop" ,lua5.2-bitop)
862        ("lua5.2-expat" ,lua5.2-expat)
863        ("lua5.2-socket" ,lua5.2-socket)
864        ("lua5.2-filesystem" ,lua5.2-filesystem)
865        ("lua5.2-sec" ,lua5.2-sec)))
866     (home-page "https://prosody.im/")
867     (synopsis "Jabber (XMPP) server")
868     (description "Prosody is a modern XMPP communication server.  It aims to
869 be easy to set up and configure, and efficient with system resources.
870 Additionally, for developers it aims to be easy to extend and give a flexible
871 system on which to rapidly develop added functionality, or prototype new
872 protocols.")
873     (license license:x11)))
875 (define-public prosody-http-upload
876   (let ((changeset "765735bb590b")
877         (revision "1"))
878     (package
879       (name "prosody-http-upload")
880       (version (string-append "0-" revision "." (string-take changeset 7)))
881       (source (origin
882                 (method hg-fetch)
883                 (uri (hg-reference
884                       (url "https://hg.prosody.im/prosody-modules/")
885                       (changeset changeset)))
886                 (file-name (string-append name "-" version "-checkout"))
887                 (sha256
888                  (base32
889                   "142wrcism70nf8ffahhd961cqg2pi1h7ic8adfs3zwh0j3pnf41f"))))
890       (build-system trivial-build-system)
891       (arguments
892        '(#:modules ((guix build utils))
893          #:builder
894          (begin
895            (use-modules (guix build utils))
896            (let ((out (assoc-ref %outputs "out"))
897                  (source (assoc-ref %build-inputs "source")))
898              (with-directory-excursion (in-vicinity source "mod_http_upload")
899                (install-file "mod_http_upload.lua" out))
900              #t))))
901       (home-page "https://modules.prosody.im/mod_http_upload.html")
902       (synopsis "XEP-0363: Allow clients to upload files over HTTP")
903       (description "This module implements XEP-0363: it allows clients to
904 upload files over HTTP.")
905       (license (package-license prosody)))))
907 (define-public prosody-smacks
908   (let ((changeset "67f1d1f22625")
909         (revision "1"))
910     (package
911       (name "prosody-smacks")
912       (version (string-append "0-" revision "." (string-take changeset 7)))
913       (source (origin
914                 (method hg-fetch)
915                 (uri (hg-reference
916                       (url "https://hg.prosody.im/prosody-modules/")
917                       (changeset changeset)))
918                 (file-name (string-append name "-" version "-checkout"))
919                 (sha256
920                  (base32
921                   "020ngpax30fgarah98yvlj0ni8rcdwq60if03a9hqdw8mic0nxxs"))))
922       (build-system trivial-build-system)
923       (arguments
924        '(#:modules ((guix build utils))
925          #:builder
926          (begin
927            (use-modules (guix build utils))
928            (let ((out (assoc-ref %outputs "out"))
929                  (source (assoc-ref %build-inputs "source")))
930              (with-directory-excursion (in-vicinity source "mod_smacks")
931                (install-file "mod_smacks.lua" out))
932              #t))))
933       (home-page "https://modules.prosody.im/mod_smacks.html")
934       (synopsis "XEP-0198: Reliability and fast reconnects for XMPP")
935       (description "This module implements XEP-0198: when supported by both
936 the client and server, it can allow clients to resume a disconnected session,
937 and prevent message loss.")
938       (license (package-license prosody)))))
940 (define-public libtoxcore
941   (let ((revision "2")
942         (commit "bf69b54f64003d160d759068f4816b2d9b2e1e21"))
943     (package
944       (name "libtoxcore")
945       (version (string-append "0.0.0" "-"
946                               revision "."(string-take commit 7)))
947       (source (origin
948                 (method git-fetch)
949                 (uri (git-reference
950                       (url "https://github.com/irungentoo/toxcore.git")
951                       (commit commit)))
952                 (file-name (string-append name "-" version "-checkout"))
953                 (sha256
954                  (base32
955                   "11lqra4yd7v293cp286ynff5lqz1pprzg8vn3wq6vryj08g88zqb"))))
956       (build-system gnu-build-system)
957       (arguments `(#:tests? #f)) ; FIXME: tests hang, some fail.
958       (native-inputs
959        `(("autoconf" ,autoconf)
960          ("automake" ,automake)
961          ("libtool" ,libtool)
962          ("check" ,check)
963          ("pkg-config" ,pkg-config)))
964       (inputs
965        `(("libsodium" ,libsodium)
966          ("opus" ,opus)
967          ("libvpx" ,libvpx)))
968       (synopsis "Library for the Tox encrypted messenger protocol")
969       (description
970        "C library implementation of the Tox encrypted messenger protocol.")
971       (license license:gpl3+)
972       (home-page "https://tox.chat"))))
974 ;; Some tox clients move to c-toxcore, which seems to be where all the
975 ;; recent development happens. It is run by the same developers as toxcore,
976 ;; forked into a group namespace.
977 (define-public c-toxcore
978   (package
979     (name "c-toxcore")
980     (version "0.2.9")
981     (source
982      (origin
983        (method git-fetch)
984        (uri (git-reference
985              (url "https://github.com/TokTok/c-toxcore.git")
986              (commit (string-append "v" version))))
987        (file-name (git-file-name name version))
988        (sha256
989         (base32
990          "0aljr9hqybla6p61af6fdkv0x8gph7c2wacqqa9hq2z9w0p4fs5j"))))
991     (arguments
992      `(#:tests? #f)) ; FIXME: Testsuite seems to stay stuck on test 3. Disable
993                      ; for now.
994     (build-system cmake-build-system)
995     (native-inputs
996      `(("pkg-config" ,pkg-config)))
997     (propagated-inputs
998      `(("libsodium" ,libsodium)
999        ("opus" ,opus)
1000        ("libvpx" ,libvpx)))
1001     (home-page "https://tox.chat")
1002     (synopsis "Library for the Tox encrypted messenger protocol")
1003     (description
1004      "Official fork of the C library implementation of the Tox encrypted
1005 messenger protocol.")
1006     (license license:gpl3+)))
1008 (define-public utox
1009   (package
1010    (name "utox")
1011    (version "0.17.0")
1012    (source
1013     (origin
1014      (method git-fetch)
1015      (uri (git-reference
1016            (url "https://github.com/uTox/uTox.git")
1017            (commit "v0.17.0")
1018            (recursive? #t))) ;; Needed for 'minini' git submodule.
1019      (file-name (string-append name "-" version "-checkout"))
1020      (sha256
1021       (base32
1022        "12wbq883il7ikldayh8hm0cjfrkp45vn05xx9s1jbfz6gmkidyar"))))
1023    (build-system cmake-build-system)
1024    (arguments
1025     `(#:configure-flags '("-DENABLE_TESTS=on")
1026       #:phases
1027       (modify-phases %standard-phases
1028         (add-before 'build 'patch-absolute-filename-libgtk-3
1029           (lambda* (#:key inputs outputs #:allow-other-keys)
1030             (substitute* "../source/src/xlib/gtk.c"
1031                          (("libgtk-3.so")
1032                          (string-append (assoc-ref inputs "gtk+")
1033                                         "/lib/libgtk-3.so")))))
1034         (add-after 'install 'wrap-program
1035           (lambda* (#:key inputs outputs #:allow-other-keys)
1036             (wrap-program (string-append (assoc-ref outputs "out")
1037                                          "/bin/utox")
1038             ;; For GtkFileChooserDialog.
1039             `("GSETTINGS_SCHEMA_DIR" =
1040               (,(string-append (assoc-ref inputs "gtk+")
1041                                "/share/glib-2.0/schemas")))))))))
1042    (inputs
1043     `(("dbus" ,dbus)
1044       ("filteraudio" ,filteraudio)
1045       ("fontconfig" ,fontconfig)
1046       ("freetype" ,freetype)
1047       ("libsodium" ,libsodium)
1048       ("c-toxcore" ,c-toxcore)
1049       ("gtk+" ,gtk+)
1050       ("libvpx" ,libvpx)
1051       ("libx11" ,libx11)
1052       ("libxext" ,libxext)
1053       ("libxrender" ,libxrender)
1054       ("openal" ,openal)
1055       ("v4l-utils" ,v4l-utils)))
1056    (native-inputs
1057     `(("check" ,check)
1058       ("pkg-config" ,pkg-config)))
1059    (synopsis "Lightweight Tox client")
1060    (description
1061     "Utox is a lightweight Tox client.  Tox is a distributed and secure
1062 instant messenger with audio and video chat capabilities.")
1063    (home-page "http://utox.org/")
1064    (license license:gpl3)))
1066 (define-public qtox
1067   (package
1068     (name "qtox")
1069     (version "1.16.3")
1070     (source (origin
1071               (method url-fetch)
1072               (uri (string-append "https://github.com/qTox/qTox/archive/v"
1073                                   version ".tar.gz"))
1074               (sha256
1075                (base32
1076                 "10n3cgw9xaqin9la8wpd8v83bkjmimicgbyp5ninsdgsrgky4hmq"))
1077               (file-name (string-append name "-" version ".tar.gz"))))
1078     (build-system cmake-build-system)
1079     (arguments
1080      '(#:phases
1081        (modify-phases %standard-phases
1082          (add-after 'unpack 'fix-reproducibility-issues
1083            (lambda _
1084              (substitute* "src/main.cpp"
1085                (("__DATE__") "\"\"")
1086                (("__TIME__") "\"\"")
1087                (("TIMESTAMP") "\"\""))
1088              #t))
1089          ;; Ensure that icons are found at runtime.
1090          (add-after 'install 'wrap-executable
1091            (lambda* (#:key inputs outputs #:allow-other-keys)
1092              (let ((out (assoc-ref outputs "out")))
1093                (wrap-program (string-append out "/bin/qtox")
1094                  `("QT_PLUGIN_PATH" prefix
1095                    ,(list (string-append (assoc-ref inputs "qtsvg")
1096                                          "/lib/qt5/plugins/"))))))))))
1097     (inputs
1098      `(("ffmpeg" ,ffmpeg)
1099        ("filteraudio" ,filteraudio)
1100        ("glib" ,glib)
1101        ("gtk+" ,gtk+-2)
1102        ("libsodium" ,libsodium)
1103        ("c-toxcore" ,c-toxcore)
1104        ("libvpx" ,libvpx)
1105        ("libxscrnsaver" ,libxscrnsaver)
1106        ("libx11" ,libx11)
1107        ("libexif" ,libexif)
1108        ("sqlite" ,sqlite)
1109        ("openal" ,openal)
1110        ("qrencode" ,qrencode)
1111        ("qtbase" ,qtbase)
1112        ("qtsvg" ,qtsvg)
1113        ("sqlcipher" ,sqlcipher)))
1114     (native-inputs
1115      `(("pkg-config" ,pkg-config)
1116        ("qmake" ,qttools)))
1117     (home-page "https://qtox.github.io/")
1118     (synopsis "Tox chat client using Qt")
1119     (description "qTox is a Tox client that follows the Tox design
1120 guidelines.  It provides an easy to use application that allows you to
1121 connect with friends and family without anyone else listening in.")
1122     (license license:gpl3+)))
1124 (define-public pybitmessage
1125   (package
1126     (name "pybitmessage")
1127     (version "0.6.3.2")
1128     (source
1129      (origin
1130        (method git-fetch)
1131        (uri (git-reference
1132              (url "https://github.com/Bitmessage/PyBitmessage.git")
1133              (commit version)))
1134        (file-name (string-append name "-" version "-checkout"))
1135        (sha256
1136         (base32
1137          "1lmhbpwsqh1v93krlqqhafw2pc3y0qp8zby186yllbph6s8kdp35"))))
1138     (propagated-inputs
1139      ;; TODO:
1140      ;; Package "pyopencl", required in addition to numpy for OpenCL support.
1141      ;; Package "gst123", required in addition to alsa-utils and
1142      ;; mpg123 for sound support.
1143      `(("python2-msgpack" ,python2-msgpack)
1144        ("python2-pythondialog" ,python2-pythondialog)
1145        ("python2-pyqt-4" ,python2-pyqt-4)
1146        ("python2-sip" ,python2-sip)
1147        ("python2-pysqlite" ,python2-pysqlite)
1148        ("python2-pyopenssl" ,python2-pyopenssl)))
1149     (native-inputs
1150      `(("openssl" ,openssl)))
1151     (build-system python-build-system)
1152     (arguments
1153      `(#:modules ((guix build python-build-system)
1154                   (guix build utils))
1155        #:tests? #f ;no test target
1156        #:python ,python-2
1157        #:phases
1158        (modify-phases %standard-phases
1159          (add-after 'unpack 'fix-unmatched-python-shebangs
1160            (lambda* (#:key inputs #:allow-other-keys)
1161              (substitute* "src/bitmessagemain.py"
1162                (("#!/usr/bin/env python2.7")
1163                 (string-append "#!" (which "python"))))
1164              (substitute* "src/bitmessagecli.py"
1165                (("#!/usr/bin/env python2.7.x")
1166                 (string-append "#!" (which "python"))))
1167              #t))
1168          (add-after 'unpack 'fix-depends
1169            (lambda* (#:key inputs #:allow-other-keys)
1170              (substitute* "src/depends.py"
1171                (("libcrypto.so")
1172                 (string-append (assoc-ref inputs "openssl")
1173                                "/lib/libcrypto.so")))
1174              #t))
1175          (add-after 'unpack 'fix-local-files-in-paths
1176            (lambda* (#:key outputs #:allow-other-keys)
1177              (substitute* "src/proofofwork.py"
1178                (("bitmsghash.so")
1179                 (string-append (assoc-ref outputs "out")
1180                                "/lib/bitmsghash.so")))
1181              #t))
1182          (add-after 'unpack 'fix-pyelliptic
1183            (lambda* (#:key inputs #:allow-other-keys)
1184              (substitute* "src/pyelliptic/openssl.py"
1185                (("libcrypto.so")
1186                 (string-append (assoc-ref inputs "openssl")
1187                                "/lib/libcrypto.so"))
1188                (("libssl.so")
1189                 (string-append (assoc-ref inputs "openssl")
1190                                "/lib/libssl.so")))
1191              #t))
1192          (add-after 'unpack 'noninteractive-build
1193            ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20
1194            (lambda _
1195              (substitute* "setup.py"
1196                (("except NameError")
1197                 "except EOFError, NameError"))
1198              #t))
1199          ;; XXX: python setup.py does not build and install bitmsghash,
1200          ;; without it PyBitmessage tries to compile it at first run
1201          ;; in the store, which due to obvious reasons fails. Do it
1202          ;; and place it in /lib.
1203          (add-after 'unpack 'build-and-install-bitmsghash
1204            (lambda* (#:key outputs #:allow-other-keys)
1205              (with-directory-excursion "src/bitmsghash"
1206                (system* "make")
1207                (install-file "bitmsghash.so"
1208                              (string-append (assoc-ref outputs "out") "/lib")))
1209              #t)))))
1210     (license license:expat)
1211     (description
1212      "Distributed and trustless peer-to-peer communications protocol
1213 for sending encrypted messages to one person or many subscribers.")
1214     (synopsis "Distributed peer-to-peer communication")
1215     (home-page "https://bitmessage.org/")))
1217 (define-public ytalk
1218   (package
1219     (name "ytalk")
1220     (version "3.3.0")
1221     (source
1222      (origin
1223        (method url-fetch)
1224        (uri (string-append "ftp://ftp.ourproject.org/pub/ytalk/ytalk-"
1225                            version  ".tar.gz"))
1226        (sha256
1227         (base32
1228          "1d3jhnj8rgzxyxjwfa22vh45qwzjvxw1qh8fz6b7nfkj3zvk9jvf"))))
1229     (build-system gnu-build-system)
1230     (inputs
1231      `(("ncurses" ,ncurses)))
1232     (home-page "http://ytalk.ourproject.org")
1233     (synopsis "Multi-user chat program")
1234     (description "Ytalk is a replacement for the BSD talk program.  Its main
1235 advantage is the ability to communicate with any arbitrary number of users at
1236 once.  It supports both talk protocols (\"talk\" and \"ntalk\") and can communicate
1237 with several different talk daemons at the same time.")
1238     (license license:gpl2+)))
1240 (define-public gloox
1241   (package
1242     (name "gloox")
1243     (version "1.0.22")
1244     (source
1245      (origin
1246        (method url-fetch)
1247        (uri (string-append "https://camaya.net/download/gloox-"
1248                            version ".tar.bz2"))
1249        (sha256
1250         (base32
1251          "0r69gq8if9yy1amjzl7qrq9lzhhna7qgz905ln4wvkwchha1ppja"))))
1252     (build-system gnu-build-system)
1253     (inputs
1254      `(("libidn" ,libidn)
1255        ("gnutls" ,gnutls)
1256        ("zlib" ,zlib)))
1257     (native-inputs
1258      `(("pkg-config" ,pkg-config)))
1259     (synopsis "Portable high-level Jabber/XMPP library for C++")
1260     (description
1261      "gloox is a full-featured Jabber/XMPP client library,
1262 written in ANSI C++.  It makes writing spec-compliant clients easy
1263 and allows for hassle-free integration of Jabber/XMPP functionality
1264 into existing applications.")
1265     (home-page "https://camaya.net/gloox")
1266     (license license:gpl3)))
1268 (define-public perl-net-psyc
1269   (package
1270     (name "perl-net-psyc")
1271     (version "1.3")
1272     (source
1273      (origin
1274        (method url-fetch)
1275        (uri (string-append "http://perlpsyc.psyc.eu/"
1276                            "perlpsyc-" version ".zip"))
1277        (file-name (string-append name "-" version ".zip"))
1278        (sha256
1279         (base32
1280          "0vsjclglkwgbyd9m5ad642fyysxw2x725nhq4r2m9pvqaq6s5yf2"))))
1281     (build-system perl-build-system)
1282     (native-inputs
1283      `(("unzip" ,unzip)))
1284     (inputs
1285      `(("perl-curses" ,perl-curses)
1286        ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
1287     (arguments
1288      `(#:phases
1289        (modify-phases %standard-phases
1290          (delete 'configure) ; No configure script
1291          ;; There is a Makefile, but it does not install everything
1292          ;; (leaves out psycion) and says
1293          ;; "# Just to give you a rough idea". XXX: Fix it upstream.
1294          (replace 'build
1295            (lambda _ (invoke "make" "manuals")))
1296          (replace 'install
1297            (lambda* (#:key outputs #:allow-other-keys)
1298              (let* ((out (assoc-ref outputs "out"))
1299                     (doc (string-append out "/share/doc/perl-net-psyc"))
1300                     (man1 (string-append out "/share/man/man1"))
1301                     (man3 (string-append out "/share/man/man3"))
1302                     (bin (string-append out "/bin"))
1303                     (libpsyc (string-append out "/lib/psyc/ion"))
1304                     (libperl (string-append out "/lib/perl5/site_perl/"
1305                                             ,(package-version perl))))
1307                (copy-recursively "lib/perl5" libperl)
1308                (copy-recursively "lib/psycion" libpsyc)
1309                (copy-recursively "bin" bin)
1310                (install-file "cgi/psycpager" (string-append doc "/cgi"))
1311                (copy-recursively "contrib" (string-append doc "/contrib"))
1312                (copy-recursively "hooks" (string-append doc "/hooks"))
1313                (copy-recursively "sdj" (string-append doc "/sdj"))
1314                (install-file "README.txt" doc)
1315                (install-file "TODO.txt" doc)
1316                (copy-recursively "share/man/man1" man1)
1317                (copy-recursively "share/man/man3" man3)
1318                #t)))
1319          (add-after 'install 'wrap-programs
1320            (lambda* (#:key outputs #:allow-other-keys)
1321              ;; Make sure all executables in "bin" find the Perl modules
1322              ;; provided by this package at runtime.
1323              (let* ((out  (assoc-ref outputs "out"))
1324                     (bin  (string-append out "/bin/"))
1325                     (path (getenv "PERL5LIB")))
1326                (for-each (lambda (file)
1327                            (wrap-program file
1328                              `("PERL5LIB" ":" prefix (,path))))
1329                          (find-files bin "\\.*$"))
1330                #t))))))
1331     (description
1332      "@code{Net::PSYC} with support for TCP, UDP, Event.pm, @code{IO::Select} and
1333 Gtk2 event loops.  This package includes 12 applications and additional scripts:
1334 psycion (a @uref{http://about.psyc.eu,PSYC} chat client), remotor (a control console
1335 for @uref{https://torproject.org,tor} router) and many more.")
1336     (synopsis "Perl implementation of PSYC protocol")
1337     (home-page "http://perlpsyc.psyc.eu/")
1338     (license (list license:gpl2
1339                    license:perl-license
1340                    ;; contrib/irssi-psyc.pl:
1341                    license:public-domain
1342                    ;; bin/psycplay states AGPL with no version:
1343                    license:agpl3+))))
1345 (define-public libpsyc
1346   (package
1347     (name "libpsyc")
1348     (version "20160913")
1349     (source (origin
1350               (method url-fetch)
1351               (uri (string-append "http://www.psyced.org/files/"
1352                                   name "-" version ".tar.xz"))
1353               (sha256
1354                (base32
1355                 "14q89fxap05ajkfn20rnhc6b1h4i3i2adyr7y6hs5zqwb2lcmc1p"))))
1356     (build-system gnu-build-system)
1357     (native-inputs
1358      `(("perl" ,perl)
1359        ("netcat" ,netcat)
1360        ("procps" ,procps)))
1361     (arguments
1362      `(#:make-flags
1363        (list "CC=gcc"
1364              (string-append "PREFIX=" (assoc-ref %outputs "out")))
1365        #:phases
1366        (modify-phases %standard-phases
1367          ;; The rust bindings are the only ones in use, the lpc bindings
1368          ;; are in psyclpc.  The other bindings are not used by anything,
1369          ;; the chances are high that the bindings do not even work,
1370          ;; therefore we do not include them.
1371          ;; TODO: Get a cargo build system in Guix.
1372          (delete 'configure)))) ; no configure script
1373     (home-page "http://about.psyc.eu/libpsyc")
1374     (description
1375      "@code{libpsyc} is a PSYC library in C which implements
1376 core aspects of PSYC, useful for all kinds of clients and servers
1377 including psyced.")
1378     (synopsis "PSYC library in C")
1379     (license license:agpl3+)))
1381 ;; This commit removes the historic bundled pcre and makes psyclpc reproducible.
1382 (define-public psyclpc
1383   (let* ((commit "61cf9aa81297085e5c40170fd01221c752f8deba")
1384          (revision "2"))
1385   (package
1386     (name "psyclpc")
1387     (version (string-append "20160821-" revision "." (string-take commit 7)))
1388     (source (origin
1389               (method git-fetch)
1390               (uri (git-reference
1391                     (url "git://git.psyced.org/git/psyclpc")
1392                     (commit commit)))
1393               (file-name (string-append name "-" version "-checkout"))
1394               (sha256
1395                (base32
1396                 "1viwqymbhn3cwvx0zl58rlzl5gw47zxn0ldg2nbi55ghm5zxl1z5"))))
1397     (build-system gnu-build-system)
1398     (arguments
1399      `(#:tests? #f ; There are no tests/checks.
1400        #:configure-flags
1401        ;; If you have questions about this part, look at
1402        ;; "src/settings/psyced" and the ebuild.
1403        (list
1404         "--enable-use-tls=yes"
1405         "--enable-use-mccp" ; Mud Client Compression Protocol, leave this enabled.
1406         (string-append "--prefix="
1407                        (assoc-ref %outputs "out"))
1408         ;; src/Makefile: Set MUD_LIB to the directory which contains
1409         ;; the mud data. defaults to MUD_LIB = @libdir@
1410         (string-append "--libdir="
1411                        (assoc-ref %outputs "out")
1412                        "/opt/psyced/world")
1413         (string-append "--bindir="
1414                        (assoc-ref %outputs "out")
1415                        "/opt/psyced/bin")
1416         ;; src/Makefile: Set ERQ_DIR to directory which contains the
1417         ;; stuff which ERQ can execute (hopefully) savely.  Was formerly
1418         ;; defined in config.h. defaults to ERQ_DIR= @libexecdir@
1419         (string-append "--libexecdir="
1420                        (assoc-ref %outputs "out")
1421                        "/opt/psyced/run"))
1422        #:phases
1423        (modify-phases %standard-phases
1424          (add-before 'configure 'chdir-to-src
1425            ;; We need to pass this as env variables
1426            ;; and manually change the directory.
1427            (lambda _
1428              (chdir "src")
1429              (setenv "CONFIG_SHELL" (which "sh"))
1430              (setenv "SHELL" (which "sh"))
1431              #t)))
1432        #:make-flags (list "install-all")))
1433     (inputs
1434      `(("zlib" ,zlib)
1435        ("openssl" ,openssl)
1436        ("pcre" ,pcre)))
1437     (native-inputs
1438      `(("pkg-config" ,pkg-config)
1439        ("bison" ,bison)
1440        ("gettext" ,gettext-minimal)
1441        ("help2man" ,help2man)
1442        ("autoconf" ,autoconf)
1443        ("automake" ,automake)))
1444     (home-page "http://lpc.psyc.eu/")
1445     (synopsis "psycLPC is a multi-user network server programming language")
1446     (description
1447      "LPC is a bytecode language, invented to specifically implement
1448 multi user virtual environments on the internet.  This technology is used for
1449 MUDs and also the psyced implementation of the Protocol for SYnchronous
1450 Conferencing (PSYC).  psycLPC is a fork of LDMud with some new features and
1451 many bug fixes.")
1452     (license license:gpl2))))
1454 (define-public loudmouth
1455   (package
1456     (name "loudmouth")
1457     (version "1.5.3")
1458     (source
1459      (origin
1460        (method url-fetch)
1461        (uri (string-append "https://mcabber.com/files/loudmouth/"
1462                            name "-" version ".tar.bz2"))
1463        (sha256
1464         (base32
1465          "0b6kd5gpndl9nzis3n6hcl0ldz74bnbiypqgqa1vgb0vrcar8cjl"))))
1466     (build-system gnu-build-system)
1467     (inputs
1468      `(("glib" ,glib)
1469        ("gnutls" ,gnutls)
1470        ("libidn" ,libidn)))
1471     (native-inputs
1472      `(("pkg-config" ,pkg-config)
1473        ("check" ,check)
1474        ("glib" ,glib "bin") ; gtester
1475        ("gtk-doc" ,gtk-doc)))
1476     (home-page "https://mcabber.com/")
1477     (description
1478      "Loudmouth is a lightweight and easy-to-use C library for programming
1479 with the XMPP (formerly known as Jabber) protocol.  It is designed to be
1480 easy to get started with and yet extensible to let you do anything the XMPP
1481 protocol allows.")
1482     (synopsis "Asynchronous XMPP library")
1483     ;; The files have LGPL2.0+ headers, but COPYING specifies LGPL2.1.
1484     (license license:lgpl2.0+)))
1486 (define-public mcabber
1487   (package
1488     (name "mcabber")
1489     (version "1.1.0")
1490     (source
1491      (origin
1492        (method url-fetch)
1493        (uri (string-append "https://mcabber.com/files/"
1494                            name "-" version ".tar.bz2"))
1495        (sha256
1496         (base32
1497          "1ggh865p1rf10ffsnf4g6qv9i8bls36dxdb1nzs5r9vdqci2rz04"))))
1498     (build-system gnu-build-system)
1499     (arguments
1500      '(#:configure-flags (list "--enable-otr"
1501                                "--enable-aspell")))
1502     (inputs
1503      `(("gpgme" ,gpgme)
1504        ("libotr" ,libotr)
1505        ("aspell" ,aspell)
1506        ("libidn" ,libidn)
1507        ("glib" ,glib)
1508        ("ncurses" ,ncurses)
1509        ("loudmouth" ,loudmouth)))
1510     (native-inputs
1511      `(("pkg-config" ,pkg-config)))
1512     (home-page "https://mcabber.com")
1513     (description
1514      "Mcabber is a small XMPP (Jabber) console client, which includes features
1515 such as SASL and TLS support, @dfn{Multi-User Chat} (MUC) support, logging,
1516 command-completion, OpenPGP encryption, @dfn{Off-the-Record Messaging} (OTR)
1517 support, and more.")
1518     (synopsis "Small XMPP console client")
1519     (license license:gpl2+)))
1521 (define-public freetalk
1522   (package
1523     (name "freetalk")
1524     (version "4.1")
1525     (source (origin
1526               (method url-fetch)
1527               (uri (string-append "mirror://gnu/freetalk/freetalk-"
1528                                   version ".tar.gz"))
1529               (sha256
1530                (base32
1531                 "1rmrn7a1bb7vm26yaklrvx008a9qhwc32s57dwrlf40lv9gffwny"))))
1532     (build-system gnu-build-system)
1533     (arguments
1534      `(#:phases
1535        (modify-phases %standard-phases
1536          ;; For 'system' commands in Scheme code.
1537          (add-after 'install 'wrap-program
1538            (lambda* (#:key inputs outputs #:allow-other-keys)
1539              (let* ((out       (assoc-ref outputs "out"))
1540                     (bash      (assoc-ref inputs "bash"))
1541                     (coreutils (assoc-ref inputs "coreutils"))
1542                     (less      (assoc-ref inputs "less")))
1543                (wrap-program (string-append out "/bin/freetalk")
1544                  `("PATH" ":" prefix
1545                    ,(map (lambda (dir)
1546                            (string-append dir "/bin"))
1547                          (list bash coreutils less))))
1548                #t))))))
1549     (native-inputs
1550      `(("autoconf" ,autoconf)
1551        ("automake" ,automake)
1552        ("pkg-config" ,pkg-config)
1553        ("texinfo" ,texinfo)))
1554     (inputs
1555      `(("bash" ,bash)
1556        ("glib" ,glib)
1557        ("guile" ,guile-2.0)
1558        ("less" ,less)
1559        ("loudmouth" ,loudmouth)
1560        ("readline" ,readline)))
1561     (synopsis "Extensible console-based Jabber client")
1562     (description
1563      "GNU Freetalk is a command-line Jabber/XMPP chat client.  It notably uses
1564 the Readline library to handle input, so it features convenient navigation of
1565 text as well as tab-completion of buddy names, commands and English words.  It
1566 is also scriptable and extensible via Guile.")
1567     (home-page "https://www.gnu.org/software/freetalk/")
1568     (license license:gpl3+)))
1570 (define-public libmesode
1571   (package
1572     (name "libmesode")
1573     (version "0.9.2")
1574     (source (origin
1575               (method git-fetch)
1576               (uri (git-reference
1577                     (url "https://github.com/boothj5/libmesode.git")
1578                     (commit version)))
1579               (file-name (git-file-name name version))
1580               (sha256
1581                (base32
1582                 "06f5nfaypvxrbsinxa1k2vrxrs7kqmg38g4wwwk5d63hpn1pj8ak"))))
1583     (build-system gnu-build-system)
1584     (inputs
1585      `(("expat" ,expat)
1586        ("openssl" ,openssl)))
1587     (native-inputs
1588      `(("autoconf" ,autoconf)
1589        ("automake" ,automake)
1590        ("libtool" ,libtool)
1591        ("pkg-config" ,pkg-config)))
1592     (synopsis "C library for writing XMPP clients")
1593     (description "Libmesode is a fork of libstrophe for use with Profanity
1594 XMPP Client.  In particular, libmesode provides extra TLS functionality such as
1595 manual SSL certificate verification.")
1596     (home-page "https://github.com/boothj5/libmesode")
1597     ;; Dual licensed.
1598     (license (list license:gpl3+ license:x11))))
1600 (define-public libstrophe
1601   (package
1602     (name "libstrophe")
1603     (version "0.9.2")
1604     (source (origin
1605               (method url-fetch)
1606               (uri (string-append "https://github.com/strophe/libstrophe/archive/"
1607                                   version ".tar.gz"))
1608               (file-name (string-append name "-" version ".tar.gz"))
1609               (sha256
1610                (base32
1611                 "0vxfcyfnhnlaj6spm2b0ljw5i3knbphy6mvzpl5zv9b52ny4b08m"))))
1612     (build-system gnu-build-system)
1613     (inputs
1614      `(("expat" ,expat)
1615        ("openssl" ,openssl)))
1616     (native-inputs
1617      `(("autoconf" ,autoconf)
1618        ("automake" ,automake)
1619        ("libtool" ,libtool)
1620        ("pkg-config" ,pkg-config)))
1621     (synopsis "C library for writing XMPP clients")
1622     (description "Libstrophe is a minimal XMPP library written in C.  It has
1623 almost no external dependencies, only an XML parsing library (expat or libxml
1624 are both supported).")
1625     (home-page "http://strophe.im/libstrophe")
1626     ;; Dual licensed.
1627     (license (list license:gpl3+ license:x11))))
1629 (define-public profanity
1630     (package
1631         (name "profanity")
1632         (version "0.5.1")
1633         (source (origin
1634                   (method url-fetch)
1635                   (uri (string-append "http://www.profanity.im/profanity-"
1636                                       version ".tar.gz"))
1637                   (sha256
1638                    (base32
1639                      "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3"))))
1640         (build-system gnu-build-system)
1641         (inputs
1642          `(("curl" ,curl)
1643            ("expat" ,expat)
1644            ("glib" ,glib)
1645            ("gpgme" ,gpgme)
1646            ("libmesode" ,libmesode)
1647            ("libotr" ,libotr)
1648            ("ncurses" ,ncurses)
1649            ("openssl" ,openssl)
1650            ("readline" ,readline)))
1651         (native-inputs
1652          `(("autoconf" ,autoconf)
1653            ("autoconf-archive" ,autoconf-archive)
1654            ("automake" ,automake)
1655            ("cmocka" ,cmocka)
1656            ("libtool" ,libtool)
1657            ("pkg-config" ,pkg-config)))
1658         (synopsis "Console-based XMPP client")
1659         (description "Profanity is a console based XMPP client written in C
1660 using ncurses and libmesode, inspired by Irssi.")
1661         (home-page "http://www.profanity.im")
1662         (license license:gpl3+)))
1664 (define-public libircclient
1665   (package
1666     (name "libircclient")
1667     (version "1.10")
1668     (source
1669      (origin
1670        (method url-fetch)
1671        (uri (string-append "mirror://sourceforge/libircclient/libircclient/"
1672                            version "/libircclient-" version ".tar.gz"))
1673        (sha256
1674         (base32
1675          "0b9wa0h3xc31wpqlvgxgnvqp5wgx3kwsf5s9432m5cj8ycx6zcmv"))))
1676     (build-system gnu-build-system)
1677     (inputs
1678      `(("openssl" ,openssl)))
1679     (arguments
1680      `(#:configure-flags
1681        (list (string-append "--libdir="
1682                             (assoc-ref %outputs "out") "/lib")
1683              "--enable-shared"
1684              "--enable-ipv6"
1685              "--enable-openssl")
1686        #:tests? #f))                    ; no test suite
1687     (home-page "https://www.ulduzsoft.com/libircclient/")
1688     (synopsis "Library implementing the client IRC protocol")
1689     (description "Libircclient is a library which implements the client IRC
1690 protocol.  It is designed to be small, fast, portable and compatible with the
1691 RFC standards as well as non-standard but popular features.  It can be used for
1692 building the IRC clients and bots.")
1693     (license license:lgpl3+)))
1695 (define-public toxic
1696   (package
1697     (name "toxic")
1698     (version "0.8.3")
1699     (source
1700      (origin
1701        (method git-fetch)
1702        (uri (git-reference
1703              (url "https://github.com/JFreegman/toxic.git")
1704              (commit (string-append "v" version))))
1705        (sha256
1706         (base32 "09l2j3lwvrq7bf3051vjsnml9w63790ly3iylgf26gkrmld6k31w"))
1707        (file-name (git-file-name name version))))
1708     (build-system gnu-build-system)
1709     (arguments
1710      `(#:tests? #f                      ; no tests
1711        #:make-flags
1712        (list
1713         "CC=gcc"
1714         (string-append "PREFIX="
1715                        (assoc-ref %outputs "out")))
1716        #:phases
1717        (modify-phases %standard-phases
1718          (delete 'configure)
1719          (add-before 'build 'enable-python-scripting
1720            (lambda _
1721              (setenv "ENABLE_PYTHON" "1")
1722              #t)))))
1723     (inputs
1724      `(("c-toxcore" ,c-toxcore)
1725        ("curl" ,curl)
1726        ("freealut" ,freealut)
1727        ("gdk-pixbuf" ,gdk-pixbuf)       ; for libnotify.pc
1728        ("libconfig" ,libconfig)
1729        ("libnotify" ,libnotify)
1730        ("libpng" ,libpng)
1731        ("libvpx" ,libvpx)
1732        ("libx11" ,libx11)
1733        ("ncurses" ,ncurses)
1734        ("openal" ,openal)
1735        ("python" ,python)
1736        ("qrencode" ,qrencode)))
1737     (native-inputs
1738      `(("pkg-config" ,pkg-config)))
1739     (home-page "https://github.com/JFreegman/toxic")
1740     (synopsis "Tox chat client using ncurses")
1741     (description "Toxic is a console-based instant messaging client, using
1742 c-toxcore and ncurses.  It provides audio calls, sound and desktop
1743 notifications, and Python scripting support.")
1744     (license license:gpl3+)))
1746 (define-public libqmatrixclient
1747   (package
1748     (name "libqmatrixclient")
1749     (version "0.4.0")
1750     (source
1751      (origin
1752        (method git-fetch)
1753        (uri (git-reference
1754               (url "https://github.com/QMatrixClient/libqmatrixclient")
1755               (commit (string-append "v" version))))
1756        (file-name (git-file-name name version))
1757        (sha256
1758         (base32
1759          "1llzqjagvp91kcg26q5c4qw9aaz7wna3rh6k06rc3baivrjqf3cn"))))
1760     (build-system cmake-build-system)
1761     (inputs
1762      `(("qtbase" ,qtbase)))
1763     (arguments
1764      `(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON")
1765        #:tests? #f)) ; No tests
1766     (home-page "https://matrix.org/docs/projects/sdk/libqmatrixclient.html")
1767     (synopsis "Qt5 client library for the Matrix instant messaging protocol")
1768     (description "libqmatrixclient is a Qt5 library to write clients for the
1769 Matrix instant messaging protocol.  Quaternion is the reference client
1770 implementation.  Quaternion and libqmatrixclient together form the
1771 QMatrixClient project.")
1772     (license license:lgpl2.1+)))
1774 (define-public quaternion
1775   (package
1776     (name "quaternion")
1777     (version "0.0.9.3")
1778     (source
1779      (origin
1780        (method git-fetch)
1781        (uri (git-reference
1782               (url "https://github.com/QMatrixClient/Quaternion")
1783               (commit (string-append "v" version))))
1784        (file-name (git-file-name name version))
1785        (sha256
1786         (base32
1787          "1hr9zqf301rg583n9jv256vzj7y57d8qgayk7c723bfknf1s6hh3"))))
1788     (build-system cmake-build-system)
1789     (inputs
1790      `(("libqmatrixclient" ,libqmatrixclient)
1791        ("qtbase" ,qtbase)
1792        ("qtdeclarative" ,qtdeclarative)
1793        ("qtquickcontrols" ,qtquickcontrols)
1794        ("qtsvg" ,qtsvg)
1795        ("qttools" ,qttools)))
1796     (arguments
1797      `(#:tests? #f ; No tests
1798        #:phases
1799        (modify-phases %standard-phases
1800          (add-after 'install 'wrap-program
1801            (lambda* (#:key inputs outputs #:allow-other-keys)
1802              (wrap-program (string-append (assoc-ref outputs "out")
1803                                           "/bin/quaternion")
1804                `("QT_PLUGIN_PATH" ":" prefix
1805                  (,(string-append (assoc-ref inputs "qtsvg")
1806                                   "/lib/qt5/plugins")))
1807                `("QML2_IMPORT_PATH" ":" prefix
1808                  ,(map (lambda (label)
1809                          (string-append (assoc-ref inputs label)
1810                                         "/lib/qt5/qml"))
1811                        '("qtdeclarative" "qtquickcontrols"))))
1812              #t)))))
1813     (home-page "https://matrix.org/docs/projects/client/quaternion.html")
1814     (synopsis "Graphical client for the Matrix instant messaging protocol")
1815     (description "Quaternion is a Qt5 desktop client for the Matrix instant
1816 messaging protocol.  It uses libqmatrixclient and is its reference client
1817 implementation.  Quaternion and libqmatriclient together form the
1818 QMatrixClient project.")
1819     (license (list license:gpl3+ ; all source code
1820                    license:lgpl3+)))) ; icons/breeze
1822 (define-public hangups
1823   (package
1824     (name "hangups")
1825     (version "0.4.9")
1826     (source
1827      (origin
1828        (method url-fetch)
1829        (uri (pypi-uri "hangups" version))
1830        (sha256
1831         (base32 "1jw4i58cd4j1ymsnhv9224xsi26w8y0qrj6z4nw50dnbl45b6aaa"))))
1832     (build-system python-build-system)
1833     (arguments
1834      `(#:phases
1835        (modify-phases %standard-phases
1836          (add-before 'build 'relax-dependencies
1837            ;; Relax overly strict package version specifications.
1838            (lambda _
1839              (substitute* "setup.py"
1840                (("==") ">="))
1841              #t)))))
1842     (propagated-inputs
1843      `(("python-aiohttp" ,python-aiohttp)
1844        ("python-appdirs" ,python-appdirs)
1845        ("python-async-timeout" ,python-async-timeout)
1846        ("python-configargparse" ,python-configargparse)
1847        ("python-mechanicalsoup" ,python-mechanicalsoup)
1848        ("python-protobuf" ,python-protobuf)
1849        ("python-readlike" ,python-readlike)
1850        ("python-reparser" ,python-reparser)
1851        ("python-requests" ,python-requests)
1852        ("python-urwid" ,python-urwid)))
1853     (native-inputs
1854      `(("python-httpretty" ,python-httpretty)
1855        ("python-pytest" ,python-pytest)))
1856     (home-page "https://hangups.readthedocs.io/")
1857     (synopsis "Instant messaging client for Google Hangouts")
1858     (description
1859      "Hangups is an instant messaging client for Google Hangouts.  It includes
1860 both a Python library and a reference client with a text-based user interface.
1862 Hangups is implements a reverse-engineered version of Hangouts' proprietary,
1863 non-interoperable protocol, which allows it to support features like group
1864 messaging that aren’t available to clients that connect over XMPP.")
1865     (license license:expat)))
1867 (define-public telegram-purple
1868   (package
1869     (name "telegram-purple")
1870     (version "1.3.1")
1871     (home-page "https://github.com/majn/telegram-purple")
1872     (source (origin
1873               (method git-fetch)
1874               (uri (git-reference
1875                     (url home-page)
1876                     (commit (string-append "v" version))
1877                     (recursive? #t)))
1878               (sha256
1879                (base32
1880                 "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp"))
1881               (modules '((guix build utils)))
1882               (snippet
1883                '(begin
1884                   (substitute* "Makefile.in"
1885                     ;; By default these two directories point to Pidgin's own
1886                     ;; prefix.
1887                     (("^PLUGIN_DIR_PURPLE=.*")
1888                      (string-append
1889                       "exec_prefix := @exec_prefix@\n"
1890                       "PLUGIN_DIR_PURPLE := @libdir@/purple-2\n"))
1891                     (("^DATA_ROOT_DIR_PURPLE=.*")
1892                      "DATA_ROOT_DIR_PURPLE := @datarootdir@\n")
1894                     ;; Honor sysconfdir instead of trying to write to /etc.
1895                     (("DESTDIR\\)/etc/telegram-purple")
1896                      "DESTDIR)@sysconfdir@/telegram-purple"))
1897                   #t))
1898               (patches (search-patches "telegram-purple-adjust-test.patch"))
1899               (file-name (git-file-name name version))))
1900     (build-system gnu-build-system)
1901     (native-inputs
1902      `(("pkg-config" ,pkg-config)
1903        ("which" ,which)))
1904     (inputs
1905      `(("pidgin" ,pidgin)
1906        ("libgcrypt" ,libgcrypt)
1907        ("libwebp" ,libwebp)
1908        ("glib" ,glib)
1909        ("gettext" ,gnu-gettext)
1910        ("gtk+" ,gtk+-2)
1911        ("zlib" ,zlib)))
1912     (arguments
1913      `(#:phases
1914        (modify-phases %standard-phases
1915          ;; We're using release tag for repository checkout - let's prepare
1916          ;; header defining GIT_COMMIT manually instead of running git to
1917          ;; identify version which is being compiled. Git repository
1918          ;; is removed anyway and only source code is kept.
1919          (add-after 'unpack 'prepare-commit.h
1920            (lambda _
1921              (with-output-to-file "./commit.h"
1922                (lambda ()
1923                  (display
1924                   (string-append "//generated by guix, use version instead of "
1925                                  "commit\n"
1926                                  "#ifndef GIT_COMMIT\n"
1927                                  "#  define GIT_COMMIT \"v"
1928                                  ,version "\"\n"
1929                                  "#endif\n"))))
1930              #t))
1931          (add-before 'configure 'set-SHELL-variables
1932            ;; Set these environment variables so that 'tgl/configure' uses the
1933            ;; right shell and not /bin/sh.
1934            (lambda _
1935              (let ((bash (which "bash")))
1936                (setenv "SHELL" bash)
1937                (setenv "CONFIG_SHELL" bash)
1938                #t))))))
1939     (synopsis "Telegram messaging support for Pidgin")
1940     (description
1941      "Telegram-purple is a plugin for Libpurple, the communication library
1942 used by the Pidgin instant messaging client, that adds support for the
1943 Telegram messenger.")
1945     ;; Code under tgl/ (the Telegram library) is LGPLv2.1+, but the plugin
1946     ;; itself is GPLv2+.
1947     (license license:gpl2+)))
1949 ;;; messaging.scm ends here