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>
15 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
16 ;;; Copyright © 2019 Ivan Vilata i Balaguer <ivan@selidor.net>
17 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
18 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages telephony)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages aidc)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages avahi)
40 #:use-module (gnu packages audio)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages boost)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages crypto)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages file)
48 #:use-module (gnu packages protobuf)
49 #:use-module (gnu packages gettext)
50 #:use-module (gnu packages gl)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gnupg)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages libcanberra)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages multiprecision)
58 #:use-module (gnu packages ncurses)
59 #:use-module (gnu packages networking)
60 #:use-module (gnu packages pcre)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages pulseaudio)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages qt)
66 #:use-module (gnu packages serialization)
67 #:use-module (gnu packages speech)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages upnp)
71 #:use-module (gnu packages video)
72 #:use-module (gnu packages webkit)
73 #:use-module (gnu packages xiph)
74 #:use-module (gnu packages xorg)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages readline)
77 #:use-module (gnu packages bison)
78 #:use-module (gnu packages flex)
79 #:use-module ((guix licenses) #:prefix license:)
80 #:use-module (guix packages)
81 #:use-module (guix download)
82 #:use-module (guix git-download)
83 #:use-module (guix build-system cmake)
84 #:use-module (guix build-system gnu)
85 #:use-module (guix build-system qt))
87 (define-public commoncpp
93 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
96 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
99 (modify-phases %standard-phases
100 (add-before 'configure 'pre-configure
102 (substitute* "src/applog.cpp"
103 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
105 (build-system gnu-build-system)
106 (synopsis "(u)Common C++ framework for threaded applications")
107 (description "GNU Common C++ is an portable, optimized class framework for
108 threaded applications, supporting concurrent synchronization, inter-process
109 communications via sockets, and various methods for data handling, such as
110 serialization and XML parsing. It includes the uCommon C++ library, a smaller
112 (license license:gpl2+) ; plus runtime exception
113 (home-page "https://www.gnu.org/software/commoncpp/")))
115 (define-public ucommon
121 (uri (string-append "mirror://gnu/commoncpp/" name "-"
124 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
125 (build-system gnu-build-system)
126 (inputs `(("gnutls" ,gnutls)))
127 (synopsis "Common C++ framework for threaded applications")
128 (description "GNU uCommon C++ is meant as a very light-weight C++ library
129 to facilitate using C++ design patterns even for very deeply embedded
130 applications, such as for systems using uclibc along with posix threading
132 (license license:gpl3+)
133 (home-page "https://www.gnu.org/software/commoncpp/")
134 (properties '((ftp-directory . "/gnu/commoncpp")))))
142 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
145 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
146 (build-system gnu-build-system)
147 (inputs `(("ucommon" ,ucommon)
148 ("libgcrypt" ,libgcrypt)))
149 (native-inputs `(("pkg-config" ,pkg-config)))
150 (synopsis "Implementation of RTP (real-time transport protocol)")
151 (description "GNU ccRTP is an implementation of RTP, the real-time transport
152 protocol from the IETF. It is suitable both for high capacity servers and
153 personal client applications. It is flexible in its design, allowing it to
154 function as a framework for the framework, rather than just being a
155 packet-manipulation library.")
156 (license license:gpl2+) ; plus runtime exception
157 (home-page "https://www.gnu.org/software/ccrtp/")))
166 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
167 (patches (search-patches "osip-CVE-2017-7853.patch"))
170 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
171 (build-system gnu-build-system)
173 (synopsis "Library implementing SIP (RFC-3261)")
174 (description "GNU oSIP is an implementation of the SIP protocol. It is
175 used to provide multimedia and telecom software developers with an interface
176 to initiate and control SIP sessions.")
177 (license license:lgpl2.1+)
178 (home-page "https://www.gnu.org/software/osip/")))
181 (define-public exosip
187 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
190 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
191 (build-system gnu-build-system)
192 (inputs `(("osip" ,osip)))
193 (synopsis "Sip abstraction library")
194 (description "EXosip is a library that hides the complexity of using the
195 SIP protocol for multimedia session establishment. This protocol is mainly to
196 be used by VoIP telephony applications (endpoints or conference server) but
197 might be also useful for any application that wish to establish sessions like
199 (license license:gpl2+)
200 ;; (plus OpenSSL linking exception)
201 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
202 (home-page "https://savannah.nongnu.org/projects/exosip")))
204 (define-public sipwitch
210 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
213 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
214 (build-system gnu-build-system)
215 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
216 ;; cross-compiling. Among other issues there the program name "pkg-config"
217 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
218 ;; Fortunately we can avoid the use of pkg-config and set the dependency
220 (arguments `(#:configure-flags
221 `("--without-pkg-config"
222 ,(string-append "UCOMMON_CFLAGS=-I"
223 (assoc-ref %build-inputs "ucommon") "/include")
224 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
225 ,(string-append "LIBOSIP2_CFLAGS=-I"
226 (assoc-ref %build-inputs "osip") "/include")
227 "LIBOSIP2_LIBS=-losipparser2 -losip2"
228 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
230 "EXOSIP2_LIBS=-leXosip2"
231 ,(string-append "EXOSIP2_CFLAGS=-I"
232 (assoc-ref %build-inputs "exosip")
234 (inputs `(("ucommon" ,ucommon)
237 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
238 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
239 uses the SIP protocol. Calls can be made from behind NAT firewalls and
240 without the need for a service provider. Its peer-to-peer design ensures that
241 there is no central point for media intercept or capture and thus it can be
242 used to construct a secure telephone system that operates over the public
244 (license license:gpl3+)
245 (home-page "https://www.gnu.org/software/sipwitch/")))
247 (define-public libsrtp
254 (url "https://github.com/cisco/libsrtp")
255 (commit (string-append "v" version))))
256 (file-name (git-file-name name version))
259 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
261 `(("psmisc" ,psmisc) ;some tests require 'killall'
263 (build-system gnu-build-system)
265 '(#:test-target "runtest"
266 #:phases (modify-phases %standard-phases
267 (add-after 'build 'build-shared
268 (lambda* (#:key (make-flags '()) #:allow-other-keys)
269 ;; Build the shared library separately because
270 ;; the test runner requires a static build.
271 (apply invoke "make" "shared_library" make-flags)
273 (add-after 'install 'remove-static-library
274 (lambda* (#:key outputs #:allow-other-keys)
275 (delete-file (string-append (assoc-ref outputs "out")
278 (synopsis "Secure RTP (SRTP) Reference Implementation")
280 "This package provides an implementation of the Secure Real-time Transport
281 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
282 supporting cryptographic kernel.")
283 (home-page "https://github.com/cisco/libsrtp")
284 (license license:bsd-3)))
286 (define-public bctoolbox
292 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
296 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
297 (build-system gnu-build-system)
298 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
302 `(("mbedtls" ,mbedtls-apache)))
303 (home-page "https://www.linphone.org")
304 (synopsis "Utilities library for linphone software")
305 (description "BCtoolbox is a utilities library used by Belledonne
306 Communications software like linphone.")
307 (license license:gpl2+)))
315 (uri (string-append "https://download.savannah.nongnu.org/"
316 "releases/linphone/ortp/sources/ortp-"
320 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
321 (build-system gnu-build-system)
323 `(("bctoolbox" ,bctoolbox)))
325 `(("pkg-config" ,pkg-config)))
326 (home-page "https://linphone.org/")
327 (synopsis "Implementation of the Real-time transport protocol")
328 (description "oRTP is a library implementing the Real-time transport
329 protocol (RFC 3550).")
330 (license license:lgpl2.1+)))
332 (define-public libiax2
333 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
334 ;; This is the commit used by the Ring Project.
337 (version (string-append "0.0.0-1." (string-take commit 7)))
342 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
344 (file-name (git-file-name name version))
347 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
348 (build-system gnu-build-system)
350 `(("autoconf" ,autoconf)
351 ("automake" ,automake)
352 ("libtool" ,libtool)))
353 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
354 (synopsis "Inter-Asterisk-Protocol library")
355 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
356 Voice-over-IP (VoIP) communications.")
357 ;; The file 'src/md5.c' is released into the public domain by RSA Data
358 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
359 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
360 ;; covered under the 'GPL'.
361 ;; The package as a whole is distributed under the LGPL 2.0.
362 (license (list license:lgpl2.0
363 license:public-domain
372 (uri (string-append "http://holdenc.altervista.org/"
373 "seren/downloads/seren-" version
377 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
378 (build-system gnu-build-system)
379 (arguments '(#:tests? #f)) ; no "check" target
381 `(("alsa-lib" ,alsa-lib)
386 (synopsis "Simple VoIP program to create conferences from the terminal")
388 "Seren is a simple VoIP program based on the Opus codec that allows you
389 to create a voice conference from the terminal, with up to 10 participants,
390 without having to register accounts, exchange emails, or add people to contact
391 lists. All you need to join an existing conference is the host name or IP
392 address of one of the participants.")
393 (home-page "http://holdenc.altervista.org/seren/")
394 (license license:gpl3+)))
396 (define-public mumble
402 (uri (string-append "https://mumble.info/snapshot/"
403 name "-" version ".tar.gz"))
406 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
407 (modules '((guix build utils)))
410 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
411 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
413 delete-file-recursively
414 '("3rdparty/GL" ; in mesa
415 "3rdparty/mach-override-build" ; for macx
416 "3rdparty/mach-override-src"
417 "3rdparty/minhook-build" ; for win32
418 "3rdparty/minhook-src"
419 "3rdparty/opus-build" ; in opus
421 "3rdparty/sbcelt-helper-build" ; not enabled
422 "3rdparty/sbcelt-lib-build"
423 "3rdparty/sbcelt-src"
424 "3rdparty/speex-build" ; in speex
426 "3rdparty/speexdsp-src" ; in speexdsp
427 "3rdparty/xinputcheck-build" ; for win32
428 "3rdparty/xinputcheck-src"))
430 (build-system qt-build-system)
432 `(#:tests? #f ; no "check" target
434 (modify-phases %standard-phases
436 (lambda* (#:key inputs outputs #:allow-other-keys)
437 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
438 (string-append "MUMBLE_PYTHON="
439 (string-append (assoc-ref inputs "python")
441 (string-append "CONFIG+="
443 ;; Options used are listed in the same order
444 ;; as in the "INSTALL" file
445 ;; (plus the final "packaged" and "release").
446 (list "no-bundled-speex" ; in speex
447 "no-bundled-opus" ; in opus
448 "no-g15" ; not packaged
449 "no-jackaudio" ; use pulse
451 "no-alsa" ; use pulse
453 "no-embed-qt-translations"
454 "no-ice" ; not packaged
457 (string-append "DEFINES+="
459 (assoc-ref outputs "out")
461 (add-before 'configure 'fix-libspeechd-include
463 (substitute* "src/mumble/TextToSpeech_unix.cpp"
464 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
466 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
467 (add-before 'configure 'fix-statistic-gathering-default
469 (substitute* "src/mumble/Settings.cpp"
470 (("bUsage = true;") "bUsage = false;"))
472 (add-before 'install 'disable-murmur-ice
474 (substitute* "scripts/murmur.ini.system"
477 (replace 'install ; install phase does not exist
478 (lambda* (#:key inputs outputs #:allow-other-keys)
479 (let* ((out (assoc-ref outputs "out"))
480 (etc (string-append out "/etc/murmur"))
481 (dbus (string-append out "/etc/dbus-1/system.d/"))
482 (bin (string-append out "/bin"))
483 (services (string-append out "/share/services"))
484 (applications (string-append out "/share/applications"))
485 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
486 (man (string-append out "/share/man/man1"))
487 (lib (string-append out "/lib/mumble")))
488 (install-file "release/mumble" bin)
489 (install-file "scripts/mumble-overlay" bin)
490 (install-file "scripts/mumble.protocol" services)
491 (install-file "scripts/mumble.desktop" applications)
492 (install-file "icons/mumble.svg" icons)
493 (install-file "man/mumble-overlay.1" man)
494 (install-file "man/mumble.1" man)
495 (install-file "release/murmurd" bin)
496 (install-file "scripts/murmur.ini.system" etc)
497 (rename-file (string-append etc "/murmur.ini.system")
498 (string-append etc "/murmur.ini"))
499 (install-file "scripts/murmur.conf" dbus)
500 (install-file "man/murmurd.1" man)
501 (for-each (lambda (file) (install-file file lib))
502 (find-files "." "\\.so\\."))
503 (for-each (lambda (file) (install-file file lib))
504 (find-files "release/plugins" "\\.so$"))))))))
508 ("libsndfile" ,libsndfile)
510 ("mesa" ,mesa) ; avoid bundled
512 ("opus" ,opus) ; avoid bundled
513 ("protobuf" ,protobuf)
514 ("pulseaudio" ,pulseaudio)
517 ("speech-dispatcher" ,speech-dispatcher)
518 ("speex" ,speex) ; avoid bundled
519 ("speexdsp" ,speexdsp))) ; avoid bundled
521 `(("pkg-config" ,pkg-config)
523 ("qttools" ,qttools)))
524 (synopsis "Low-latency, high quality voice chat software")
526 "Mumble is an low-latency, high quality voice chat
527 software primarily intended for use while gaming.
528 Mumble consists of two applications for separate usage:
529 @code{mumble} for the client, and @code{murmur} for the server.")
530 (home-page "https://wiki.mumble.info/wiki/Main_Page")
531 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
532 license:bsd-2 ; celt-0.11.0
533 license:isc)))) ; arc4random
535 (define-public twinkle
542 (url "https://github.com/LubosD/twinkle")
543 (commit (string-append "v" version))))
544 (file-name (git-file-name name version))
547 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
548 (build-system cmake-build-system)
550 `(#:tests? #f ; no test target
551 #:configure-flags '("-DWITH_SPEEX=On")
553 (modify-phases %standard-phases
554 (add-after 'install 'wrap-executable
555 (lambda* (#:key inputs outputs #:allow-other-keys)
556 (let ((out (assoc-ref outputs "out")))
557 (wrap-program (string-append out "/bin/twinkle")
558 `("QT_PLUGIN_PATH" ":" prefix
559 ,(map (lambda (label)
560 (string-append (assoc-ref inputs label)
562 '("qtbase" "qtdeclarative")))
563 `("QML2_IMPORT_PATH" ":" prefix
564 ,(map (lambda (label)
565 (string-append (assoc-ref inputs label)
567 '("qtdeclarative" "qtquickcontrols"))))
572 ("readline" ,readline)
578 ("speexdsp" ,speexdsp)
579 ("libsndfile" ,libsndfile)
580 ("alsa-lib" ,alsa-lib)
581 ("qttools" ,qttools)))
584 ("qtdeclarative" ,qtdeclarative)
585 ("qtquickcontrols" ,qtquickcontrols)))
586 (home-page "http://twinkle.dolezel.info/")
587 (synopsis "Softphone for voice over IP and instant messaging")
588 (description "Twinkle is a softphone for your voice over IP and instant
589 messaging communcations using the SIP protocol. You can use it for direct IP
590 phone to IP phone communication or in a network using a SIP proxy to route your
592 (license license:gpl2+)))
594 (define-public pjproject
602 (url "https://github.com/pjsip/pjproject.git")
603 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
604 (modules '((guix build utils)))
607 (let ((third-party-directories
608 ;; Things we don't need:
609 ;; BaseClasses - contains libraries from Windows SDK
610 ;; we don't need it, at least not now.
611 (list "BaseClasses" "g7221" "ilbc" "milenage"
612 "speex" "threademulation" "yuv" "bdsound"
613 "gsm" "mp3" "resample" "srtp" "webrtc"
614 ;; Keep only resample, build and README.txt.
615 "build/baseclasses" "build/g7221" "build/gsm"
616 "build/ilbc" "build/milenage" "build/resample"
617 "build/samplerate" "build/speex" "build/srtp"
618 "build/webrtc" "build/yuv")))
619 ;; Keep only Makefiles related to resample.
620 (for-each (lambda (directory)
621 (delete-file-recursively
622 (string-append "third_party/" directory)))
623 third-party-directories)
625 (let ((third-party-dirs
626 (list "gsm" "ilbc" "speex" "g7221" "srtp"
627 "portaudio" "resample")))
630 (substitute* "third_party/build/os-linux.mak"
631 (((string-append "DIRS += " dirs)) "")))
633 (file-name (git-file-name name version))
636 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
637 (build-system gnu-build-system)
639 `(("portaudio" ,portaudio)))
641 ;; These packages are referenced in the Libs field of the pkg-config
642 ;; file that will be installed by pjproject.
646 ("resample", resample)
647 ("util-linux" ,util-linux)))
649 `(("autoconf" ,autoconf)
650 ("automake" ,automake)
651 ("pkg-config" ,pkg-config)
652 ("libtool" ,libtool)))
654 `(;; FIXME make: No rule to make target
655 ;; 'pjlib-test-unknown-[something]-gnu'.
657 ;; #:test-target "selftest"
659 (modify-phases %standard-phases
660 (add-before 'build 'build-dep
661 (lambda _ (invoke "make" "dep")))
662 (add-before 'patch-source-shebangs 'autoconf
664 (invoke "autoconf" "-v" "-f" "-i" "-o"
665 "aconfigure" "aconfigure.ac")))
666 (add-before 'autoconf 'disable-some-tests
667 ;; Three of the six test programs fail due to missing network
670 (substitute* "Makefile"
671 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
672 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
674 (home-page "https://www.pjsip.org")
675 (synopsis "Session Initiation Protocol (SIP) stack")
676 (description "PJProject provides an implementation of the Session
677 Initiation Protocol (SIP) and a multimedia framework.")
678 (license license:gpl2+)))
680 (define %jami-version "20191101.3.67671e7")
682 (define* (jami-source #:key without-daemon)
685 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
688 (modules '((guix build utils)))
692 (delete-file-recursively "daemon/contrib"))
696 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
698 (define-public pjproject-jami
701 (name "pjproject-jami")
703 `(("savoir-faire-linux-patches" ,(jami-source))
704 ,@(package-native-inputs pjproject)))
707 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
709 (list "--disable-oss"
713 "--disable-speex-aec"
714 "--disable-g711-codec"
715 "--disable-l16-codec"
716 "--disable-gsm-codec"
717 "--disable-g722-codec"
718 "--disable-g7221-codec"
719 "--disable-speex-codec"
720 "--disable-ilbc-codec"
721 "--disable-opencore-amr"
728 "--disable-libwebrtc"
730 "--with-external-srtp"
731 ;; We need -fPIC or else we get the following error when linking
732 ;; against pjproject-jami:
733 ;; relocation R_X86_64_32S against `.rodata' can not be used when
734 ;; making a shared object;
738 (modify-phases %standard-phases
739 (add-after 'unpack 'make-git-checkout-writable
741 (for-each make-file-writable (find-files "."))
743 (add-after 'unpack 'apply-patches
744 (lambda* (#:key inputs #:allow-other-keys)
745 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
747 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
748 ;; WARNING: These amount for huge changes in pjproject.
749 (savoir-faire-linux-patches
750 '("fix_turn_alloc_failure"
756 "fix_ioqueue_ipv6_sendto"
761 "fix_first_packet_turn_tcp"
763 "ignore_ipv6_on_transport_check"
764 "fix_turn_connection_failure"
765 ;; "uwp_vs" ; for windows
766 "disable_local_resolution")))
767 (mkdir-p savoir-faire-linux-patches-directory)
768 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
769 "-C" savoir-faire-linux-patches-directory
770 "--strip-components=5"
771 "ring-project/daemon/contrib/src/pjproject")
774 (invoke "patch" "--force" "-p1" "-i"
775 (string-append savoir-faire-linux-patches-directory "/"
777 savoir-faire-linux-patches))
779 ;; TODO: We could use substitute-keyword-arguments instead of
780 ;; repeating the phases from pjproject, but somehow it does
782 (add-before 'build 'build-dep
783 (lambda _ (invoke "make" "dep")))
784 (add-before 'patch-source-shebangs 'autoconf
786 (invoke "autoconf" "-v" "-f" "-i" "-o"
787 "aconfigure" "aconfigure.ac")))
788 (add-before 'autoconf 'disable-some-tests
789 ;; Three of the six test programs fail due to missing network
792 (substitute* "Makefile"
793 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
794 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
797 (define-public libring
800 (version %jami-version)
801 (source (jami-source #:without-daemon #t))
802 (build-system gnu-build-system)
804 ;; Missing (optional?) dep: libnatpmp.
805 `(("alsa-lib" ,alsa-lib)
807 ("dbus-c++" ,dbus-c++)
820 ("pulseaudio" ,pulseaudio)
821 ("libsamplerate" ,libsamplerate)
822 ("libsndfile" ,libsndfile)
824 ("speexdsp" ,speexdsp)
826 ("libvorbis" ,libvorbis)
828 ("libvdpau" ,libvdpau)
829 ("yaml-cpp" ,yaml-cpp)
832 ("libsecp256k1" ,libsecp256k1)
834 ("python-wrapper" ,python-wrapper)
835 ("restinio" ,restinio)
838 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
839 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
840 ("pjproject" ,pjproject-jami)))
842 `(("autoconf" ,autoconf)
843 ("automake" ,automake)
845 ("pkg-config" ,pkg-config)
848 ("perl" ,perl))) ; Needed for documentation.
850 `(#:tests? #f ; The tests fail to compile due to missing headers.
852 (modify-phases %standard-phases
853 (add-after 'unpack 'change-directory
857 (add-before 'build 'add-lib-dir
861 (synopsis "Distributed multimedia communications platform")
862 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
863 video and chat communication platform that requires no centralized server and
864 leaves the power of privacy in the hands of the user. It supports the SIP and
865 IAX protocols, as well as decentralized calling using P2P-DHT.
867 This package provides a library and daemon implementing the Jami core
869 (home-page "https://jami.net/")
870 (license license:gpl3+)))
872 (define-public libringclient
875 (name "libringclient")
876 (build-system cmake-build-system)
878 `(("libring" ,libring) ; For 'dring'.
879 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
880 ("qttools" ,qttools)))
882 `(#:tests? #f ; There is no testsuite.
884 (list (string-append "-DRING_BUILD_DIR="
885 (assoc-ref %build-inputs "libring") "/include"))
887 (modify-phases %standard-phases
888 (add-after 'unpack 'change-directory
892 (add-before 'configure 'fix-dbus-interfaces-path
893 (lambda* (#:key inputs #:allow-other-keys)
894 (substitute* "CMakeLists.txt"
895 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
896 (string-append (assoc-ref inputs "libring")
897 dbus-interfaces-path-suffix))))))))
898 (synopsis "Distributed multimedia communications platform")
899 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
900 video and chat communication platform that requires no centralized server and
901 leaves the power of privacy in the hands of the user. It supports the SIP and
902 IAX protocols, as well as decentralized calling using P2P-DHT.
904 This package provides a library common to all Jami clients.")
905 (home-page "https://jami.net")
906 (license license:gpl3+)))
912 (build-system cmake-build-system)
914 `(("libringclient" ,libringclient)
916 ("qrencode" ,qrencode)
917 ("libnotify" ,libnotify)
919 ("clutter-gtk" ,clutter-gtk)
920 ("gettext" ,gnu-gettext)
921 ("libcanberra" ,libcanberra)
922 ("webkitgtk" ,webkitgtk)
923 ;; TODO: We must wrap ring-client-gnome to force using the
924 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
927 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
928 ;; undefined symbol: sqlite3_column_table_name16
930 ;; qtbase is built against sqlite-with-column-metadata but somehow
931 ;; jami-client-gnome ends up with both `sqlite' and
932 ;; `sqlite-with-column-metadata' as inputs and it seems that
933 ;; libqsqlite.so gets confused.
934 ("sqlite" ,sqlite-with-column-metadata)))
936 `(("pkg-config" ,pkg-config)
937 ("glib:bin" ,glib "bin")
938 ("doxygen" ,doxygen)))
940 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
941 ("adwaita-icon-theme" ,adwaita-icon-theme)
942 ("evolution-data-server" ,evolution-data-server)))
944 `(#:tests? #f ; There is no testsuite.
946 (modify-phases %standard-phases
947 (add-after 'unpack 'change-directory
949 (chdir "client-gnome")
951 (add-after 'install 'wrap
952 (lambda* (#:key inputs outputs #:allow-other-keys)
953 (let* ((out (assoc-ref outputs "out"))
954 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
955 (wrap-program (string-append out "/bin/jami-gnome")
956 `("LD_LIBRARY_PATH" ":" prefix (,path))))
958 (synopsis "Distributed, privacy-respecting communication program")
959 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
960 video and chat communication platform that requires no centralized server and
961 leaves the power of privacy in the hands of the user. It supports the SIP and
962 IAX protocols, as well as decentralized calling using P2P-DHT.
964 This package provides the Jami client for the GNOME desktop.")
965 (home-page "https://jami.net")
966 (license license:gpl3+)))
968 (define-public jami-client-gnome
969 (deprecated-package "jami-client-gnome" jami))
971 (define-public libtgvoip
979 (url "https://github.com/grishka/libtgvoip.git")
981 (file-name (git-file-name name version))
982 ;; Fix compilation on i686-linux architecture.
983 ;; NOTE: Applying these patches is order-dependent!
984 ;; The patch for WebRTC /must/ precede the patch for SSE2.
986 (search-patches "libtgvoip-disable-webrtc.patch"
987 "libtgvoip-disable-sse2.patch"))
990 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
991 (build-system gnu-build-system)
993 `(("alsa-lib" ,alsa-lib)
994 ("libopusenc" ,libopusenc)
996 ("pulseaudio" ,pulseaudio)))
997 (synopsis "VoIP library for Telegram clients")
998 (description "A collection of libraries and header files for implementing
999 telephony functionality into custom Telegram clients.")
1000 (home-page "https://github.com/zevlg/libtgvoip")
1001 (license license:unlicense)))