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>
19 ;;; This file is part of GNU Guix.
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.
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.
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 telephony)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages aidc)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages avahi)
39 #:use-module (gnu packages audio)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages documentation)
46 #:use-module (gnu packages file)
47 #:use-module (gnu packages protobuf)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages gl)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnome)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages libcanberra)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages multiprecision)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages networking)
59 #:use-module (gnu packages pcre)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pulseaudio)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages qt)
65 #:use-module (gnu packages serialization)
66 #:use-module (gnu packages speech)
67 #:use-module (gnu packages sqlite)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages upnp)
70 #:use-module (gnu packages video)
71 #:use-module (gnu packages webkit)
72 #:use-module (gnu packages xiph)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages flex)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix download)
81 #:use-module (guix git-download)
82 #:use-module (guix build-system cmake)
83 #:use-module (guix build-system gnu)
84 #:use-module (guix build-system qt))
86 (define-public commoncpp
92 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
95 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
98 (modify-phases %standard-phases
99 (add-before 'configure 'pre-configure
101 (substitute* "src/applog.cpp"
102 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
104 (build-system gnu-build-system)
105 (synopsis "(u)Common C++ framework for threaded applications")
106 (description "GNU Common C++ is an portable, optimized class framework for
107 threaded applications, supporting concurrent synchronization, inter-process
108 communications via sockets, and various methods for data handling, such as
109 serialization and XML parsing. It includes the uCommon C++ library, a smaller
111 (license license:gpl2+) ; plus runtime exception
112 (home-page "https://www.gnu.org/software/commoncpp/")))
114 (define-public ucommon
120 (uri (string-append "mirror://gnu/commoncpp/" name "-"
123 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
124 (build-system gnu-build-system)
125 (inputs `(("gnutls" ,gnutls)))
126 (synopsis "Common C++ framework for threaded applications")
127 (description "GNU uCommon C++ is meant as a very light-weight C++ library
128 to facilitate using C++ design patterns even for very deeply embedded
129 applications, such as for systems using uclibc along with posix threading
131 (license license:gpl3+)
132 (home-page "https://www.gnu.org/software/commoncpp/")
133 (properties '((ftp-directory . "/gnu/commoncpp")))))
141 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
144 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
145 (build-system gnu-build-system)
146 (inputs `(("ucommon" ,ucommon)
147 ("libgcrypt" ,libgcrypt)))
148 (native-inputs `(("pkg-config" ,pkg-config)))
149 (synopsis "Implementation of RTP (real-time transport protocol)")
150 (description "GNU ccRTP is an implementation of RTP, the real-time transport
151 protocol from the IETF. It is suitable both for high capacity servers and
152 personal client applications. It is flexible in its design, allowing it to
153 function as a framework for the framework, rather than just being a
154 packet-manipulation library.")
155 (license license:gpl2+) ; plus runtime exception
156 (home-page "https://www.gnu.org/software/ccrtp/")))
165 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
166 (patches (search-patches "osip-CVE-2017-7853.patch"))
169 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
170 (build-system gnu-build-system)
172 (synopsis "Library implementing SIP (RFC-3261)")
173 (description "GNU oSIP is an implementation of the SIP protocol. It is
174 used to provide multimedia and telecom software developers with an interface
175 to initiate and control SIP sessions.")
176 (license license:lgpl2.1+)
177 (home-page "https://www.gnu.org/software/osip/")))
180 (define-public exosip
186 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
189 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
190 (build-system gnu-build-system)
191 (inputs `(("osip" ,osip)))
192 (synopsis "Sip abstraction library")
193 (description "EXosip is a library that hides the complexity of using the
194 SIP protocol for multimedia session establishment. This protocol is mainly to
195 be used by VoIP telephony applications (endpoints or conference server) but
196 might be also useful for any application that wish to establish sessions like
198 (license license:gpl2+)
199 ;; (plus OpenSSL linking exception)
200 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
201 (home-page "https://savannah.nongnu.org/projects/exosip")))
203 (define-public sipwitch
209 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
212 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
213 (build-system gnu-build-system)
214 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
215 ;; cross-compiling. Among other issues there the program name "pkg-config"
216 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
217 ;; Fortunately we can avoid the use of pkg-config and set the dependency
219 (arguments `(#:configure-flags
220 `("--without-pkg-config"
221 ,(string-append "UCOMMON_CFLAGS=-I"
222 (assoc-ref %build-inputs "ucommon") "/include")
223 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
224 ,(string-append "LIBOSIP2_CFLAGS=-I"
225 (assoc-ref %build-inputs "osip") "/include")
226 "LIBOSIP2_LIBS=-losipparser2 -losip2"
227 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
229 "EXOSIP2_LIBS=-leXosip2"
230 ,(string-append "EXOSIP2_CFLAGS=-I"
231 (assoc-ref %build-inputs "exosip")
233 (inputs `(("ucommon" ,ucommon)
236 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
237 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
238 uses the SIP protocol. Calls can be made from behind NAT firewalls and
239 without the need for a service provider. Its peer-to-peer design ensures that
240 there is no central point for media intercept or capture and thus it can be
241 used to construct a secure telephone system that operates over the public
243 (license license:gpl3+)
244 (home-page "https://www.gnu.org/software/sipwitch/")))
246 (define-public libsrtp
253 (url "https://github.com/cisco/libsrtp")
254 (commit (string-append "v" version))))
255 (file-name (git-file-name name version))
258 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
260 `(("psmisc" ,psmisc) ;some tests require 'killall'
262 (build-system gnu-build-system)
264 '(#:test-target "runtest"))
265 (synopsis "Secure RTP (SRTP) Reference Implementation")
267 "This package provides an implementation of the Secure Real-time Transport
268 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
269 supporting cryptographic kernel.")
270 (home-page "https://github.com/cisco/libsrtp")
271 (license license:bsd-3)))
273 (define-public bctoolbox
279 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
283 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
284 (build-system gnu-build-system)
285 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
289 `(("mbedtls" ,mbedtls-apache)))
290 (home-page "https://www.linphone.org")
291 (synopsis "Utilities library for linphone software")
292 (description "BCtoolbox is a utilities library used by Belledonne
293 Communications software like linphone.")
294 (license license:gpl2+)))
302 (uri (string-append "https://download.savannah.nongnu.org/"
303 "releases/linphone/ortp/sources/ortp-"
307 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
308 (build-system gnu-build-system)
310 `(("bctoolbox" ,bctoolbox)))
312 `(("pkg-config" ,pkg-config)))
313 (home-page "https://linphone.org/")
314 (synopsis "Implementation of the Real-time transport protocol")
315 (description "oRTP is a library implementing the Real-time transport
316 protocol (RFC 3550).")
317 (license license:lgpl2.1+)))
319 (define-public libiax2
320 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
321 ;; This is the commit used by the Ring Project.
324 (version (string-append "0.0.0-1." (string-take commit 7)))
329 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
331 (file-name (git-file-name name version))
334 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
335 (build-system gnu-build-system)
337 `(("autoconf" ,autoconf)
338 ("automake" ,automake)
339 ("libtool" ,libtool)))
340 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
341 (synopsis "Inter-Asterisk-Protocol library")
342 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
343 Voice-over-IP (VoIP) communications.")
344 ;; The file 'src/md5.c' is released into the public domain by RSA Data
345 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
346 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
347 ;; covered under the 'GPL'.
348 ;; The package as a whole is distributed under the LGPL 2.0.
349 (license (list license:lgpl2.0
350 license:public-domain
359 (uri (string-append "http://holdenc.altervista.org/"
360 "seren/downloads/seren-" version
364 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
365 (build-system gnu-build-system)
366 (arguments '(#:tests? #f)) ; no "check" target
368 `(("alsa-lib" ,alsa-lib)
373 (synopsis "Simple VoIP program to create conferences from the terminal")
375 "Seren is a simple VoIP program based on the Opus codec that allows you
376 to create a voice conference from the terminal, with up to 10 participants,
377 without having to register accounts, exchange emails, or add people to contact
378 lists. All you need to join an existing conference is the host name or IP
379 address of one of the participants.")
380 (home-page "http://holdenc.altervista.org/seren/")
381 (license license:gpl3+)))
383 (define-public mumble
389 (uri (string-append "https://mumble.info/snapshot/"
390 name "-" version ".tar.gz"))
393 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
394 (modules '((guix build utils)))
397 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
398 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
400 delete-file-recursively
401 '("3rdparty/GL" ; in mesa
402 "3rdparty/mach-override-build" ; for macx
403 "3rdparty/mach-override-src"
404 "3rdparty/minhook-build" ; for win32
405 "3rdparty/minhook-src"
406 "3rdparty/opus-build" ; in opus
408 "3rdparty/sbcelt-helper-build" ; not enabled
409 "3rdparty/sbcelt-lib-build"
410 "3rdparty/sbcelt-src"
411 "3rdparty/speex-build" ; in speex
413 "3rdparty/speexdsp-src" ; in speexdsp
414 "3rdparty/xinputcheck-build" ; for win32
415 "3rdparty/xinputcheck-src"))
417 (build-system qt-build-system)
419 `(#:tests? #f ; no "check" target
421 (modify-phases %standard-phases
423 (lambda* (#:key inputs outputs #:allow-other-keys)
424 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
425 (string-append "MUMBLE_PYTHON="
426 (string-append (assoc-ref inputs "python")
428 (string-append "CONFIG+="
430 ;; Options used are listed in the same order
431 ;; as in the "INSTALL" file
432 ;; (plus the final "packaged" and "release").
433 (list "no-bundled-speex" ; in speex
434 "no-bundled-opus" ; in opus
435 "no-g15" ; not packaged
436 "no-jackaudio" ; use pulse
438 "no-alsa" ; use pulse
440 "no-embed-qt-translations"
441 "no-ice" ; not packaged
444 (string-append "DEFINES+="
446 (assoc-ref outputs "out")
448 (add-before 'configure 'fix-libspeechd-include
450 (substitute* "src/mumble/TextToSpeech_unix.cpp"
451 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
453 (add-before 'install 'disable-murmur-ice
455 (substitute* "scripts/murmur.ini.system"
458 (replace 'install ; install phase does not exist
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (let* ((out (assoc-ref outputs "out"))
461 (etc (string-append out "/etc/murmur"))
462 (dbus (string-append out "/etc/dbus-1/system.d/"))
463 (bin (string-append out "/bin"))
464 (services (string-append out "/share/services"))
465 (applications (string-append out "/share/applications"))
466 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
467 (man (string-append out "/share/man/man1"))
468 (lib (string-append out "/lib/mumble")))
469 (install-file "release/mumble" bin)
470 (install-file "scripts/mumble-overlay" bin)
471 (install-file "scripts/mumble.protocol" services)
472 (install-file "scripts/mumble.desktop" applications)
473 (install-file "icons/mumble.svg" icons)
474 (install-file "man/mumble-overlay.1" man)
475 (install-file "man/mumble.1" man)
476 (install-file "release/murmurd" bin)
477 (install-file "scripts/murmur.ini.system" etc)
478 (rename-file (string-append etc "/murmur.ini.system")
479 (string-append etc "/murmur.ini"))
480 (install-file "scripts/murmur.conf" dbus)
481 (install-file "man/murmurd.1" man)
482 (for-each (lambda (file) (install-file file lib))
483 (find-files "." "\\.so\\."))
484 (for-each (lambda (file) (install-file file lib))
485 (find-files "release/plugins" "\\.so$"))))))))
489 ("libsndfile" ,libsndfile)
491 ("mesa" ,mesa) ; avoid bundled
493 ("opus" ,opus) ; avoid bundled
494 ("protobuf" ,protobuf)
495 ("pulseaudio" ,pulseaudio)
498 ("speech-dispatcher" ,speech-dispatcher)
499 ("speex" ,speex) ; avoid bundled
500 ("speexdsp" ,speexdsp))) ; avoid bundled
502 `(("pkg-config" ,pkg-config)
504 ("qttools" ,qttools)))
505 (synopsis "Low-latency, high quality voice chat software")
507 "Mumble is an low-latency, high quality voice chat
508 software primarily intended for use while gaming.
509 Mumble consists of two applications for separate usage:
510 @code{mumble} for the client, and @code{murmur} for the server.")
511 (home-page "https://wiki.mumble.info/wiki/Main_Page")
512 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
513 license:bsd-2 ; celt-0.11.0
514 license:isc)))) ; arc4random
516 (define-public twinkle
523 (url "https://github.com/LubosD/twinkle")
524 (commit (string-append "v" version))))
525 (file-name (git-file-name name version))
528 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
529 (build-system cmake-build-system)
531 `(#:tests? #f ; no test target
532 #:configure-flags '("-DWITH_SPEEX=On")
534 (modify-phases %standard-phases
535 (add-after 'install 'wrap-executable
536 (lambda* (#:key inputs outputs #:allow-other-keys)
537 (let ((out (assoc-ref outputs "out")))
538 (wrap-program (string-append out "/bin/twinkle")
539 `("QT_PLUGIN_PATH" ":" prefix
540 ,(map (lambda (label)
541 (string-append (assoc-ref inputs label)
543 '("qtbase" "qtdeclarative")))
544 `("QML2_IMPORT_PATH" ":" prefix
545 ,(map (lambda (label)
546 (string-append (assoc-ref inputs label)
548 '("qtdeclarative" "qtquickcontrols"))))
553 ("readline" ,readline)
559 ("speexdsp" ,speexdsp)
560 ("libsndfile" ,libsndfile)
561 ("alsa-lib" ,alsa-lib)
562 ("qttools" ,qttools)))
565 ("qtdeclarative" ,qtdeclarative)
566 ("qtquickcontrols" ,qtquickcontrols)))
567 (home-page "http://twinkle.dolezel.info/")
568 (synopsis "Softphone for voice over IP and instant messaging")
569 (description "Twinkle is a softphone for your voice over IP and instant
570 messaging communcations using the SIP protocol. You can use it for direct IP
571 phone to IP phone communication or in a network using a SIP proxy to route your
573 (license license:gpl2+)))
575 (define-public pjproject
583 (url "https://github.com/pjsip/pjproject.git")
584 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
585 (modules '((guix build utils)))
588 (let ((third-party-directories
589 ;; Things we don't need:
590 ;; BaseClasses - contains libraries from Windows SDK
591 ;; we don't need it, at least not now.
592 (list "BaseClasses" "g7221" "ilbc" "milenage"
593 "speex" "threademulation" "yuv" "bdsound"
594 "gsm" "mp3" "resample" "srtp" "webrtc"
595 ;; Keep only resample, build and README.txt.
596 "build/baseclasses" "build/g7221" "build/gsm"
597 "build/ilbc" "build/milenage" "build/resample"
598 "build/samplerate" "build/speex" "build/srtp"
599 "build/webrtc" "build/yuv")))
600 ;; Keep only Makefiles related to resample.
601 (for-each (lambda (directory)
602 (delete-file-recursively
603 (string-append "third_party/" directory)))
604 third-party-directories)
606 (let ((third-party-dirs
607 (list "gsm" "ilbc" "speex" "g7221" "srtp"
608 "portaudio" "resample")))
611 (substitute* "third_party/build/os-linux.mak"
612 (((string-append "DIRS += " dirs)) "")))
614 (file-name (git-file-name name version))
617 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
618 (build-system gnu-build-system)
620 `(("portaudio" ,portaudio)))
622 ;; These packages are referenced in the Libs field of the pkg-config
623 ;; file that will be installed by pjproject.
627 ("resample", resample)
628 ("util-linux" ,util-linux)))
630 `(("autoconf" ,autoconf)
631 ("automake" ,automake)
632 ("pkg-config" ,pkg-config)
633 ("libtool" ,libtool)))
635 `(;; FIXME make: No rule to make target
636 ;; 'pjlib-test-unknown-[something]-gnu'.
638 ;; #:test-target "selftest"
640 (modify-phases %standard-phases
641 (add-before 'build 'build-dep
642 (lambda _ (invoke "make" "dep")))
643 (add-before 'patch-source-shebangs 'autoconf
645 (invoke "autoconf" "-v" "-f" "-i" "-o"
646 "aconfigure" "aconfigure.ac")))
647 (add-before 'autoconf 'disable-some-tests
648 ;; Three of the six test programs fail due to missing network
651 (substitute* "Makefile"
652 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
653 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
655 (home-page "https://www.pjsip.org")
656 (synopsis "Session Initiation Protocol (SIP) stack")
657 (description "PJProject provides an implementation of the Session
658 Initiation Protocol (SIP) and a multimedia framework.")
659 (license license:gpl2+)))
661 (define %jami-version "20191101.3.67671e7")
663 (define* (jami-source #:key without-daemon)
666 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
669 (modules '((guix build utils)))
673 (delete-file-recursively "daemon/contrib"))
677 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
679 (define-public pjproject-jami
682 (name "pjproject-jami")
684 `(("savoir-faire-linux-patches" ,(jami-source))
685 ,@(package-native-inputs pjproject)))
688 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
690 (list "--disable-oss"
694 "--disable-speex-aec"
695 "--disable-g711-codec"
696 "--disable-l16-codec"
697 "--disable-gsm-codec"
698 "--disable-g722-codec"
699 "--disable-g7221-codec"
700 "--disable-speex-codec"
701 "--disable-ilbc-codec"
702 "--disable-opencore-amr"
709 "--disable-libwebrtc"
711 "--with-external-srtp"
712 ;; We need -fPIC or else we get the following error when linking
713 ;; against pjproject-jami:
714 ;; relocation R_X86_64_32S against `.rodata' can not be used when
715 ;; making a shared object;
719 (modify-phases %standard-phases
720 (add-after 'unpack 'make-git-checkout-writable
722 (for-each make-file-writable (find-files "."))
724 (add-after 'unpack 'apply-patches
725 (lambda* (#:key inputs #:allow-other-keys)
726 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
728 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
729 ;; WARNING: These amount for huge changes in pjproject.
730 (savoir-faire-linux-patches
731 '("fix_turn_alloc_failure"
737 "fix_ioqueue_ipv6_sendto"
742 "fix_first_packet_turn_tcp"
744 "ignore_ipv6_on_transport_check"
745 "fix_turn_connection_failure"
746 ;; "uwp_vs" ; for windows
747 "disable_local_resolution")))
748 (mkdir-p savoir-faire-linux-patches-directory)
749 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
750 "-C" savoir-faire-linux-patches-directory
751 "--strip-components=5"
752 "ring-project/daemon/contrib/src/pjproject")
755 (invoke "patch" "--force" "-p1" "-i"
756 (string-append savoir-faire-linux-patches-directory "/"
758 savoir-faire-linux-patches))
760 ;; TODO: We could use substitute-keyword-arguments instead of
761 ;; repeating the phases from pjproject, but somehow it does
763 (add-before 'build 'build-dep
764 (lambda _ (invoke "make" "dep")))
765 (add-before 'patch-source-shebangs 'autoconf
767 (invoke "autoconf" "-v" "-f" "-i" "-o"
768 "aconfigure" "aconfigure.ac")))
769 (add-before 'autoconf 'disable-some-tests
770 ;; Three of the six test programs fail due to missing network
773 (substitute* "Makefile"
774 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
775 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
778 (define-public libring
781 (version %jami-version)
782 (source (jami-source #:without-daemon #t))
783 (build-system gnu-build-system)
785 ;; Missing (optional?) dep: libnatpmp.
786 `(("alsa-lib" ,alsa-lib)
788 ("dbus-c++" ,dbus-c++)
801 ("pulseaudio" ,pulseaudio)
802 ("libsamplerate" ,libsamplerate)
803 ("libsndfile" ,libsndfile)
805 ("speexdsp" ,speexdsp)
807 ("libvorbis" ,libvorbis)
809 ("libvdpau" ,libvdpau)
810 ("yaml-cpp" ,yaml-cpp)
813 ("libsecp256k1" ,libsecp256k1)
815 ("python-wrapper" ,python-wrapper)
816 ("restinio" ,restinio)
819 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
820 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
821 ("pjproject" ,pjproject-jami)))
823 `(("autoconf" ,autoconf)
824 ("automake" ,automake)
826 ("pkg-config" ,pkg-config)
829 ("perl" ,perl))) ; Needed for documentation.
831 `(#:tests? #f ; The tests fail to compile due to missing headers.
833 (modify-phases %standard-phases
834 (add-after 'unpack 'change-directory
838 (add-before 'build 'add-lib-dir
842 (synopsis "Distributed multimedia communications platform")
843 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
844 video and chat communication platform that requires no centralized server and
845 leaves the power of privacy in the hands of the user. It supports the SIP and
846 IAX protocols, as well as decentralized calling using P2P-DHT.
848 This package provides a library and daemon implementing the Jami core
850 (home-page "https://jami.net/")
851 (license license:gpl3+)))
853 (define-public libringclient
856 (name "libringclient")
857 (build-system cmake-build-system)
859 `(("libring" ,libring) ; For 'dring'.
860 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
861 ("qttools" ,qttools)))
863 `(#:tests? #f ; There is no testsuite.
865 (list (string-append "-DRING_BUILD_DIR="
866 (assoc-ref %build-inputs "libring") "/include"))
868 (modify-phases %standard-phases
869 (add-after 'unpack 'change-directory
873 (add-before 'configure 'fix-dbus-interfaces-path
874 (lambda* (#:key inputs #:allow-other-keys)
875 (substitute* "CMakeLists.txt"
876 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
877 (string-append (assoc-ref inputs "libring")
878 dbus-interfaces-path-suffix))))))))
879 (synopsis "Distributed multimedia communications platform")
880 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
881 video and chat communication platform that requires no centralized server and
882 leaves the power of privacy in the hands of the user. It supports the SIP and
883 IAX protocols, as well as decentralized calling using P2P-DHT.
885 This package provides a library common to all Jami clients.")
886 (home-page "https://jami.net")
887 (license license:gpl3+)))
893 (build-system cmake-build-system)
895 `(("libringclient" ,libringclient)
897 ("qrencode" ,qrencode)
898 ("libnotify" ,libnotify)
900 ("clutter-gtk" ,clutter-gtk)
901 ("gettext" ,gnu-gettext)
902 ("libcanberra" ,libcanberra)
903 ("webkitgtk" ,webkitgtk)
904 ;; TODO: We must wrap ring-client-gnome to force using the
905 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
908 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
909 ;; undefined symbol: sqlite3_column_table_name16
911 ;; qtbase is built against sqlite-with-column-metadata but somehow
912 ;; jami-client-gnome ends up with both `sqlite' and
913 ;; `sqlite-with-column-metadata' as inputs and it seems that
914 ;; libqsqlite.so gets confused.
915 ("sqlite" ,sqlite-with-column-metadata)))
917 `(("pkg-config" ,pkg-config)
918 ("glib:bin" ,glib "bin")
919 ("doxygen" ,doxygen)))
921 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
922 ("adwaita-icon-theme" ,adwaita-icon-theme)
923 ("evolution-data-server" ,evolution-data-server)))
925 `(#:tests? #f ; There is no testsuite.
927 (modify-phases %standard-phases
928 (add-after 'unpack 'change-directory
930 (chdir "client-gnome")
932 (add-after 'install 'wrap
933 (lambda* (#:key inputs outputs #:allow-other-keys)
934 (let* ((out (assoc-ref outputs "out"))
935 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
936 (wrap-program (string-append out "/bin/jami-gnome")
937 `("LD_LIBRARY_PATH" ":" prefix (,path))))
939 (synopsis "Distributed, privacy-respecting communication program")
940 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
941 video and chat communication platform that requires no centralized server and
942 leaves the power of privacy in the hands of the user. It supports the SIP and
943 IAX protocols, as well as decentralized calling using P2P-DHT.
945 This package provides the Jami client for the GNOME desktop.")
946 (home-page "https://jami.net")
947 (license license:gpl3+)))
949 (define-public jami-client-gnome
950 (deprecated-package "jami-client-gnome" jami))
952 (define-public libtgvoip
960 (url "https://github.com/grishka/libtgvoip.git")
962 (file-name (git-file-name name version))
965 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
966 (build-system gnu-build-system)
968 `(("alsa-lib" ,alsa-lib)
969 ("libopusenc" ,libopusenc)
971 ("pulseaudio" ,pulseaudio)))
972 (synopsis "VoIP library for Telegram clients")
973 (description "A collection of libraries and header files for implementing
974 telephony functionality into custom Telegram clients.")
975 (home-page "https://github.com/zevlg/libtgvoip")
976 (license license:unlicense)))