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 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 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
260 `(("psmisc" ,psmisc) ;some tests require 'killall'
262 (build-system gnu-build-system)
264 '(#:test-target "runtest"
265 #:phases (modify-phases %standard-phases
266 (add-after 'build 'build-shared
267 (lambda* (#:key (make-flags '()) #:allow-other-keys)
268 ;; Build the shared library separately because
269 ;; the test runner requires a static build.
270 (apply invoke "make" "shared_library" make-flags)
272 (add-after 'install 'remove-static-library
273 (lambda* (#:key outputs #:allow-other-keys)
274 (delete-file (string-append (assoc-ref outputs "out")
277 (synopsis "Secure RTP (SRTP) Reference Implementation")
279 "This package provides an implementation of the Secure Real-time Transport
280 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
281 supporting cryptographic kernel.")
282 (home-page "https://github.com/cisco/libsrtp")
283 (license license:bsd-3)))
285 (define-public bctoolbox
291 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
295 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
296 (build-system gnu-build-system)
297 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
301 `(("mbedtls" ,mbedtls-apache)))
302 (home-page "https://www.linphone.org")
303 (synopsis "Utilities library for linphone software")
304 (description "BCtoolbox is a utilities library used by Belledonne
305 Communications software like linphone.")
306 (license license:gpl2+)))
314 (uri (string-append "https://download.savannah.nongnu.org/"
315 "releases/linphone/ortp/sources/ortp-"
319 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
320 (build-system gnu-build-system)
322 `(("bctoolbox" ,bctoolbox)))
324 `(("pkg-config" ,pkg-config)))
325 (home-page "https://linphone.org/")
326 (synopsis "Implementation of the Real-time transport protocol")
327 (description "oRTP is a library implementing the Real-time transport
328 protocol (RFC 3550).")
329 (license license:lgpl2.1+)))
331 (define-public libiax2
332 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
333 ;; This is the commit used by the Ring Project.
336 (version (string-append "0.0.0-1." (string-take commit 7)))
341 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
343 (file-name (git-file-name name version))
346 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
347 (build-system gnu-build-system)
349 `(("autoconf" ,autoconf)
350 ("automake" ,automake)
351 ("libtool" ,libtool)))
352 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
353 (synopsis "Inter-Asterisk-Protocol library")
354 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
355 Voice-over-IP (VoIP) communications.")
356 ;; The file 'src/md5.c' is released into the public domain by RSA Data
357 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
358 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
359 ;; covered under the 'GPL'.
360 ;; The package as a whole is distributed under the LGPL 2.0.
361 (license (list license:lgpl2.0
362 license:public-domain
371 (uri (string-append "http://holdenc.altervista.org/"
372 "seren/downloads/seren-" version
376 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
377 (build-system gnu-build-system)
378 (arguments '(#:tests? #f)) ; no "check" target
380 `(("alsa-lib" ,alsa-lib)
385 (synopsis "Simple VoIP program to create conferences from the terminal")
387 "Seren is a simple VoIP program based on the Opus codec that allows you
388 to create a voice conference from the terminal, with up to 10 participants,
389 without having to register accounts, exchange emails, or add people to contact
390 lists. All you need to join an existing conference is the host name or IP
391 address of one of the participants.")
392 (home-page "http://holdenc.altervista.org/seren/")
393 (license license:gpl3+)))
395 (define-public mumble
401 (uri (string-append "https://mumble.info/snapshot/"
402 name "-" version ".tar.gz"))
405 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
406 (modules '((guix build utils)))
409 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
410 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
412 delete-file-recursively
413 '("3rdparty/GL" ; in mesa
414 "3rdparty/mach-override-build" ; for macx
415 "3rdparty/mach-override-src"
416 "3rdparty/minhook-build" ; for win32
417 "3rdparty/minhook-src"
418 "3rdparty/opus-build" ; in opus
420 "3rdparty/sbcelt-helper-build" ; not enabled
421 "3rdparty/sbcelt-lib-build"
422 "3rdparty/sbcelt-src"
423 "3rdparty/speex-build" ; in speex
425 "3rdparty/speexdsp-src" ; in speexdsp
426 "3rdparty/xinputcheck-build" ; for win32
427 "3rdparty/xinputcheck-src"))
429 (build-system qt-build-system)
431 `(#:tests? #f ; no "check" target
433 (modify-phases %standard-phases
435 (lambda* (#:key inputs outputs #:allow-other-keys)
436 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
437 (string-append "MUMBLE_PYTHON="
438 (string-append (assoc-ref inputs "python")
440 (string-append "CONFIG+="
442 ;; Options used are listed in the same order
443 ;; as in the "INSTALL" file
444 ;; (plus the final "packaged" and "release").
445 (list "no-bundled-speex" ; in speex
446 "no-bundled-opus" ; in opus
447 "no-g15" ; not packaged
448 "no-jackaudio" ; use pulse
450 "no-alsa" ; use pulse
452 "no-embed-qt-translations"
453 "no-ice" ; not packaged
456 (string-append "DEFINES+="
458 (assoc-ref outputs "out")
460 (add-before 'configure 'fix-libspeechd-include
462 (substitute* "src/mumble/TextToSpeech_unix.cpp"
463 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
465 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
466 (add-before 'configure 'fix-statistic-gathering-default
468 (substitute* "src/mumble/Settings.cpp"
469 (("bUsage = true;") "bUsage = false;"))
471 (add-before 'install 'disable-murmur-ice
473 (substitute* "scripts/murmur.ini.system"
476 (replace 'install ; install phase does not exist
477 (lambda* (#:key inputs outputs #:allow-other-keys)
478 (let* ((out (assoc-ref outputs "out"))
479 (etc (string-append out "/etc/murmur"))
480 (dbus (string-append out "/etc/dbus-1/system.d/"))
481 (bin (string-append out "/bin"))
482 (services (string-append out "/share/services"))
483 (applications (string-append out "/share/applications"))
484 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
485 (man (string-append out "/share/man/man1"))
486 (lib (string-append out "/lib/mumble")))
487 (install-file "release/mumble" bin)
488 (install-file "scripts/mumble-overlay" bin)
489 (install-file "scripts/mumble.protocol" services)
490 (install-file "scripts/mumble.desktop" applications)
491 (install-file "icons/mumble.svg" icons)
492 (install-file "man/mumble-overlay.1" man)
493 (install-file "man/mumble.1" man)
494 (install-file "release/murmurd" bin)
495 (install-file "scripts/murmur.ini.system" etc)
496 (rename-file (string-append etc "/murmur.ini.system")
497 (string-append etc "/murmur.ini"))
498 (install-file "scripts/murmur.conf" dbus)
499 (install-file "man/murmurd.1" man)
500 (for-each (lambda (file) (install-file file lib))
501 (find-files "." "\\.so\\."))
502 (for-each (lambda (file) (install-file file lib))
503 (find-files "release/plugins" "\\.so$"))))))))
507 ("libsndfile" ,libsndfile)
509 ("mesa" ,mesa) ; avoid bundled
511 ("opus" ,opus) ; avoid bundled
512 ("protobuf" ,protobuf)
513 ("pulseaudio" ,pulseaudio)
516 ("speech-dispatcher" ,speech-dispatcher)
517 ("speex" ,speex) ; avoid bundled
518 ("speexdsp" ,speexdsp))) ; avoid bundled
520 `(("pkg-config" ,pkg-config)
522 ("qttools" ,qttools)))
523 (synopsis "Low-latency, high quality voice chat software")
525 "Mumble is an low-latency, high quality voice chat
526 software primarily intended for use while gaming.
527 Mumble consists of two applications for separate usage:
528 @code{mumble} for the client, and @code{murmur} for the server.")
529 (home-page "https://wiki.mumble.info/wiki/Main_Page")
530 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
531 license:bsd-2 ; celt-0.11.0
532 license:isc)))) ; arc4random
534 (define-public twinkle
541 (url "https://github.com/LubosD/twinkle")
542 (commit (string-append "v" version))))
543 (file-name (git-file-name name version))
546 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
547 (build-system cmake-build-system)
549 `(#:tests? #f ; no test target
550 #:configure-flags '("-DWITH_SPEEX=On")
552 (modify-phases %standard-phases
553 (add-after 'install 'wrap-executable
554 (lambda* (#:key inputs outputs #:allow-other-keys)
555 (let ((out (assoc-ref outputs "out")))
556 (wrap-program (string-append out "/bin/twinkle")
557 `("QT_PLUGIN_PATH" ":" prefix
558 ,(map (lambda (label)
559 (string-append (assoc-ref inputs label)
561 '("qtbase" "qtdeclarative")))
562 `("QML2_IMPORT_PATH" ":" prefix
563 ,(map (lambda (label)
564 (string-append (assoc-ref inputs label)
566 '("qtdeclarative" "qtquickcontrols"))))
571 ("readline" ,readline)
577 ("speexdsp" ,speexdsp)
578 ("libsndfile" ,libsndfile)
579 ("alsa-lib" ,alsa-lib)
580 ("qttools" ,qttools)))
583 ("qtdeclarative" ,qtdeclarative)
584 ("qtquickcontrols" ,qtquickcontrols)))
585 (home-page "http://twinkle.dolezel.info/")
586 (synopsis "Softphone for voice over IP and instant messaging")
587 (description "Twinkle is a softphone for your voice over IP and instant
588 messaging communcations using the SIP protocol. You can use it for direct IP
589 phone to IP phone communication or in a network using a SIP proxy to route your
591 (license license:gpl2+)))
593 (define-public pjproject
601 (url "https://github.com/pjsip/pjproject.git")
602 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
603 (modules '((guix build utils)))
606 (let ((third-party-directories
607 ;; Things we don't need:
608 ;; BaseClasses - contains libraries from Windows SDK
609 ;; we don't need it, at least not now.
610 (list "BaseClasses" "g7221" "ilbc" "milenage"
611 "speex" "threademulation" "yuv" "bdsound"
612 "gsm" "mp3" "resample" "srtp" "webrtc"
613 ;; Keep only resample, build and README.txt.
614 "build/baseclasses" "build/g7221" "build/gsm"
615 "build/ilbc" "build/milenage" "build/resample"
616 "build/samplerate" "build/speex" "build/srtp"
617 "build/webrtc" "build/yuv")))
618 ;; Keep only Makefiles related to resample.
619 (for-each (lambda (directory)
620 (delete-file-recursively
621 (string-append "third_party/" directory)))
622 third-party-directories)
624 (let ((third-party-dirs
625 (list "gsm" "ilbc" "speex" "g7221" "srtp"
626 "portaudio" "resample")))
629 (substitute* "third_party/build/os-linux.mak"
630 (((string-append "DIRS += " dirs)) "")))
632 (file-name (git-file-name name version))
635 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
636 (build-system gnu-build-system)
638 `(("portaudio" ,portaudio)))
640 ;; These packages are referenced in the Libs field of the pkg-config
641 ;; file that will be installed by pjproject.
645 ("resample", resample)
646 ("util-linux" ,util-linux "lib")))
648 `(("autoconf" ,autoconf)
649 ("automake" ,automake)
650 ("pkg-config" ,pkg-config)
651 ("libtool" ,libtool)))
653 `(;; FIXME make: No rule to make target
654 ;; 'pjlib-test-unknown-[something]-gnu'.
656 ;; #:test-target "selftest"
658 (modify-phases %standard-phases
659 (add-before 'build 'build-dep
660 (lambda _ (invoke "make" "dep")))
661 (add-before 'patch-source-shebangs 'autoconf
663 (invoke "autoconf" "-v" "-f" "-i" "-o"
664 "aconfigure" "aconfigure.ac")))
665 (add-before 'autoconf 'disable-some-tests
666 ;; Three of the six test programs fail due to missing network
669 (substitute* "Makefile"
670 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
671 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
673 (home-page "https://www.pjsip.org")
674 (synopsis "Session Initiation Protocol (SIP) stack")
675 (description "PJProject provides an implementation of the Session
676 Initiation Protocol (SIP) and a multimedia framework.")
677 (license license:gpl2+)))
679 (define %jami-version "20191101.3.67671e7")
681 (define* (jami-source #:key without-daemon)
684 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
687 (modules '((guix build utils)))
691 (delete-file-recursively "daemon/contrib"))
695 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
697 (define-public pjproject-jami
700 (name "pjproject-jami")
702 `(("savoir-faire-linux-patches" ,(jami-source))
703 ,@(package-native-inputs pjproject)))
706 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
708 (list "--disable-oss"
712 "--disable-speex-aec"
713 "--disable-g711-codec"
714 "--disable-l16-codec"
715 "--disable-gsm-codec"
716 "--disable-g722-codec"
717 "--disable-g7221-codec"
718 "--disable-speex-codec"
719 "--disable-ilbc-codec"
720 "--disable-opencore-amr"
727 "--disable-libwebrtc"
729 "--with-external-srtp"
730 ;; We need -fPIC or else we get the following error when linking
731 ;; against pjproject-jami:
732 ;; relocation R_X86_64_32S against `.rodata' can not be used when
733 ;; making a shared object;
737 (modify-phases %standard-phases
738 (add-after 'unpack 'make-git-checkout-writable
740 (for-each make-file-writable (find-files "."))
742 (add-after 'unpack 'apply-patches
743 (lambda* (#:key inputs #:allow-other-keys)
744 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
746 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
747 ;; WARNING: These amount for huge changes in pjproject.
748 (savoir-faire-linux-patches
749 '("fix_turn_alloc_failure"
755 "fix_ioqueue_ipv6_sendto"
760 "fix_first_packet_turn_tcp"
762 "ignore_ipv6_on_transport_check"
763 "fix_turn_connection_failure"
764 ;; "uwp_vs" ; for windows
765 "disable_local_resolution")))
766 (mkdir-p savoir-faire-linux-patches-directory)
767 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
768 "-C" savoir-faire-linux-patches-directory
769 "--strip-components=5"
770 "ring-project/daemon/contrib/src/pjproject")
773 (invoke "patch" "--force" "-p1" "-i"
774 (string-append savoir-faire-linux-patches-directory "/"
776 savoir-faire-linux-patches))
778 ;; TODO: We could use substitute-keyword-arguments instead of
779 ;; repeating the phases from pjproject, but somehow it does
781 (add-before 'build 'build-dep
782 (lambda _ (invoke "make" "dep")))
783 (add-before 'patch-source-shebangs 'autoconf
785 (invoke "autoconf" "-v" "-f" "-i" "-o"
786 "aconfigure" "aconfigure.ac")))
787 (add-before 'autoconf 'disable-some-tests
788 ;; Three of the six test programs fail due to missing network
791 (substitute* "Makefile"
792 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
793 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
796 (define-public libring
799 (version %jami-version)
800 (source (jami-source #:without-daemon #t))
801 (build-system gnu-build-system)
803 ;; Missing (optional?) dep: libnatpmp.
804 `(("alsa-lib" ,alsa-lib)
806 ("dbus-c++" ,dbus-c++)
819 ("pulseaudio" ,pulseaudio)
820 ("libsamplerate" ,libsamplerate)
821 ("libsndfile" ,libsndfile)
823 ("speexdsp" ,speexdsp)
825 ("libvorbis" ,libvorbis)
827 ("libvdpau" ,libvdpau)
828 ("yaml-cpp" ,yaml-cpp)
831 ("libsecp256k1" ,libsecp256k1)
833 ("python-wrapper" ,python-wrapper)
834 ("restinio" ,restinio)
837 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
838 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
839 ("pjproject" ,pjproject-jami)))
841 `(("autoconf" ,autoconf)
842 ("automake" ,automake)
844 ("pkg-config" ,pkg-config)
847 ("perl" ,perl))) ; Needed for documentation.
849 `(#:tests? #f ; The tests fail to compile due to missing headers.
851 (modify-phases %standard-phases
852 (add-after 'unpack 'change-directory
856 (add-before 'build 'add-lib-dir
860 (synopsis "Distributed multimedia communications platform")
861 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
862 video and chat communication platform that requires no centralized server and
863 leaves the power of privacy in the hands of the user. It supports the SIP and
864 IAX protocols, as well as decentralized calling using P2P-DHT.
866 This package provides a library and daemon implementing the Jami core
868 (home-page "https://jami.net/")
869 (license license:gpl3+)))
871 (define-public libringclient
874 (name "libringclient")
875 (build-system cmake-build-system)
877 `(("libring" ,libring) ; For 'dring'.
878 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
879 ("qttools" ,qttools)))
881 `(#:tests? #f ; There is no testsuite.
883 (list (string-append "-DRING_BUILD_DIR="
884 (assoc-ref %build-inputs "libring") "/include"))
886 (modify-phases %standard-phases
887 (add-after 'unpack 'change-directory
891 (add-before 'configure 'fix-dbus-interfaces-path
892 (lambda* (#:key inputs #:allow-other-keys)
893 (substitute* "CMakeLists.txt"
894 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
895 (string-append (assoc-ref inputs "libring")
896 dbus-interfaces-path-suffix))))))))
897 (synopsis "Distributed multimedia communications platform")
898 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
899 video and chat communication platform that requires no centralized server and
900 leaves the power of privacy in the hands of the user. It supports the SIP and
901 IAX protocols, as well as decentralized calling using P2P-DHT.
903 This package provides a library common to all Jami clients.")
904 (home-page "https://jami.net")
905 (license license:gpl3+)))
911 (build-system cmake-build-system)
913 `(("libringclient" ,libringclient)
915 ("qrencode" ,qrencode)
916 ("libnotify" ,libnotify)
918 ("clutter-gtk" ,clutter-gtk)
919 ("gettext" ,gnu-gettext)
920 ("libcanberra" ,libcanberra)
921 ("webkitgtk" ,webkitgtk)))
923 `(("pkg-config" ,pkg-config)
924 ("glib:bin" ,glib "bin")
925 ("doxygen" ,doxygen)))
927 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
928 ("adwaita-icon-theme" ,adwaita-icon-theme)
929 ("evolution-data-server" ,evolution-data-server)))
931 `(#:tests? #f ; There is no testsuite.
933 (modify-phases %standard-phases
934 (add-after 'unpack 'change-directory
936 (chdir "client-gnome")
938 (synopsis "Distributed, privacy-respecting communication program")
939 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
940 video and chat communication platform that requires no centralized server and
941 leaves the power of privacy in the hands of the user. It supports the SIP and
942 IAX protocols, as well as decentralized calling using P2P-DHT.
944 This package provides the Jami client for the GNOME desktop.")
945 (home-page "https://jami.net")
946 (license license:gpl3+)))
948 (define-public jami-client-gnome
949 (deprecated-package "jami-client-gnome" jami))
951 (define-public libtgvoip
959 (url "https://github.com/grishka/libtgvoip.git")
961 (file-name (git-file-name name version))
962 ;; Fix compilation on i686-linux architecture.
963 ;; NOTE: Applying these patches is order-dependent!
964 ;; The patch for WebRTC /must/ precede the patch for SSE2.
966 (search-patches "libtgvoip-disable-webrtc.patch"
967 "libtgvoip-disable-sse2.patch"))
970 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
971 (build-system gnu-build-system)
973 `(("alsa-lib" ,alsa-lib)
974 ("libopusenc" ,libopusenc)
976 ("pulseaudio" ,pulseaudio)))
977 (synopsis "VoIP library for Telegram clients")
978 (description "A collection of libraries and header files for implementing
979 telephony functionality into custom Telegram clients.")
980 (home-page "https://github.com/zevlg/libtgvoip")
981 (license license:unlicense)))