1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
7 ;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
8 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
12 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
13 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages telephony)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages aidc)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages avahi)
36 #:use-module (gnu packages audio)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages boost)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages file)
44 #:use-module (gnu packages protobuf)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages libcanberra)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages networking)
55 #:use-module (gnu packages pcre)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages pulseaudio)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages qt)
61 #:use-module (gnu packages serialization)
62 #:use-module (gnu packages speech)
63 #:use-module (gnu packages sqlite)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages upnp)
66 #:use-module (gnu packages video)
67 #:use-module (gnu packages webkit)
68 #:use-module (gnu packages xiph)
69 #:use-module (gnu packages xorg)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages bison)
73 #:use-module (gnu packages flex)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix packages)
76 #:use-module (guix download)
77 #:use-module (guix git-download)
78 #:use-module (guix build-system cmake)
79 #:use-module (guix build-system gnu))
81 (define-public commoncpp
87 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
90 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
93 (modify-phases %standard-phases
94 (add-before 'configure 'pre-configure
96 (substitute* "src/applog.cpp"
97 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
99 (build-system gnu-build-system)
100 (synopsis "(u)Common C++ framework for threaded applications")
101 (description "GNU Common C++ is an portable, optimized class framework for
102 threaded applications, supporting concurrent synchronization, inter-process
103 communications via sockets, and various methods for data handling, such as
104 serialization and XML parsing. It includes the uCommon C++ library, a smaller
106 (license license:gpl2+) ; plus runtime exception
107 (home-page "https://www.gnu.org/software/commoncpp/")))
109 (define-public ucommon
115 (uri (string-append "mirror://gnu/commoncpp/" name "-"
118 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
119 (build-system gnu-build-system)
120 (inputs `(("gnutls" ,gnutls)))
121 (synopsis "Common C++ framework for threaded applications")
122 (description "GNU uCommon C++ is meant as a very light-weight C++ library
123 to facilitate using C++ design patterns even for very deeply embedded
124 applications, such as for systems using uclibc along with posix threading
126 (license license:gpl3+)
127 (home-page "https://www.gnu.org/software/commoncpp/")
128 (properties '((ftp-directory . "/gnu/commoncpp")))))
136 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
139 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
140 (build-system gnu-build-system)
141 (inputs `(("ucommon" ,ucommon)
142 ("libgcrypt" ,libgcrypt)))
143 (native-inputs `(("pkg-config" ,pkg-config)))
144 (synopsis "Implementation of RTP (real-time transport protocol)")
145 (description "GNU ccRTP is an implementation of RTP, the real-time transport
146 protocol from the IETF. It is suitable both for high capacity servers and
147 personal client applications. It is flexible in its design, allowing it to
148 function as a framework for the framework, rather than just being a
149 packet-manipulation library.")
150 (license license:gpl2+) ; plus runtime exception
151 (home-page "https://www.gnu.org/software/ccrtp/")))
160 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
161 (patches (search-patches "osip-CVE-2017-7853.patch"))
164 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
165 (build-system gnu-build-system)
167 (synopsis "Library implementing SIP (RFC-3261)")
168 (description "GNU oSIP is an implementation of the SIP protocol. It is
169 used to provide multimedia and telecom software developers with an interface
170 to initiate and control SIP sessions.")
171 (license license:lgpl2.1+)
172 (home-page "https://www.gnu.org/software/osip/")))
175 (define-public exosip
181 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
184 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
185 (build-system gnu-build-system)
186 (inputs `(("osip" ,osip)))
187 (synopsis "Sip abstraction library")
188 (description "EXosip is a library that hides the complexity of using the
189 SIP protocol for multimedia session establishment. This protocol is mainly to
190 be used by VoIP telephony applications (endpoints or conference server) but
191 might be also useful for any application that wish to establish sessions like
193 (license license:gpl2+)
194 ;; (plus OpenSSL linking exception)
195 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
196 (home-page "https://savannah.nongnu.org/projects/exosip")))
198 (define-public sipwitch
204 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
207 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
208 (build-system gnu-build-system)
209 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
210 ;; cross-compiling. Among other issues there the program name "pkg-config"
211 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
212 ;; Fortunately we can avoid the use of pkg-config and set the dependency
214 (arguments `(#:configure-flags
215 `("--without-pkg-config"
216 ,(string-append "UCOMMON_CFLAGS=-I"
217 (assoc-ref %build-inputs "ucommon") "/include")
218 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
219 ,(string-append "LIBOSIP2_CFLAGS=-I"
220 (assoc-ref %build-inputs "osip") "/include")
221 "LIBOSIP2_LIBS=-losipparser2 -losip2"
222 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
224 "EXOSIP2_LIBS=-leXosip2"
225 ,(string-append "EXOSIP2_CFLAGS=-I"
226 (assoc-ref %build-inputs "exosip")
228 (inputs `(("ucommon" ,ucommon)
231 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
232 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
233 uses the SIP protocol. Calls can be made from behind NAT firewalls and
234 without the need for a service provider. Its peer-to-peer design ensures that
235 there is no central point for media intercept or capture and thus it can be
236 used to construct a secure telephone system that operates over the public
238 (license license:gpl3+)
239 (home-page "https://www.gnu.org/software/sipwitch/")))
241 (define-public libsrtp
247 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
249 (file-name (string-append name "-" version ".tar.gz"))
252 "02x5l5h2nq6f9gq1bmgz5v9jmnqaab51p8aldglng1z7pjbp9za4"))))
254 `(("psmisc" ,psmisc) ;some tests require 'killall'
256 (build-system gnu-build-system)
258 '(#:test-target "runtest"))
259 (synopsis "Secure RTP (SRTP) Reference Implementation")
261 "This package provides an implementation of the Secure Real-time Transport
262 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
263 supporting cryptographic kernel.")
264 (home-page "https://github.com/cisco/libsrtp")
265 (license license:bsd-3)))
267 (define-public bctoolbox
273 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
277 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
278 (build-system gnu-build-system)
279 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
283 `(("mbedtls" ,mbedtls-apache)))
284 (home-page "https://www.linphone.org")
285 (synopsis "Utilities library for linphone software")
286 (description "BCtoolbox is a utilities library used by Belledonne
287 Communications softwares like linphone.")
288 (license license:gpl2+)))
296 (uri (string-append "https://download.savannah.nongnu.org/"
297 "releases/linphone/ortp/sources/ortp-"
301 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
302 (build-system gnu-build-system)
304 `(("bctoolbox" ,bctoolbox)))
306 `(("pkg-config" ,pkg-config)))
307 (home-page "https://linphone.org/")
308 (synopsis "Implementation of the Real-time transport protocol")
309 (description "oRTP is a library implementing the Real-time transport
310 protocol (RFC 3550).")
311 (license license:lgpl2.1+)))
313 (define-public libiax2
314 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
315 ;; This is the commit used by the Ring Project.
318 (version (string-append "0.0.0-1." (string-take commit 7)))
323 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
325 (file-name (git-file-name name version))
328 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
329 (build-system gnu-build-system)
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool)))
334 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
335 (synopsis "Inter-Asterisk-Protocol library")
336 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
337 Voice-over-IP (VoIP) communications.")
338 ;; The file 'src/md5.c' is released into the public domain by RSA Data
339 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
340 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
341 ;; covered under the 'GPL'.
342 ;; The package as a whole is distributed under the LGPL 2.0.
343 (license (list license:lgpl2.0
344 license:public-domain
353 (uri (string-append "http://holdenc.altervista.org/"
354 "seren/downloads/seren-" version
358 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
359 (build-system gnu-build-system)
360 (arguments '(#:tests? #f)) ; no "check" target
362 `(("alsa-lib" ,alsa-lib)
367 (synopsis "Simple VoIP program to create conferences from the terminal")
369 "Seren is a simple VoIP program based on the Opus codec that allows you
370 to create a voice conference from the terminal, with up to 10 participants,
371 without having to register accounts, exchange emails, or add people to contact
372 lists. All you need to join an existing conference is the host name or IP
373 address of one of the participants.")
374 (home-page "http://holdenc.altervista.org/seren/")
375 (license license:gpl3+)))
377 (define-public mumble
383 (uri (string-append "https://mumble.info/snapshot/"
384 name "-" version ".tar.gz"))
387 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
388 (patches (search-patches "mumble-1.2.19-abs.patch"))
389 (modules '((guix build utils)))
392 ;; Remove bundled software.
393 (for-each delete-file-recursively '("3rdparty"
398 "sbcelt-helper-build"
401 ;; TODO: Celt is still bundled. It has been merged into Opus
402 ;; and will be removed after 1.3.0.
403 ;; https://github.com/mumble-voip/mumble/issues/1999
405 (build-system gnu-build-system)
407 `(#:tests? #f ; no "check" target
409 (modify-phases %standard-phases
411 (lambda* (#:key outputs #:allow-other-keys)
412 (invoke "qmake" "main.pro" "-recursive"
413 (string-append "CONFIG+="
417 "no-embed-qt-translations"
429 (string-append "DEFINES+="
431 (assoc-ref outputs "out")
433 (add-before 'configure 'fix-libspeechd-include
435 (substitute* "src/mumble/TextToSpeech_unix.cpp"
436 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
437 (replace 'install ; install phase does not exist
438 (lambda* (#:key inputs outputs #:allow-other-keys)
439 (let* ((out (assoc-ref outputs "out"))
440 (etc (string-append out "/etc/murmur"))
441 (dbus (string-append out "/etc/dbus-1/system.d/"))
442 (bin (string-append out "/bin"))
443 (services (string-append out "/share/services"))
444 (applications (string-append out "/share/applications"))
445 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
446 (man (string-append out "/share/man/man1"))
447 (lib (string-append out "/lib/mumble")))
448 (install-file "release/mumble" bin)
449 (install-file "scripts/mumble-overlay" bin)
450 (install-file "scripts/mumble.protocol" services)
451 (install-file "scripts/mumble.desktop" applications)
452 (install-file "icons/mumble.svg" icons)
453 (install-file "man/mumble-overlay.1" man)
454 (install-file "man/mumble.1" man)
455 (install-file "release/murmurd" bin)
456 (install-file "scripts/murmur.ini.system" etc)
457 (rename-file (string-append etc "/murmur.ini.system")
458 (string-append etc "/murmur.ini"))
459 (install-file "scripts/murmur.conf" dbus)
460 (install-file "man/murmurd.1" man)
461 (for-each (lambda (file) (install-file file lib))
462 (find-files "." "\\.so\\."))
463 (for-each (lambda (file) (install-file file lib))
464 (find-files "release/plugins" "\\.so$"))))))))
467 ("protobuf" ,protobuf)
469 ("libsndfile" ,libsndfile)
473 ("speexdsp" ,speexdsp)
474 ("speech-dispatcher" ,speech-dispatcher)
478 ("alsa-lib" ,alsa-lib)
479 ("pulseaudio" ,pulseaudio)))
481 `(("pkg-config" ,pkg-config)))
482 (synopsis "Low-latency, high quality voice chat software")
484 "Mumble is an low-latency, high quality voice chat
485 software primarily intended for use while gaming.
486 Mumble consists of two applications for separate usage:
487 @code{mumble} for the client, and @code{murmur} for the server.")
488 (home-page "https://wiki.mumble.info/wiki/Main_Page")
489 (license (list license:bsd-3
490 ;; The bundled celt is bsd-2. Remove after 1.3.0.
493 (define-public twinkle
494 (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f")
498 (version (git-version "1.10.1" revision commit))
502 (url "https://github.com/LubosD/twinkle")
505 (search-patches "twinkle-include-qregexpvalidator.patch"))
506 (file-name (git-file-name name version))
509 "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z"))))
510 (build-system cmake-build-system)
512 `(#:tests? #f ; no test target
513 #:configure-flags '("-DWITH_SPEEX=On")
515 (modify-phases %standard-phases
516 (add-after 'install 'wrap-executable
517 (lambda* (#:key inputs outputs #:allow-other-keys)
518 (let ((out (assoc-ref outputs "out")))
519 (wrap-program (string-append out "/bin/twinkle")
520 `("QT_PLUGIN_PATH" ":" prefix
521 ,(map (lambda (label)
522 (string-append (assoc-ref inputs label)
524 '("qtbase" "qtdeclarative")))
525 `("QML2_IMPORT_PATH" ":" prefix
526 ,(map (lambda (label)
527 (string-append (assoc-ref inputs label)
529 '("qtdeclarative" "qtquickcontrols"))))
534 ("readline" ,readline)
540 ("speexdsp" ,speexdsp)
541 ("libsndfile" ,libsndfile)
542 ("alsa-lib" ,alsa-lib)
543 ("qttools" ,qttools)))
546 ("qtdeclarative" ,qtdeclarative)
547 ("qtquickcontrols" ,qtquickcontrols)))
548 (home-page "http://twinkle.dolezel.info/")
549 (synopsis "Softphone for voice over IP and instant messaging")
550 (description "Twinkle is a softphone for your voice over IP and instant
551 messaging communcations using the SIP protocol. You can use it for direct IP
552 phone to IP phone communication or in a network using a SIP proxy to route your
554 (license license:gpl2+))))
556 (define-public pjproject
564 "http://www.pjsip.org/release/" ;
565 version "/" name "-" version ".tar.bz2"))
566 (modules '((guix build utils)))
569 (let ((third-party-directories
570 (list "BaseClasses" "bdsound" "bin" "g7221" "gsm"
571 "ilbc" "lib" "milenage" "mp3" "speex" "srtp"
573 ;; Keep only resample, build and README.txt.
574 "build/baseclasses" "build/g7221" "build/gsm"
575 "build/ilbc" "build/milenage" "build/samplerate"
576 "build/speex" "build/srtp"
577 "build/resample" "build/yuv")))
578 ;; Keep only Makefiles related to resample.
579 (for-each (lambda (file)
580 (delete-file-recursively
581 (string-append "third_party/" file)))
582 third-party-directories)
584 (let ((third-party-dirs
585 (list "gsm" "ilbc" "speex" "g7221" "srtp"
586 "portaudio" "resample")))
589 (substitute* "third_party/build/os-linux.mak"
590 (((string-append "DIRS += " dirs)) "")))
594 "0wiph6g51wanzwjjrpwsz63amgvly8g08jz033gnwqmppa584b4w"))))
595 (build-system gnu-build-system)
597 `(("portaudio" ,portaudio)))
599 ;; These packages are referenced in the Libs field of the pkg-config
600 ;; file that will be installed by pjproject.
604 ("util-linux" ,util-linux)))
606 `(("autoconf" ,autoconf)
607 ("automake" ,automake)
608 ("pkg-config" ,pkg-config)
609 ("libtool" ,libtool)))
611 `(;; FIXME make: No rule to make target
612 ;; 'pjlib-test-unknown-[something]-gnu'.
614 ;; #:test-target "selftest"
616 (modify-phases %standard-phases
617 (add-before 'build 'build-dep
618 (lambda _ (invoke "make" "dep")))
619 (add-before 'patch-source-shebangs 'autoconf
621 (invoke "autoconf" "-vfi" "-o"
622 "aconfigure" "aconfigure.ac")))
623 (add-before 'autoconf 'disable-some-tests
624 ;; Three of the six test programs fail due to missing network
627 (substitute* "Makefile"
628 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
629 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
631 (home-page "https://www.pjsip.org")
632 (synopsis "Session Initiation Protocol (SIP) stack")
633 (description "PJProject provides an implementation of the Session
634 Initiation Protocol (SIP) and a multimedia framework.")
635 (license license:gpl2+)))
637 (define %jami-version "20190319.4.a16a99f")
639 (define* (jami-source #:key without-daemon)
642 (uri (string-append "http://dl.jami.net/ring-release/tarballs/ring_"
645 (modules '((guix build utils)))
649 (delete-file-recursively "daemon/contrib"))
653 "1c6n6sm7skw83v25g33g4jzbragz9j4przbzaz7asxw54jy33dwl"))))
655 (define-public pjproject-jami
658 (name "pjproject-jami")
660 `(("savoir-faire-linux-patches" ,(jami-source))
661 ,@(package-native-inputs pjproject)))
664 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
666 (list "--disable-oss"
670 "--disable-speex-aec"
671 "--disable-g711-codec"
672 "--disable-l16-codec"
673 "--disable-gsm-codec"
674 "--disable-g722-codec"
675 "--disable-g7221-codec"
676 "--disable-speex-codec"
677 "--disable-ilbc-codec"
678 "--disable-opencore-amr"
685 "--disable-libwebrtc"
686 ;; "-fPIC" is required for libring. Bug?
687 "CFLAGS=-fPIC -DPJ_ENABLE_EXTRA_CHECK=1 -DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=1024 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000 -DPJ_ICE_ST_MAX_CAND=32"
688 "CXXFLAGS=-fPIC -DPJ_ENABLE_EXTRA_CHECK=1 -DPJ_ICE_MAX_CAND=256 -DPJ_ICE_MAX_CHECKS=1024 -DPJ_ICE_COMP_BITS=2 -DPJ_ICE_MAX_STUN=3 -DPJSIP_MAX_PKT_LEN=8000 -DPJ_ICE_ST_MAX_CAND=32"
689 ;; Now deviating from the rules.mak file.
690 "--enable-ssl=gnutls"
691 "--with-external-srtp")
693 (modify-phases %standard-phases
694 (add-after 'unpack 'apply-patches
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
698 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
699 ;; WARNING: These amount for huge changes in pjproject.
700 ;; Particularly, they add support for GnuTLS.
701 (savoir-faire-linux-patches
709 "fix_ioqueue_ipv6_sendto"
712 (mkdir-p savoir-faire-linux-patches-directory)
713 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
714 "-C" savoir-faire-linux-patches-directory "--strip-components=5" "ring-project/daemon/contrib/src/pjproject")
717 (invoke "patch" "--force" "-p1" "-i"
718 (string-append savoir-faire-linux-patches-directory "/"
720 savoir-faire-linux-patches))
722 ;; TODO: We could use substitute-keyword-arguments instead of
723 ;; repeating the phases from pjproject, but somehow it does
725 (add-before 'build 'build-dep
726 (lambda _ (invoke "make" "dep")))
727 (add-before 'patch-source-shebangs 'autoconf
729 (invoke "autoconf" "-v" "-f" "-i" "-o"
730 "aconfigure" "aconfigure.ac")))
731 (add-before 'autoconf 'disable-some-tests
732 ;; Three of the six test programs fail due to missing network
735 (substitute* "Makefile"
736 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
737 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
740 (define-public libring
743 (version %jami-version)
744 (source (jami-source #:without-daemon #t))
745 (build-system gnu-build-system)
747 ;; Missing (optional?) dep: libnatpmp.
748 `(("alsa-lib" ,alsa-lib)
750 ("dbus-c++" ,dbus-c++)
763 ("pulseaudio" ,pulseaudio)
764 ("libsamplerate" ,libsamplerate)
765 ("libsndfile" ,libsndfile)
767 ("speexdsp" ,speexdsp)
769 ("libvorbis" ,libvorbis)
771 ("libvdpau" ,libvdpau)
772 ("yaml-cpp" ,yaml-cpp)
775 ("libsecp256k1" ,libsecp256k1)
777 ("python-wrapper" ,python-wrapper)
780 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
781 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
782 ("pjproject" ,pjproject-jami)))
784 `(("autoconf" ,autoconf)
785 ("automake" ,automake)
787 ("pkg-config" ,pkg-config)
790 ("perl" ,perl))) ; Needed for documentation.
792 `(#:tests? #f ; The tests fail to compile due to missing headers.
794 (modify-phases %standard-phases
795 (add-after 'unpack 'change-directory
799 (add-before 'build 'add-lib-dir
803 (synopsis "Distributed multimedia communications platform")
804 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
805 video and chat communication platform that requires no centralized server and
806 leaves the power of privacy in the hands of the user. It supports the SIP and
807 IAX protocols, as well as decentralized calling using P2P-DHT.
809 This package provides a library and daemon implementing the Jami core
811 (home-page "https://jami.net/")
812 (license license:gpl3+)))
814 (define-public libringclient
817 (name "libringclient")
818 (build-system cmake-build-system)
820 `(("libring" ,libring) ; For 'dring'.
821 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
822 ("qttools" ,qttools)))
824 `(#:tests? #f ; There is no testsuite.
826 (list (string-append "-DRING_BUILD_DIR="
827 (assoc-ref %build-inputs "libring") "/include"))
829 (modify-phases %standard-phases
830 (add-after 'unpack 'change-directory
834 (add-before 'configure 'fix-dbus-interfaces-path
835 (lambda* (#:key inputs #:allow-other-keys)
836 (substitute* "CMakeLists.txt"
837 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
838 (string-append (assoc-ref inputs "libring")
839 dbus-interfaces-path-suffix))))))))
840 (synopsis "Distributed multimedia communications platform")
841 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
842 video and chat communication platform that requires no centralized server and
843 leaves the power of privacy in the hands of the user. It supports the SIP and
844 IAX protocols, as well as decentralized calling using P2P-DHT.
846 This package provides a library common to all Jami clients.")
847 (home-page "https://jami.net")
848 (license license:gpl3+)))
850 (define-public jami-client-gnome
853 (name "jami-client-gnome")
854 (build-system cmake-build-system)
856 `(("libringclient" ,libringclient)
858 ("qrencode" ,qrencode)
859 ("libnotify" ,libnotify)
861 ("clutter-gtk" ,clutter-gtk)
862 ("gettext" ,gnu-gettext)
863 ("libcanberra" ,libcanberra)
864 ("webkitgtk" ,webkitgtk)
865 ;; TODO: We must wrap ring-client-gnome to force using the
866 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
869 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
870 ;; undefined symbol: sqlite3_column_table_name16
872 ;; qtbase is built against sqlite-with-column-metadata but somehow
873 ;; jami-client-gnome ends up with both `sqlite' and
874 ;; `sqlite-with-column-metadata' as inputs and it seems that
875 ;; libqsqlite.so gets confused.
876 ("sqlite" ,sqlite-with-column-metadata)))
878 `(("pkg-config" ,pkg-config)
879 ("glib:bin" ,glib "bin")
880 ("doxygen" ,doxygen)))
882 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
883 ("adwaita-icon-theme" ,adwaita-icon-theme)
884 ("evolution-data-server" ,evolution-data-server)))
886 `(#:tests? #f ; There is no testsuite.
888 (modify-phases %standard-phases
889 (add-after 'unpack 'change-directory
891 (chdir "client-gnome")
893 (add-after 'install 'wrap
894 (lambda* (#:key inputs outputs #:allow-other-keys)
895 (let* ((out (assoc-ref outputs "out"))
896 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
897 (wrap-program (string-append out "/bin/gnome-ring")
898 `("LD_LIBRARY_PATH" ":" prefix (,path))))
900 (synopsis "Distributed multimedia communications platform")
901 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
902 video and chat communication platform that requires no centralized server and
903 leaves the power of privacy in the hands of the user. It supports the SIP and
904 IAX protocols, as well as decentralized calling using P2P-DHT.
906 This package provides the Jami client for the GNOME desktop.")
907 (home-page "https://jami.net")
908 (license license:gpl3+)))