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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages telephony)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages aidc)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages avahi)
38 #:use-module (gnu packages audio)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages crypto)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages file)
46 #:use-module (gnu packages protobuf)
47 #:use-module (gnu packages gettext)
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages libcanberra)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages multiprecision)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages networking)
58 #:use-module (gnu packages pcre)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages pulseaudio)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages qt)
64 #:use-module (gnu packages serialization)
65 #:use-module (gnu packages speech)
66 #:use-module (gnu packages sqlite)
67 #:use-module (gnu packages tls)
68 #:use-module (gnu packages upnp)
69 #:use-module (gnu packages video)
70 #:use-module (gnu packages webkit)
71 #:use-module (gnu packages xiph)
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages bison)
76 #:use-module (gnu packages flex)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (guix packages)
79 #:use-module (guix download)
80 #:use-module (guix git-download)
81 #:use-module (guix build-system cmake)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system qt))
85 (define-public commoncpp
91 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
94 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
97 (modify-phases %standard-phases
98 (add-before 'configure 'pre-configure
100 (substitute* "src/applog.cpp"
101 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
103 (build-system gnu-build-system)
104 (synopsis "(u)Common C++ framework for threaded applications")
105 (description "GNU Common C++ is an portable, optimized class framework for
106 threaded applications, supporting concurrent synchronization, inter-process
107 communications via sockets, and various methods for data handling, such as
108 serialization and XML parsing. It includes the uCommon C++ library, a smaller
110 (license license:gpl2+) ; plus runtime exception
111 (home-page "https://www.gnu.org/software/commoncpp/")))
113 (define-public ucommon
119 (uri (string-append "mirror://gnu/commoncpp/" name "-"
122 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
123 (build-system gnu-build-system)
124 (inputs `(("gnutls" ,gnutls)))
125 (synopsis "Common C++ framework for threaded applications")
126 (description "GNU uCommon C++ is meant as a very light-weight C++ library
127 to facilitate using C++ design patterns even for very deeply embedded
128 applications, such as for systems using uclibc along with posix threading
130 (license license:gpl3+)
131 (home-page "https://www.gnu.org/software/commoncpp/")
132 (properties '((ftp-directory . "/gnu/commoncpp")))))
140 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
143 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
144 (build-system gnu-build-system)
145 (inputs `(("ucommon" ,ucommon)
146 ("libgcrypt" ,libgcrypt)))
147 (native-inputs `(("pkg-config" ,pkg-config)))
148 (synopsis "Implementation of RTP (real-time transport protocol)")
149 (description "GNU ccRTP is an implementation of RTP, the real-time transport
150 protocol from the IETF. It is suitable both for high capacity servers and
151 personal client applications. It is flexible in its design, allowing it to
152 function as a framework for the framework, rather than just being a
153 packet-manipulation library.")
154 (license license:gpl2+) ; plus runtime exception
155 (home-page "https://www.gnu.org/software/ccrtp/")))
164 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
165 (patches (search-patches "osip-CVE-2017-7853.patch"))
168 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
169 (build-system gnu-build-system)
171 (synopsis "Library implementing SIP (RFC-3261)")
172 (description "GNU oSIP is an implementation of the SIP protocol. It is
173 used to provide multimedia and telecom software developers with an interface
174 to initiate and control SIP sessions.")
175 (license license:lgpl2.1+)
176 (home-page "https://www.gnu.org/software/osip/")))
179 (define-public exosip
185 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
188 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
189 (build-system gnu-build-system)
190 (inputs `(("osip" ,osip)))
191 (synopsis "Sip abstraction library")
192 (description "EXosip is a library that hides the complexity of using the
193 SIP protocol for multimedia session establishment. This protocol is mainly to
194 be used by VoIP telephony applications (endpoints or conference server) but
195 might be also useful for any application that wish to establish sessions like
197 (license license:gpl2+)
198 ;; (plus OpenSSL linking exception)
199 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
200 (home-page "https://savannah.nongnu.org/projects/exosip")))
202 (define-public sipwitch
208 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
211 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
212 (build-system gnu-build-system)
213 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
214 ;; cross-compiling. Among other issues there the program name "pkg-config"
215 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
216 ;; Fortunately we can avoid the use of pkg-config and set the dependency
218 (arguments `(#:configure-flags
219 `("--without-pkg-config"
220 ,(string-append "UCOMMON_CFLAGS=-I"
221 (assoc-ref %build-inputs "ucommon") "/include")
222 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
223 ,(string-append "LIBOSIP2_CFLAGS=-I"
224 (assoc-ref %build-inputs "osip") "/include")
225 "LIBOSIP2_LIBS=-losipparser2 -losip2"
226 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
228 "EXOSIP2_LIBS=-leXosip2"
229 ,(string-append "EXOSIP2_CFLAGS=-I"
230 (assoc-ref %build-inputs "exosip")
232 (inputs `(("ucommon" ,ucommon)
235 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
236 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
237 uses the SIP protocol. Calls can be made from behind NAT firewalls and
238 without the need for a service provider. Its peer-to-peer design ensures that
239 there is no central point for media intercept or capture and thus it can be
240 used to construct a secure telephone system that operates over the public
242 (license license:gpl3+)
243 (home-page "https://www.gnu.org/software/sipwitch/")))
245 (define-public libsrtp
252 (url "https://github.com/cisco/libsrtp")
253 (commit (string-append "v" version))))
254 (file-name (git-file-name name version))
257 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
259 `(("psmisc" ,psmisc) ;some tests require 'killall'
261 (build-system gnu-build-system)
263 '(#:test-target "runtest"))
264 (synopsis "Secure RTP (SRTP) Reference Implementation")
266 "This package provides an implementation of the Secure Real-time Transport
267 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
268 supporting cryptographic kernel.")
269 (home-page "https://github.com/cisco/libsrtp")
270 (license license:bsd-3)))
272 (define-public bctoolbox
278 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
282 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
283 (build-system gnu-build-system)
284 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
288 `(("mbedtls" ,mbedtls-apache)))
289 (home-page "https://www.linphone.org")
290 (synopsis "Utilities library for linphone software")
291 (description "BCtoolbox is a utilities library used by Belledonne
292 Communications software like linphone.")
293 (license license:gpl2+)))
301 (uri (string-append "https://download.savannah.nongnu.org/"
302 "releases/linphone/ortp/sources/ortp-"
306 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
307 (build-system gnu-build-system)
309 `(("bctoolbox" ,bctoolbox)))
311 `(("pkg-config" ,pkg-config)))
312 (home-page "https://linphone.org/")
313 (synopsis "Implementation of the Real-time transport protocol")
314 (description "oRTP is a library implementing the Real-time transport
315 protocol (RFC 3550).")
316 (license license:lgpl2.1+)))
318 (define-public libiax2
319 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
320 ;; This is the commit used by the Ring Project.
323 (version (string-append "0.0.0-1." (string-take commit 7)))
328 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
330 (file-name (git-file-name name version))
333 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
334 (build-system gnu-build-system)
336 `(("autoconf" ,autoconf)
337 ("automake" ,automake)
338 ("libtool" ,libtool)))
339 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
340 (synopsis "Inter-Asterisk-Protocol library")
341 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
342 Voice-over-IP (VoIP) communications.")
343 ;; The file 'src/md5.c' is released into the public domain by RSA Data
344 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
345 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
346 ;; covered under the 'GPL'.
347 ;; The package as a whole is distributed under the LGPL 2.0.
348 (license (list license:lgpl2.0
349 license:public-domain
358 (uri (string-append "http://holdenc.altervista.org/"
359 "seren/downloads/seren-" version
363 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
364 (build-system gnu-build-system)
365 (arguments '(#:tests? #f)) ; no "check" target
367 `(("alsa-lib" ,alsa-lib)
372 (synopsis "Simple VoIP program to create conferences from the terminal")
374 "Seren is a simple VoIP program based on the Opus codec that allows you
375 to create a voice conference from the terminal, with up to 10 participants,
376 without having to register accounts, exchange emails, or add people to contact
377 lists. All you need to join an existing conference is the host name or IP
378 address of one of the participants.")
379 (home-page "http://holdenc.altervista.org/seren/")
380 (license license:gpl3+)))
382 (define-public mumble
388 (uri (string-append "https://mumble.info/snapshot/"
389 name "-" version ".tar.gz"))
392 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
393 (modules '((guix build utils)))
396 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
397 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
399 delete-file-recursively
400 '("3rdparty/GL" ; in mesa
401 "3rdparty/mach-override-build" ; for macx
402 "3rdparty/mach-override-src"
403 "3rdparty/minhook-build" ; for win32
404 "3rdparty/minhook-src"
405 "3rdparty/opus-build" ; in opus
407 "3rdparty/sbcelt-helper-build" ; not enabled
408 "3rdparty/sbcelt-lib-build"
409 "3rdparty/sbcelt-src"
410 "3rdparty/speex-build" ; in speex
412 "3rdparty/speexdsp-src" ; in speexdsp
413 "3rdparty/xinputcheck-build" ; for win32
414 "3rdparty/xinputcheck-src"))
416 (build-system qt-build-system)
418 `(#:tests? #f ; no "check" target
420 (modify-phases %standard-phases
422 (lambda* (#:key inputs outputs #:allow-other-keys)
423 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
424 (string-append "MUMBLE_PYTHON="
425 (string-append (assoc-ref inputs "python")
427 (string-append "CONFIG+="
429 ;; Options used are listed in the same order
430 ;; as in the "INSTALL" file
431 ;; (plus the final "packaged" and "release").
432 (list "no-bundled-speex" ; in speex
433 "no-bundled-opus" ; in opus
434 "no-g15" ; not packaged
435 "no-jackaudio" ; use pulse
437 "no-alsa" ; use pulse
439 "no-embed-qt-translations"
440 "no-ice" ; not packaged
443 (string-append "DEFINES+="
445 (assoc-ref outputs "out")
447 (add-before 'configure 'fix-libspeechd-include
449 (substitute* "src/mumble/TextToSpeech_unix.cpp"
450 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
452 (add-before 'install 'disable-murmur-ice
454 (substitute* "scripts/murmur.ini.system"
457 (replace 'install ; install phase does not exist
458 (lambda* (#:key inputs outputs #:allow-other-keys)
459 (let* ((out (assoc-ref outputs "out"))
460 (etc (string-append out "/etc/murmur"))
461 (dbus (string-append out "/etc/dbus-1/system.d/"))
462 (bin (string-append out "/bin"))
463 (services (string-append out "/share/services"))
464 (applications (string-append out "/share/applications"))
465 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
466 (man (string-append out "/share/man/man1"))
467 (lib (string-append out "/lib/mumble")))
468 (install-file "release/mumble" bin)
469 (install-file "scripts/mumble-overlay" bin)
470 (install-file "scripts/mumble.protocol" services)
471 (install-file "scripts/mumble.desktop" applications)
472 (install-file "icons/mumble.svg" icons)
473 (install-file "man/mumble-overlay.1" man)
474 (install-file "man/mumble.1" man)
475 (install-file "release/murmurd" bin)
476 (install-file "scripts/murmur.ini.system" etc)
477 (rename-file (string-append etc "/murmur.ini.system")
478 (string-append etc "/murmur.ini"))
479 (install-file "scripts/murmur.conf" dbus)
480 (install-file "man/murmurd.1" man)
481 (for-each (lambda (file) (install-file file lib))
482 (find-files "." "\\.so\\."))
483 (for-each (lambda (file) (install-file file lib))
484 (find-files "release/plugins" "\\.so$"))))))))
488 ("libsndfile" ,libsndfile)
490 ("mesa" ,mesa) ; avoid bundled
492 ("opus" ,opus) ; avoid bundled
493 ("protobuf" ,protobuf)
494 ("pulseaudio" ,pulseaudio)
497 ("speech-dispatcher" ,speech-dispatcher)
498 ("speex" ,speex) ; avoid bundled
499 ("speexdsp" ,speexdsp))) ; avoid bundled
501 `(("pkg-config" ,pkg-config)
503 ("qttools" ,qttools)))
504 (synopsis "Low-latency, high quality voice chat software")
506 "Mumble is an low-latency, high quality voice chat
507 software primarily intended for use while gaming.
508 Mumble consists of two applications for separate usage:
509 @code{mumble} for the client, and @code{murmur} for the server.")
510 (home-page "https://wiki.mumble.info/wiki/Main_Page")
511 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
512 license:bsd-2 ; celt-0.11.0
513 license:isc)))) ; arc4random
515 (define-public twinkle
522 (url "https://github.com/LubosD/twinkle")
523 (commit (string-append "v" version))))
524 (file-name (git-file-name name version))
527 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
528 (build-system cmake-build-system)
530 `(#:tests? #f ; no test target
531 #:configure-flags '("-DWITH_SPEEX=On")
533 (modify-phases %standard-phases
534 (add-after 'install 'wrap-executable
535 (lambda* (#:key inputs outputs #:allow-other-keys)
536 (let ((out (assoc-ref outputs "out")))
537 (wrap-program (string-append out "/bin/twinkle")
538 `("QT_PLUGIN_PATH" ":" prefix
539 ,(map (lambda (label)
540 (string-append (assoc-ref inputs label)
542 '("qtbase" "qtdeclarative")))
543 `("QML2_IMPORT_PATH" ":" prefix
544 ,(map (lambda (label)
545 (string-append (assoc-ref inputs label)
547 '("qtdeclarative" "qtquickcontrols"))))
552 ("readline" ,readline)
558 ("speexdsp" ,speexdsp)
559 ("libsndfile" ,libsndfile)
560 ("alsa-lib" ,alsa-lib)
561 ("qttools" ,qttools)))
564 ("qtdeclarative" ,qtdeclarative)
565 ("qtquickcontrols" ,qtquickcontrols)))
566 (home-page "http://twinkle.dolezel.info/")
567 (synopsis "Softphone for voice over IP and instant messaging")
568 (description "Twinkle is a softphone for your voice over IP and instant
569 messaging communcations using the SIP protocol. You can use it for direct IP
570 phone to IP phone communication or in a network using a SIP proxy to route your
572 (license license:gpl2+)))
574 (define-public pjproject
582 (url "https://github.com/pjsip/pjproject.git")
583 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
584 (modules '((guix build utils)))
587 (let ((third-party-directories
588 ;; Things we don't need:
589 ;; BaseClasses - contains libraries from Windows SDK
590 ;; we don't need it, at least not now.
591 (list "BaseClasses" "g7221" "ilbc" "milenage"
592 "speex" "threademulation" "yuv" "bdsound"
593 "gsm" "mp3" "resample" "srtp" "webrtc"
594 ;; Keep only resample, build and README.txt.
595 "build/baseclasses" "build/g7221" "build/gsm"
596 "build/ilbc" "build/milenage" "build/resample"
597 "build/samplerate" "build/speex" "build/srtp"
598 "build/webrtc" "build/yuv")))
599 ;; Keep only Makefiles related to resample.
600 (for-each (lambda (directory)
601 (delete-file-recursively
602 (string-append "third_party/" directory)))
603 third-party-directories)
605 (let ((third-party-dirs
606 (list "gsm" "ilbc" "speex" "g7221" "srtp"
607 "portaudio" "resample")))
610 (substitute* "third_party/build/os-linux.mak"
611 (((string-append "DIRS += " dirs)) "")))
613 (file-name (git-file-name name version))
616 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
617 (build-system gnu-build-system)
619 `(("portaudio" ,portaudio)))
621 ;; These packages are referenced in the Libs field of the pkg-config
622 ;; file that will be installed by pjproject.
626 ("resample", resample)
627 ("util-linux" ,util-linux)))
629 `(("autoconf" ,autoconf)
630 ("automake" ,automake)
631 ("pkg-config" ,pkg-config)
632 ("libtool" ,libtool)))
634 `(;; FIXME make: No rule to make target
635 ;; 'pjlib-test-unknown-[something]-gnu'.
637 ;; #:test-target "selftest"
639 (modify-phases %standard-phases
640 (add-before 'build 'build-dep
641 (lambda _ (invoke "make" "dep")))
642 (add-before 'patch-source-shebangs 'autoconf
644 (invoke "autoconf" "-v" "-f" "-i" "-o"
645 "aconfigure" "aconfigure.ac")))
646 (add-before 'autoconf 'disable-some-tests
647 ;; Three of the six test programs fail due to missing network
650 (substitute* "Makefile"
651 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
652 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
654 (home-page "https://www.pjsip.org")
655 (synopsis "Session Initiation Protocol (SIP) stack")
656 (description "PJProject provides an implementation of the Session
657 Initiation Protocol (SIP) and a multimedia framework.")
658 (license license:gpl2+)))
660 (define %jami-version "20191101.3.67671e7")
662 (define* (jami-source #:key without-daemon)
665 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
668 (modules '((guix build utils)))
672 (delete-file-recursively "daemon/contrib"))
676 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
678 (define-public pjproject-jami
681 (name "pjproject-jami")
683 `(("savoir-faire-linux-patches" ,(jami-source))
684 ,@(package-native-inputs pjproject)))
687 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
689 (list "--disable-oss"
693 "--disable-speex-aec"
694 "--disable-g711-codec"
695 "--disable-l16-codec"
696 "--disable-gsm-codec"
697 "--disable-g722-codec"
698 "--disable-g7221-codec"
699 "--disable-speex-codec"
700 "--disable-ilbc-codec"
701 "--disable-opencore-amr"
708 "--disable-libwebrtc"
710 "--with-external-srtp"
711 ;; We need -fPIC or else we get the following error when linking
712 ;; against pjproject-jami:
713 ;; relocation R_X86_64_32S against `.rodata' can not be used when
714 ;; making a shared object;
718 (modify-phases %standard-phases
719 (add-after 'unpack 'make-git-checkout-writable
721 (for-each make-file-writable (find-files "."))
723 (add-after 'unpack 'apply-patches
724 (lambda* (#:key inputs #:allow-other-keys)
725 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
727 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
728 ;; WARNING: These amount for huge changes in pjproject.
729 (savoir-faire-linux-patches
730 '("fix_turn_alloc_failure"
736 "fix_ioqueue_ipv6_sendto"
741 "fix_first_packet_turn_tcp"
743 "ignore_ipv6_on_transport_check"
744 "fix_turn_connection_failure"
745 ;; "uwp_vs" ; for windows
746 "disable_local_resolution")))
747 (mkdir-p savoir-faire-linux-patches-directory)
748 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
749 "-C" savoir-faire-linux-patches-directory
750 "--strip-components=5"
751 "ring-project/daemon/contrib/src/pjproject")
754 (invoke "patch" "--force" "-p1" "-i"
755 (string-append savoir-faire-linux-patches-directory "/"
757 savoir-faire-linux-patches))
759 ;; TODO: We could use substitute-keyword-arguments instead of
760 ;; repeating the phases from pjproject, but somehow it does
762 (add-before 'build 'build-dep
763 (lambda _ (invoke "make" "dep")))
764 (add-before 'patch-source-shebangs 'autoconf
766 (invoke "autoconf" "-v" "-f" "-i" "-o"
767 "aconfigure" "aconfigure.ac")))
768 (add-before 'autoconf 'disable-some-tests
769 ;; Three of the six test programs fail due to missing network
772 (substitute* "Makefile"
773 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
774 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
777 (define-public libring
780 (version %jami-version)
781 (source (jami-source #:without-daemon #t))
782 (build-system gnu-build-system)
784 ;; Missing (optional?) dep: libnatpmp.
785 `(("alsa-lib" ,alsa-lib)
787 ("dbus-c++" ,dbus-c++)
800 ("pulseaudio" ,pulseaudio)
801 ("libsamplerate" ,libsamplerate)
802 ("libsndfile" ,libsndfile)
804 ("speexdsp" ,speexdsp)
806 ("libvorbis" ,libvorbis)
808 ("libvdpau" ,libvdpau)
809 ("yaml-cpp" ,yaml-cpp)
812 ("libsecp256k1" ,libsecp256k1)
814 ("python-wrapper" ,python-wrapper)
815 ("restinio" ,restinio)
818 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
819 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
820 ("pjproject" ,pjproject-jami)))
822 `(("autoconf" ,autoconf)
823 ("automake" ,automake)
825 ("pkg-config" ,pkg-config)
828 ("perl" ,perl))) ; Needed for documentation.
830 `(#:tests? #f ; The tests fail to compile due to missing headers.
832 (modify-phases %standard-phases
833 (add-after 'unpack 'change-directory
837 (add-before 'build 'add-lib-dir
841 (synopsis "Distributed multimedia communications platform")
842 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
843 video and chat communication platform that requires no centralized server and
844 leaves the power of privacy in the hands of the user. It supports the SIP and
845 IAX protocols, as well as decentralized calling using P2P-DHT.
847 This package provides a library and daemon implementing the Jami core
849 (home-page "https://jami.net/")
850 (license license:gpl3+)))
852 (define-public libringclient
855 (name "libringclient")
856 (build-system cmake-build-system)
858 `(("libring" ,libring) ; For 'dring'.
859 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
860 ("qttools" ,qttools)))
862 `(#:tests? #f ; There is no testsuite.
864 (list (string-append "-DRING_BUILD_DIR="
865 (assoc-ref %build-inputs "libring") "/include"))
867 (modify-phases %standard-phases
868 (add-after 'unpack 'change-directory
872 (add-before 'configure 'fix-dbus-interfaces-path
873 (lambda* (#:key inputs #:allow-other-keys)
874 (substitute* "CMakeLists.txt"
875 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
876 (string-append (assoc-ref inputs "libring")
877 dbus-interfaces-path-suffix))))))))
878 (synopsis "Distributed multimedia communications platform")
879 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
880 video and chat communication platform that requires no centralized server and
881 leaves the power of privacy in the hands of the user. It supports the SIP and
882 IAX protocols, as well as decentralized calling using P2P-DHT.
884 This package provides a library common to all Jami clients.")
885 (home-page "https://jami.net")
886 (license license:gpl3+)))
892 (build-system cmake-build-system)
894 `(("libringclient" ,libringclient)
896 ("qrencode" ,qrencode)
897 ("libnotify" ,libnotify)
899 ("clutter-gtk" ,clutter-gtk)
900 ("gettext" ,gnu-gettext)
901 ("libcanberra" ,libcanberra)
902 ("webkitgtk" ,webkitgtk)
903 ;; TODO: We must wrap ring-client-gnome to force using the
904 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
907 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
908 ;; undefined symbol: sqlite3_column_table_name16
910 ;; qtbase is built against sqlite-with-column-metadata but somehow
911 ;; jami-client-gnome ends up with both `sqlite' and
912 ;; `sqlite-with-column-metadata' as inputs and it seems that
913 ;; libqsqlite.so gets confused.
914 ("sqlite" ,sqlite-with-column-metadata)))
916 `(("pkg-config" ,pkg-config)
917 ("glib:bin" ,glib "bin")
918 ("doxygen" ,doxygen)))
920 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
921 ("adwaita-icon-theme" ,adwaita-icon-theme)
922 ("evolution-data-server" ,evolution-data-server)))
924 `(#:tests? #f ; There is no testsuite.
926 (modify-phases %standard-phases
927 (add-after 'unpack 'change-directory
929 (chdir "client-gnome")
931 (add-after 'install 'wrap
932 (lambda* (#:key inputs outputs #:allow-other-keys)
933 (let* ((out (assoc-ref outputs "out"))
934 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
935 (wrap-program (string-append out "/bin/jami-gnome")
936 `("LD_LIBRARY_PATH" ":" prefix (,path))))
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))