gnu: Fix common unquote typos.
[jackhill/guix/guix.git] / gnu / packages / messaging.scm
index 535a1d3..6ce8b25 100644 (file)
@@ -1,16 +1,18 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2014, 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017 <ng0@infotropique.org>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2016, 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
+;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,6 +56,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages libcanberra)
@@ -67,6 +70,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages tcl)
@@ -74,6 +78,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages qt)
@@ -87,6 +92,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages less)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages photo)
   #:use-module (gnu packages texinfo))
 
 (define-public libotr
@@ -120,6 +126,35 @@ keys, no previous conversation is compromised.")
     (home-page "https://otr.cypherpunks.ca/")
     (license (list license:lgpl2.1 license:gpl2))))
 
+(define-public libsignal-protocol-c
+  (package
+  (name "libsignal-protocol-c")
+  (version "2.3.1")
+  (source (origin
+           (method url-fetch)
+           (uri (string-append "https://github.com/WhisperSystems/"
+                               "libsignal-protocol-c/archive/v" version
+                               ".tar.gz"))
+           (file-name (string-append name "-" version ".tar.gz"))
+           (sha256
+            (base32
+             "1klz9jvbnmfc3qy2x6qcswzw14a7kyzs51dlg18yllvir1f1kz0s"))))
+  (arguments
+   `(;; Required for proper linking and for tests to run.
+     #:configure-flags '("-DBUILD_SHARED_LIBS=on" "-DBUILD_TESTING=1")))
+  (build-system cmake-build-system)
+  (inputs `( ;; Required for tests:
+            ("check" ,check)
+            ("openssl" ,openssl)))
+  (native-inputs `(("pkg-config" ,pkg-config)))
+  (home-page "https://github.com/WhisperSystems/libsignal-protocol-c")
+  (synopsis "Implementation of a ratcheting forward secrecy protocol")
+  (description "libsignal-protocol-c is an implementation of a ratcheting
+forward secrecy protocol that works in synchronous and asynchronous
+messaging environments.  It can be used with messaging software to provide
+end-to-end encryption.")
+  (license license:gpl3+)))
+
 (define-public bitlbee
   (package
     (name "bitlbee")
@@ -139,20 +174,19 @@ keys, no previous conversation is compromised.")
               ("python" ,python-2)
               ("perl" ,perl)))
     (arguments
-     `(#:phases (alist-cons-after
-                 'install 'install-etc
-                 (lambda* (#:key (make-flags '()) #:allow-other-keys)
-                   (zero? (apply system* "make" "install-etc" make-flags)))
-                 (alist-replace
-                  'configure
-                  ;; bitlbee's configure script does not tolerate many of the
-                  ;; variable settings that Guix would pass to it.
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    (zero? (system* "./configure"
-                                    (string-append "--prefix="
-                                                   (assoc-ref outputs "out"))
-                                    "--otr=1")))
-                  %standard-phases))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-etc
+           (lambda* (#:key (make-flags '()) #:allow-other-keys)
+             (zero? (apply system* "make" "install-etc" make-flags))))
+         (replace 'configure
+           ;; bitlbee's configure script does not tolerate many of the
+           ;; variable settings that Guix would pass to it.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero? (system* "./configure"
+                             (string-append "--prefix="
+                                            (assoc-ref outputs "out"))
+                             "--otr=1")))))))
     (synopsis "IRC to instant messaging gateway")
     (description "BitlBee brings IM (instant messaging) to IRC clients, for
 people who have an IRC client running all the time and don't want to run an
@@ -166,17 +200,31 @@ identi.ca and status.net).")
 (define-public hexchat
   (package
     (name "hexchat")
-    (version "2.12.2")
+    (version "2.12.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://dl.hexchat.net/hexchat/hexchat-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1xnclfbrgbkqndxygi5f27q00jd7yy54jbd1061jmhxa6wzpibbd"))))
+                "0ficrx56knz5y297qb0x5y02339yvyv734z7kpcx1ixvb0qr2dgs"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Delete dangling symlinks to a non-existent ‘/usr’.
+                  (with-directory-excursion "m4"
+                    (for-each (lambda (f) (delete-file f))
+                              '("intltool.m4" "libtool.m4" "lt~obsolete.m4"
+                                "ltoptions.m4" "ltsugar.m4" "ltversion.m4")))
+                  (delete-file-recursively "build-aux")
+                  (delete-file "po/Makefile.in.in")))))
     (build-system gnu-build-system)
-    (native-inputs `(("pkg-config" ,pkg-config)
-                     ("intltool" ,intltool)))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("autoconf-archive" ,autoconf-archive)
+                     ("automake" ,automake)
+                     ("intltool" ,intltool)
+                     ("libtool" ,libtool)
+                     ("pkg-config" ,pkg-config)))
     (inputs `(("dbus-glib" ,dbus-glib)
               ("dbus" ,dbus)
               ("enchant" ,enchant)
@@ -190,6 +238,18 @@ identi.ca and status.net).")
               ("luajit" ,luajit)
               ("perl-xml-parser" ,perl-xml-parser)
               ("python-2" ,python-2)))
+    (arguments
+     `(#:make-flags '("UPDATE_ICON_CACHE=true") ; Disable icon theme generation
+       #:phases
+       (modify-phases %standard-phases
+         ;; Release 2.12.4 wasn't properly bootstrapped.  Later ones might be!
+         (add-after 'unpack 'bootstrap
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; This file is still required for autoreconf.
+             (copy-file (string-append (assoc-ref inputs "intltool")
+                                       "/share/intltool/Makefile.in.in")
+                        "po/Makefile.in.in")
+             (zero? (system* "autoreconf" "-fiv")))))))
     (synopsis "Graphical IRC Client")
     (description
      "HexChat lets you connect to multiple IRC networks at once.  The main
@@ -206,7 +266,7 @@ dictionaries.  HexChat can be extended with multiple addons.")
     (version "24")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://arthur.barton.de/pub/ngircd/ngircd-"
+              (uri (string-append "https://arthur.barton.de/pub/ngircd/ngircd-"
                                   version ".tar.xz"))
               (sha256
                (base32
@@ -256,12 +316,13 @@ dictionaries.  HexChat can be extended with multiple addons.")
                ;; It runs 'getpid.sh sh' to test if it works at all.  Run it on
                ;; 'make' instead.
                (("getpid.sh sh") "getpid.sh make")))))))
-    (home-page "http://ngircd.barton.de/")
+    (home-page "https://ngircd.barton.de/")
     (synopsis "Lightweight Internet Relay Chat server for small networks")
     (description
-     "ngIRCd is a lightweight Internet Relay Chat server for small or private
-networks.  It is easy to configure, can cope with dynamic IP addresses, and
-supports IPv6, SSL-protected connections as well as PAM for authentication.")
+     "ngIRCd is a lightweight @dfn{Internet Relay Chat} (IRC) server for small
+or private networks.  It is easy to configure, can cope with dynamic IP
+addresses, and supports IPv6, SSL-protected connections, as well as PAM for
+authentication.")
     (license license:gpl2+)))
 
 (define-public pidgin
@@ -327,7 +388,7 @@ supports IPv6, SSL-protected connections as well as PAM for authentication.")
      (list (search-path-specification
             (variable "PURPLE_PLUGIN_PATH")
             (files (list (string-append "lib/purple-"
-                                        (version-prefix version 1))
+                                        (version-major version))
                          "lib/pidgin")))))
     (home-page "http://www.pidgin.im/")
     (synopsis "Graphical multi-protocol instant messaging client")
@@ -388,14 +449,14 @@ compromised.")
 (define-public znc
   (package
     (name "znc")
-    (version "1.6.5")
+    (version "1.6.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://znc.in/releases/archive/znc-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1jia6kq6bp8yxfj02d5vj9vqb4pylqcldspyjj6iz82kkka2a0ig"))))
+                "09cmsnxvi7jg9a0dicf60fxnxdff4aprw7h8vjqlj5ywf6y43f3z"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -422,7 +483,7 @@ compromised.")
        ("zlib" ,zlib)
        ("icu4c" ,icu4c)
        ("cyrus-sasl" ,cyrus-sasl)))
-    (home-page "http://znc.in")
+    (home-page "https://znc.in")
     (synopsis "IRC network bouncer")
     (description "ZNC is an IRC network bouncer or BNC.  It can detach the
 client from the actual IRC server, and also from selected channels.  Multiple
@@ -433,24 +494,23 @@ simultaneously and therefore appear under the same nickname on IRC.")
 (define-public python-nbxmpp
   (package
     (name "python-nbxmpp")
-    (version "0.5.3")
+    (version "0.6.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/n/nbxmpp/"
-                           "nbxmpp-" version ".tar.gz"))
+       (uri (pypi-uri "nbxmpp" version))
        (sha256
         (base32
-         "0dcr786dyips1fdvgsn8yvpgcz5j7217fi05c29cfypdl8jnp6mp"))))
+         "0qvkiscy42nhzhccszi049ws8cnhpxgc13g8naq1rsa5x9zy163c"))))
     (build-system python-build-system)
-    ;; No tests included
-    (arguments `(#:tests? #f))
-    (home-page "http://python-nbxmpp.gajim.org")
+    (arguments
+     `(#:tests? #f))                    ; no tests
+    (home-page "https://dev.gajim.org/gajim/python-nbxmpp")
     (synopsis "Non-blocking Jabber/XMPP module")
     (description
      "The goal of this python library is to provide a way for Python
 applications to use Jabber/XMPP networks in a non-blocking way.  This library
-was initially a fork of xmpppy, but is using non-blocking sockets.")
+was initially a fork of xmpppy, but uses non-blocking sockets.")
     (license license:gpl3+)))
 
 (define-public python2-nbxmpp
@@ -459,7 +519,7 @@ was initially a fork of xmpppy, but is using non-blocking sockets.")
 (define-public gajim
   (package
     (name "gajim")
-    (version "0.16.7")
+    (version "0.16.9")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://gajim.org/downloads/"
@@ -467,7 +527,7 @@ was initially a fork of xmpppy, but is using non-blocking sockets.")
                                   "/gajim-" version ".tar.bz2"))
               (sha256
                (base32
-                "13sxz0hpvyj2yvcbsfqq9yn0hp1d1zsxsj40r0v16jlibha5da9n"))))
+                "0v08zdvpqaig0wxpxn1l8rsj3wr3fqvnagn8cnvch17vfqv9gcr1"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -491,7 +551,8 @@ was initially a fork of xmpppy, but is using non-blocking sockets.")
     (native-inputs
      `(("intltool" ,intltool)))
     (inputs
-     `(("python2-nbxmpp" ,python2-nbxmpp)
+     `(("python2-axolotl" ,python2-axolotl)
+       ("python2-nbxmpp" ,python2-nbxmpp)
        ("python2-pyopenssl" ,python2-pyopenssl)
        ("python2-gnupg" ,python2-gnupg)
        ("python2-pygtk" ,python2-pygtk)
@@ -505,17 +566,84 @@ transformation; audio and video conferences; file transfer; TLS, GPG and
 end-to-end encryption support; XML console.")
     (license license:gpl3)))
 
+(define-public dino
+  ;; The only release tarball is for version 0.0, but it is very old and fails
+  ;; to build.
+  (let ((commit "f25fadde2d6c9492b9cafe2cddbcc7b966942e47")
+        (revision "3"))
+    (package
+      (name "dino")
+      (version (string-append "0.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/dino/dino.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "1nhzrw3pbpybn9qclckk6z427vbgnqd0y1l63zd1rfw4zw099mzs"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f ; there are no tests
+         #:parallel-build? #f ; not supported
+         ; Use our libsignal-protocol-c instead of the git submodule.
+         #:configure-flags '("-DSHARED_SIGNAL_PROTOCOL=yes")
+         #:modules ((guix build cmake-build-system)
+                    ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
+                    (guix build utils))
+         #:imported-modules (,@%gnu-build-system-modules
+                             (guix build cmake-build-system)
+                             (guix build glib-or-gtk-build-system))
+         #:phases
+         (modify-phases %standard-phases
+           ;; The signal-protocol plugin accesses internal headers of
+           ;; libsignal-protocol-c, so we need to put the sources there.
+           (add-after 'unpack 'unpack-sources
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((unpack (lambda (source target)
+                               (with-directory-excursion target
+                                 (zero? (system* "tar" "xvf"
+                                                 (assoc-ref inputs source)
+                                                 "--strip-components=1"))))))
+                 (unpack "libsignal-protocol-c-source"
+                         "plugins/signal-protocol/libsignal-protocol-c")
+                 #t)))
+           (add-after 'install 'glib-or-gtk-wrap
+             (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
+      (inputs
+       `(("libgee" ,libgee)
+         ("libsignal-protocol-c" ,libsignal-protocol-c)
+         ("libgcrypt" ,libgcrypt)
+         ("libsoup" ,libsoup)
+         ("sqlite" ,sqlite)
+         ("gpgme" ,gpgme)
+         ("gtk+" ,gtk+)
+         ("glib-networking" ,glib-networking)
+         ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("libsignal-protocol-c-source" ,(package-source libsignal-protocol-c))
+         ("glib" ,glib "bin")
+         ("vala" ,vala)
+         ("gettext" ,gettext-minimal)))
+      (home-page "https://dino.im")
+      (synopsis "Graphical Jabber (XMPP) client")
+      (description "Dino is a Jabber (XMPP) client which aims to fit well into
+a graphical desktop environment like GNOME.")
+      (license license:gpl3+))))
+
 (define-public prosody
   (package
     (name "prosody")
-    (version "0.9.12")
+    (version "0.10.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://prosody.im/downloads/source/"
                                   "prosody-" version ".tar.gz"))
               (sha256
                (base32
-                "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s"))))
+                "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no "check" target
@@ -581,7 +709,10 @@ end-to-end encryption support; XML console.")
     (inputs
      `(("libidn" ,libidn)
        ("openssl" ,openssl)
+       ;; Lua 5.1 is still recommended for production usage.
+       ;; See https://prosody.im/doc/packagers.
        ("lua" ,lua-5.1)
+       ("lua5.1-bitop" ,lua5.1-bitop)
        ("lua5.1-expat" ,lua5.1-expat)
        ("lua5.1-socket" ,lua5.1-socket)
        ("lua5.1-filesystem" ,lua5.1-filesystem)
@@ -642,7 +773,7 @@ protocols.")
 (define-public c-toxcore
   (package
     (name "c-toxcore")
-    (version "0.1.1")
+    (version "0.1.11")
     (source
      (origin
        (method url-fetch)
@@ -651,37 +782,25 @@ protocols.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0dybpz44pi0zm8djppjna0r8yh5wvl3l885dv2f1wp5366bk59n3"))))
-    (build-system gnu-build-system)
+         "040vwihl1r5159vzimmnff75iqfg53vhnfi5wcb3cd0c2r51idl5"))))
+    (build-system cmake-build-system)
     (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)
-       ("check" ,check)
-       ("pkg-config" ,pkg-config)))
-    (inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
      `(("libsodium" ,libsodium)
        ("opus" ,opus)
        ("libvpx" ,libvpx)))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'autoconf
-           ;; The tarball source is not bootstrapped.
-           (lambda _
-             (zero? (system* "autoreconf" "-vfi")))))
-       #:tests? #f)) ; FIXME: Testsuite fails, needs internet connection.
+    (home-page "https://tox.chat")
     (synopsis "Library for the Tox encrypted messenger protocol")
     (description
-     "Official fork of the C library implementation of the Tox
-encrypted messenger protocol.")
-    (license license:gpl3+)
-    (home-page "https://tox.chat")))
+     "Official fork of the C library implementation of the Tox encrypted
+messenger protocol.")
+    (license license:gpl3+)))
 
 (define-public utox
   (package
    (name "utox")
-   (version "0.11.0")
+   (version "0.16.1")
    (source
     (origin
      (method url-fetch)
@@ -690,37 +809,42 @@ encrypted messenger protocol.")
      (file-name (string-append name "-" version ".tar.gz"))
      (sha256
       (base32
-       "15s4iwjk1s0kihjqn0f07c9618clbphpr827mds3xddkiwnjz37v"))))
+       "14xl72y4w1x2kk0cvkcr9pmywllm0r9w2grjqiknwn95pw6yxz6q"))))
    (build-system cmake-build-system)
    (arguments
-    '(#:tests? #f ; No test phase.
-      #:phases
+    `(#:phases
       (modify-phases %standard-phases
-        (add-after 'unpack 'fix-freetype-include
-          (lambda _
-            (substitute* "CMakeLists.txt"
-              (("/usr/include/freetype2")
-               (string-append (assoc-ref %build-inputs "freetype")
-                              "/include/freetype2")))))
-        (add-before 'install 'patch-cmake-find-utox
-          (lambda _
-            (substitute* "../build/cmake_install.cmake"
-              (("/uTox-0.11.0/utox")
-               "/build/utox")))))))
+        (add-before 'build 'patch-absolute-filename-libgtk-3
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (substitute* "../uTox-0.16.1/src/xlib/gtk.c"
+                         (("libgtk-3.so")
+                         (string-append (assoc-ref inputs "gtk+")
+                                        "/lib/libgtk-3.so")))))
+        (add-after 'install 'wrap-program
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (wrap-program (string-append (assoc-ref outputs "out")
+                                         "/bin/utox")
+            ;; For GtkFileChooserDialog.
+            `("GSETTINGS_SCHEMA_DIR" =
+              (,(string-append (assoc-ref inputs "gtk+")
+                               "/share/glib-2.0/schemas")))))))))
    (inputs
-    ;; TODO: Fix the file chooser dialog; which input does it need?
     `(("dbus" ,dbus)
       ("filteraudio" ,filteraudio)
       ("fontconfig" ,fontconfig)
       ("freetype" ,freetype)
       ("libsodium" ,libsodium)
       ("c-toxcore" ,c-toxcore)
+      ("gtk+" ,gtk+)
       ("libvpx" ,libvpx)
       ("libx11" ,libx11)
       ("libxext" ,libxext)
       ("libxrender" ,libxrender)
       ("openal" ,openal)
       ("v4l-utils" ,v4l-utils)))
+   (native-inputs
+    `(("check" ,check)
+      ("pkg-config" ,pkg-config)))
    (synopsis "Lightweight Tox client")
    (description
     "Utox is a lightweight Tox client.  Tox is a distributed and secure
@@ -731,48 +855,54 @@ instant messenger with audio and video chat capabilities.")
 (define-public qtox
   (package
     (name "qtox")
-    (version "1.5.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/qTox/qTox/archive/v"
-                           version ".tar.gz"))
-       (sha256
-        (base32 "0y15mc39x54k1kz36cw9412kl1p1p6nzlx97gagv4gg3vybfhbjv"))
-       (file-name (string-append name "-" version ".tar.gz"))))
+    (version "1.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/qTox/qTox/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0dyplmlqhg4zbg7hdzp3iqppn9xgp7pds5k6w6byjcqhb9zv91ca"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-reproducibility-issues
+           (lambda _
+             (substitute* "src/main.cpp"
+               (("__DATE__") "\"\"")
+               (("__TIME__") "\"\"")
+               (("TIMESTAMP") "\"\""))
+             #t))
+         ;; Ensure that icons are found at runtime.
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/qtox")
+                 `("QT_PLUGIN_PATH" prefix
+                   ,(list (string-append (assoc-ref inputs "qtsvg")
+                                         "/lib/qt5/plugins/"))))))))))
     (inputs
      `(("ffmpeg" ,ffmpeg)
+       ("filteraudio" ,filteraudio)
        ("glib" ,glib)
        ("gtk+" ,gtk+-2)
        ("libsodium" ,libsodium)
-       ("libtoxcore" ,libtoxcore)
+       ("c-toxcore" ,c-toxcore)
        ("libvpx" ,libvpx)
        ("libxscrnsaver" ,libxscrnsaver)
        ("libx11" ,libx11)
+       ("libexif" ,libexif)
+       ("sqlite" ,sqlite)
        ("openal" ,openal)
        ("qrencode" ,qrencode)
-       ("qt" ,qt)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
        ("sqlcipher" ,sqlcipher)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("qmake" ,qt)))
-    (build-system gnu-build-system)
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-reproducibility-issues
-           (lambda _
-             (substitute* "src/main.cpp"
-               (("__DATE__") "\"\"")
-               (("__TIME__") "\"\"")
-               (("TIMESTAMP") "\"\""))
-             #t))
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (zero?
-              (system* "qmake"
-                       (string-append "PREFIX="
-                                      (assoc-ref outputs "out")))))))))
+       ("qmake" ,qttools)))
     (home-page "https://qtox.github.io/")
     (synopsis "Tox chat client using Qt")
     (description "qTox is a Tox client that follows the Tox design
@@ -783,7 +913,7 @@ connect with friends and family without anyone else listening in.")
 (define-public pybitmessage
   (package
     (name "pybitmessage")
-    (version "0.6.1")
+    (version "0.6.2")
     (source
      (origin
        (method url-fetch)
@@ -792,39 +922,28 @@ connect with friends and family without anyone else listening in.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1ffj7raxpp277kphj98190fxrwfx16vmbspk7k3azg3bh5f5idnf"))))
-    (inputs
-     `(("python" ,python-2)
-       ("python:tk" ,python-2 "tk")
-       ("openssl" ,openssl)
-       ("sqlite" ,sqlite)
-       ("qt" ,qt-4)
+         "1in2mhaxkp2sx8pgvifq9dk1z8b2x3imf1anr0z926vwxwjrf85w"))))
+    (propagated-inputs
+     ;; TODO:
+     ;; Package "pyopencl", required in addition to numpy for OpenCL support.
+     ;; Package "gst123", required in addition to alsa-utils and
+     ;; mpg123 for sound support.
+     `(("python2-msgpack" ,python2-msgpack)
+       ("python2-pythondialog" ,python2-pythondialog)
        ("python2-pyqt-4" ,python2-pyqt-4)
        ("python2-sip" ,python2-sip)
        ("python2-pysqlite" ,python2-pysqlite)
        ("python2-pyopenssl" ,python2-pyopenssl)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
-    (build-system gnu-build-system)
+     `(("openssl" ,openssl)))
+    (build-system python-build-system)
     (arguments
-     `(#:imported-modules ((guix build python-build-system)
-                           ,@%gnu-build-system-modules)
-       #:make-flags (list (string-append "PREFIX="
-                                         (assoc-ref %outputs "out")))
-       #:tests? #f ; no test target
+     `(#:modules ((guix build python-build-system)
+                  (guix build utils))
+       #:tests? #f ;no test target
+       #:python ,python-2
        #:phases
        (modify-phases %standard-phases
-         (add-before 'build 'fix-makefile
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "Makefile"
-               (("mkdir -p \\$\\{DESTDIR\\}/usr") "")
-               (("/usr/local") "")
-               (("/usr") "")
-               (("#!/bin/sh") (string-append "#!" (which "sh")))
-               (("python2") (which "python"))
-               (("/opt/openssl-compat-bitcoin/lib/")
-                (string-append (assoc-ref inputs "openssl") "/lib/")))
-             #t))
          (add-after 'unpack 'fix-unmatched-python-shebangs
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "src/bitmessagemain.py"
@@ -858,18 +977,24 @@ connect with friends and family without anyone else listening in.")
                 (string-append (assoc-ref inputs "openssl")
                                "/lib/libssl.so")))
              #t))
-         ;; XXX: Make does not build and install bitmsghash, do it
+         (add-after 'unpack 'noninteractive-build
+           ;; This applies upstream commit 4c597d3f7cf9f83a763472aa165a1a4292019f20
+           (lambda _
+             (substitute* "setup.py"
+               (("except NameError")
+                "except EOFError, NameError"))
+             #t))
+         ;; XXX: python setup.py does not build and install bitmsghash,
+         ;; without it PyBitmessage tries to compile it at first run
+         ;; in the store, which due to obvious reasons fails. Do it
          ;; and place it in /lib.
-         (add-before 'build 'build-and-install-bitmsghash
+         (add-after 'unpack 'build-and-install-bitmsghash
            (lambda* (#:key outputs #:allow-other-keys)
-             (chdir "src/bitmsghash")
-             (system* "make")
-             (chdir "../..")
-             (install-file "src/bitmsghash/bitmsghash.so"
-                           (string-append (assoc-ref outputs "out") "/lib"))
-             #t))
-         (add-after 'install 'wrap
-           (@@ (guix build python-build-system) wrap)))))
+             (with-directory-excursion "src/bitmsghash"
+               (system* "make")
+               (install-file "bitmsghash.so"
+                             (string-append (assoc-ref outputs "out") "/lib")))
+             #t)))))
     (license license:expat)
     (description
      "Distributed and trustless peer-to-peer communications protocol
@@ -1001,7 +1126,7 @@ for @uref{https://torproject.org,tor} router) and many more.")
     (synopsis "Perl implementation of PSYC protocol")
     (home-page "http://perlpsyc.psyc.eu/")
     (license (list license:gpl2
-                   (package-license perl)
+                   license:perl-license
                    ;; contrib/irssi-psyc.pl:
                    license:public-domain
                    ;; bin/psycplay states AGPL with no version:
@@ -1198,7 +1323,7 @@ support, and more.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-before 'configure 'autogen
+         (add-after 'unpack 'autogen
            (lambda _
              (zero? (system* "sh" "autogen.sh"))))
          ;; For 'system' commands in Scheme code.
@@ -1232,7 +1357,7 @@ support, and more.")
 the Readline library to handle input, so it features convenient navigation of
 text as well as tab-completion of buddy names, commands and English words.  It
 is also scriptable and extensible via Guile.")
-    (home-page "https://www.gnu.org/software/freetalk")
+    (home-page "https://www.gnu.org/software/freetalk/")
     (license license:gpl3+)))
 
 (define-public libmesode
@@ -1372,4 +1497,54 @@ RFC standards as well as non-standard but popular features.  It can be used for
 building the IRC clients and bots.")
     (license license:lgpl3+)))
 
+(define-public toxic
+  (package
+    (name "toxic")
+    (version "0.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/JFreegman/toxic/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0166lqb47f4kj34mhi57aqmnk9mh4hsicmbdsj6ag54sy1zicy20"))
+              (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags
+       (list
+        "CC=gcc"
+        (string-append "PREFIX="
+                       (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'enable-python-scripting
+           (lambda _
+             (setenv "ENABLE_PYTHON" "1")
+             #t)))))
+    (inputs
+     `(("c-toxcore" ,c-toxcore)
+       ("curl" ,curl)
+       ("freealut" ,freealut)
+       ("gdk-pixbuf" ,gdk-pixbuf) ; for libnotify.pc
+       ("libconfig" ,libconfig)
+       ("libnotify" ,libnotify)
+       ("libpng" ,libpng)
+       ("libvpx" ,libvpx)
+       ("libx11" ,libx11)
+       ("ncurses" ,ncurses)
+       ("openal" ,openal)
+       ("python" ,python)
+       ("qrencode" ,qrencode)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "https://github.com/JFreegman/toxic")
+    (synopsis "Tox chat client using ncurses")
+    (description "Toxic is a console-based instant messaging client, using
+c-toxcore and ncurses.  It provides audio calls, sound and desktop
+notifications, and Python scripting support.")
+    (license license:gpl3+)))
+
 ;;; messaging.scm ends here