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>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages telephony)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages aidc)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages avahi)
37 #:use-module (gnu packages audio)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages file)
45 #:use-module (gnu packages protobuf)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages libcanberra)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages networking)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages serialization)
63 #:use-module (gnu packages speech)
64 #:use-module (gnu packages sqlite)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages upnp)
67 #:use-module (gnu packages video)
68 #:use-module (gnu packages webkit)
69 #:use-module (gnu packages xiph)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages readline)
73 #:use-module (gnu packages bison)
74 #:use-module (gnu packages flex)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix build-system cmake)
80 #:use-module (guix build-system gnu))
82 (define-public commoncpp
88 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
91 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
94 (modify-phases %standard-phases
95 (add-before 'configure 'pre-configure
97 (substitute* "src/applog.cpp"
98 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
100 (build-system gnu-build-system)
101 (synopsis "(u)Common C++ framework for threaded applications")
102 (description "GNU Common C++ is an portable, optimized class framework for
103 threaded applications, supporting concurrent synchronization, inter-process
104 communications via sockets, and various methods for data handling, such as
105 serialization and XML parsing. It includes the uCommon C++ library, a smaller
107 (license license:gpl2+) ; plus runtime exception
108 (home-page "https://www.gnu.org/software/commoncpp/")))
110 (define-public ucommon
116 (uri (string-append "mirror://gnu/commoncpp/" name "-"
119 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
120 (build-system gnu-build-system)
121 (inputs `(("gnutls" ,gnutls)))
122 (synopsis "Common C++ framework for threaded applications")
123 (description "GNU uCommon C++ is meant as a very light-weight C++ library
124 to facilitate using C++ design patterns even for very deeply embedded
125 applications, such as for systems using uclibc along with posix threading
127 (license license:gpl3+)
128 (home-page "https://www.gnu.org/software/commoncpp/")
129 (properties '((ftp-directory . "/gnu/commoncpp")))))
137 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
140 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
141 (build-system gnu-build-system)
142 (inputs `(("ucommon" ,ucommon)
143 ("libgcrypt" ,libgcrypt)))
144 (native-inputs `(("pkg-config" ,pkg-config)))
145 (synopsis "Implementation of RTP (real-time transport protocol)")
146 (description "GNU ccRTP is an implementation of RTP, the real-time transport
147 protocol from the IETF. It is suitable both for high capacity servers and
148 personal client applications. It is flexible in its design, allowing it to
149 function as a framework for the framework, rather than just being a
150 packet-manipulation library.")
151 (license license:gpl2+) ; plus runtime exception
152 (home-page "https://www.gnu.org/software/ccrtp/")))
161 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
162 (patches (search-patches "osip-CVE-2017-7853.patch"))
165 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
166 (build-system gnu-build-system)
168 (synopsis "Library implementing SIP (RFC-3261)")
169 (description "GNU oSIP is an implementation of the SIP protocol. It is
170 used to provide multimedia and telecom software developers with an interface
171 to initiate and control SIP sessions.")
172 (license license:lgpl2.1+)
173 (home-page "https://www.gnu.org/software/osip/")))
176 (define-public exosip
182 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
185 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
186 (build-system gnu-build-system)
187 (inputs `(("osip" ,osip)))
188 (synopsis "Sip abstraction library")
189 (description "EXosip is a library that hides the complexity of using the
190 SIP protocol for multimedia session establishment. This protocol is mainly to
191 be used by VoIP telephony applications (endpoints or conference server) but
192 might be also useful for any application that wish to establish sessions like
194 (license license:gpl2+)
195 ;; (plus OpenSSL linking exception)
196 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
197 (home-page "https://savannah.nongnu.org/projects/exosip")))
199 (define-public sipwitch
205 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
208 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
209 (build-system gnu-build-system)
210 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
211 ;; cross-compiling. Among other issues there the program name "pkg-config"
212 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
213 ;; Fortunately we can avoid the use of pkg-config and set the dependency
215 (arguments `(#:configure-flags
216 `("--without-pkg-config"
217 ,(string-append "UCOMMON_CFLAGS=-I"
218 (assoc-ref %build-inputs "ucommon") "/include")
219 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
220 ,(string-append "LIBOSIP2_CFLAGS=-I"
221 (assoc-ref %build-inputs "osip") "/include")
222 "LIBOSIP2_LIBS=-losipparser2 -losip2"
223 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
225 "EXOSIP2_LIBS=-leXosip2"
226 ,(string-append "EXOSIP2_CFLAGS=-I"
227 (assoc-ref %build-inputs "exosip")
229 (inputs `(("ucommon" ,ucommon)
232 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
233 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
234 uses the SIP protocol. Calls can be made from behind NAT firewalls and
235 without the need for a service provider. Its peer-to-peer design ensures that
236 there is no central point for media intercept or capture and thus it can be
237 used to construct a secure telephone system that operates over the public
239 (license license:gpl3+)
240 (home-page "https://www.gnu.org/software/sipwitch/")))
242 (define-public libsrtp
249 (url "https://github.com/cisco/libsrtp")
250 (commit (string-append "v" version))))
251 (file-name (git-file-name name version))
254 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
256 `(("psmisc" ,psmisc) ;some tests require 'killall'
258 (build-system gnu-build-system)
260 '(#:test-target "runtest"))
261 (synopsis "Secure RTP (SRTP) Reference Implementation")
263 "This package provides an implementation of the Secure Real-time Transport
264 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
265 supporting cryptographic kernel.")
266 (home-page "https://github.com/cisco/libsrtp")
267 (license license:bsd-3)))
269 (define-public bctoolbox
275 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
279 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
280 (build-system gnu-build-system)
281 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
285 `(("mbedtls" ,mbedtls-apache)))
286 (home-page "https://www.linphone.org")
287 (synopsis "Utilities library for linphone software")
288 (description "BCtoolbox is a utilities library used by Belledonne
289 Communications software like linphone.")
290 (license license:gpl2+)))
298 (uri (string-append "https://download.savannah.nongnu.org/"
299 "releases/linphone/ortp/sources/ortp-"
303 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
304 (build-system gnu-build-system)
306 `(("bctoolbox" ,bctoolbox)))
308 `(("pkg-config" ,pkg-config)))
309 (home-page "https://linphone.org/")
310 (synopsis "Implementation of the Real-time transport protocol")
311 (description "oRTP is a library implementing the Real-time transport
312 protocol (RFC 3550).")
313 (license license:lgpl2.1+)))
315 (define-public libiax2
316 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
317 ;; This is the commit used by the Ring Project.
320 (version (string-append "0.0.0-1." (string-take commit 7)))
325 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
327 (file-name (git-file-name name version))
330 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
331 (build-system gnu-build-system)
333 `(("autoconf" ,autoconf)
334 ("automake" ,automake)
335 ("libtool" ,libtool)))
336 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
337 (synopsis "Inter-Asterisk-Protocol library")
338 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
339 Voice-over-IP (VoIP) communications.")
340 ;; The file 'src/md5.c' is released into the public domain by RSA Data
341 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
342 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
343 ;; covered under the 'GPL'.
344 ;; The package as a whole is distributed under the LGPL 2.0.
345 (license (list license:lgpl2.0
346 license:public-domain
355 (uri (string-append "http://holdenc.altervista.org/"
356 "seren/downloads/seren-" version
360 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
361 (build-system gnu-build-system)
362 (arguments '(#:tests? #f)) ; no "check" target
364 `(("alsa-lib" ,alsa-lib)
369 (synopsis "Simple VoIP program to create conferences from the terminal")
371 "Seren is a simple VoIP program based on the Opus codec that allows you
372 to create a voice conference from the terminal, with up to 10 participants,
373 without having to register accounts, exchange emails, or add people to contact
374 lists. All you need to join an existing conference is the host name or IP
375 address of one of the participants.")
376 (home-page "http://holdenc.altervista.org/seren/")
377 (license license:gpl3+)))
379 (define-public mumble
385 (uri (string-append "https://mumble.info/snapshot/"
386 name "-" version ".tar.gz"))
389 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
390 (patches (search-patches "mumble-1.2.19-abs.patch"))
391 (modules '((guix build utils)))
394 ;; Remove bundled software.
395 (for-each delete-file-recursively '("3rdparty"
400 "sbcelt-helper-build"
403 ;; TODO: Celt is still bundled. It has been merged into Opus
404 ;; and will be removed after 1.3.0.
405 ;; https://github.com/mumble-voip/mumble/issues/1999
407 (build-system gnu-build-system)
409 `(#:tests? #f ; no "check" target
411 (modify-phases %standard-phases
413 (lambda* (#:key outputs #:allow-other-keys)
414 (invoke "qmake" "main.pro" "-recursive"
415 (string-append "CONFIG+="
419 "no-embed-qt-translations"
431 (string-append "DEFINES+="
433 (assoc-ref outputs "out")
435 (add-before 'configure 'fix-libspeechd-include
437 (substitute* "src/mumble/TextToSpeech_unix.cpp"
438 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
439 (replace 'install ; install phase does not exist
440 (lambda* (#:key inputs outputs #:allow-other-keys)
441 (let* ((out (assoc-ref outputs "out"))
442 (etc (string-append out "/etc/murmur"))
443 (dbus (string-append out "/etc/dbus-1/system.d/"))
444 (bin (string-append out "/bin"))
445 (services (string-append out "/share/services"))
446 (applications (string-append out "/share/applications"))
447 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
448 (man (string-append out "/share/man/man1"))
449 (lib (string-append out "/lib/mumble")))
450 (install-file "release/mumble" bin)
451 (install-file "scripts/mumble-overlay" bin)
452 (install-file "scripts/mumble.protocol" services)
453 (install-file "scripts/mumble.desktop" applications)
454 (install-file "icons/mumble.svg" icons)
455 (install-file "man/mumble-overlay.1" man)
456 (install-file "man/mumble.1" man)
457 (install-file "release/murmurd" bin)
458 (install-file "scripts/murmur.ini.system" etc)
459 (rename-file (string-append etc "/murmur.ini.system")
460 (string-append etc "/murmur.ini"))
461 (install-file "scripts/murmur.conf" dbus)
462 (install-file "man/murmurd.1" man)
463 (for-each (lambda (file) (install-file file lib))
464 (find-files "." "\\.so\\."))
465 (for-each (lambda (file) (install-file file lib))
466 (find-files "release/plugins" "\\.so$"))))))))
469 ("protobuf" ,protobuf-3.5)
471 ("libsndfile" ,libsndfile)
475 ("speexdsp" ,speexdsp)
476 ("speech-dispatcher" ,speech-dispatcher)
480 ("alsa-lib" ,alsa-lib)
481 ("pulseaudio" ,pulseaudio)))
483 `(("pkg-config" ,pkg-config)))
484 (synopsis "Low-latency, high quality voice chat software")
486 "Mumble is an low-latency, high quality voice chat
487 software primarily intended for use while gaming.
488 Mumble consists of two applications for separate usage:
489 @code{mumble} for the client, and @code{murmur} for the server.")
490 (home-page "https://wiki.mumble.info/wiki/Main_Page")
491 (license (list license:bsd-3
492 ;; The bundled celt is bsd-2. Remove after 1.3.0.
495 (define-public twinkle
502 (url "https://github.com/LubosD/twinkle")
503 (commit (string-append "v" version))))
504 (file-name (git-file-name name version))
507 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
508 (build-system cmake-build-system)
510 `(#:tests? #f ; no test target
511 #:configure-flags '("-DWITH_SPEEX=On")
513 (modify-phases %standard-phases
514 (add-after 'install 'wrap-executable
515 (lambda* (#:key inputs outputs #:allow-other-keys)
516 (let ((out (assoc-ref outputs "out")))
517 (wrap-program (string-append out "/bin/twinkle")
518 `("QT_PLUGIN_PATH" ":" prefix
519 ,(map (lambda (label)
520 (string-append (assoc-ref inputs label)
522 '("qtbase" "qtdeclarative")))
523 `("QML2_IMPORT_PATH" ":" prefix
524 ,(map (lambda (label)
525 (string-append (assoc-ref inputs label)
527 '("qtdeclarative" "qtquickcontrols"))))
532 ("readline" ,readline)
538 ("speexdsp" ,speexdsp)
539 ("libsndfile" ,libsndfile)
540 ("alsa-lib" ,alsa-lib)
541 ("qttools" ,qttools)))
544 ("qtdeclarative" ,qtdeclarative)
545 ("qtquickcontrols" ,qtquickcontrols)))
546 (home-page "http://twinkle.dolezel.info/")
547 (synopsis "Softphone for voice over IP and instant messaging")
548 (description "Twinkle is a softphone for your voice over IP and instant
549 messaging communcations using the SIP protocol. You can use it for direct IP
550 phone to IP phone communication or in a network using a SIP proxy to route your
552 (license license:gpl2+)))
554 (define-public pjproject
562 (url "https://github.com/pjsip/pjproject.git")
563 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
564 (modules '((guix build utils)))
567 (let ((third-party-directories
568 ;; Things we don't need:
569 ;; BaseClasses - contains libraries from Windows SDK
570 ;; we don't need it, at least not now.
571 (list "BaseClasses" "g7221" "ilbc" "milenage"
572 "speex" "threademulation" "yuv" "bdsound"
573 "gsm" "mp3" "resample" "srtp" "webrtc"
574 ;; Keep only resample, build and README.txt.
575 "build/baseclasses" "build/g7221" "build/gsm"
576 "build/ilbc" "build/milenage" "build/resample"
577 "build/samplerate" "build/speex" "build/srtp"
578 "build/webrtc" "build/yuv")))
579 ;; Keep only Makefiles related to resample.
580 (for-each (lambda (directory)
581 (delete-file-recursively
582 (string-append "third_party/" directory)))
583 third-party-directories)
585 (let ((third-party-dirs
586 (list "gsm" "ilbc" "speex" "g7221" "srtp"
587 "portaudio" "resample")))
590 (substitute* "third_party/build/os-linux.mak"
591 (((string-append "DIRS += " dirs)) "")))
593 (file-name (git-file-name name version))
596 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
597 (build-system gnu-build-system)
599 `(("portaudio" ,portaudio)))
601 ;; These packages are referenced in the Libs field of the pkg-config
602 ;; file that will be installed by pjproject.
606 ("resample", resample)
607 ("util-linux" ,util-linux)))
609 `(("autoconf" ,autoconf)
610 ("automake" ,automake)
611 ("pkg-config" ,pkg-config)
612 ("libtool" ,libtool)))
614 `(;; FIXME make: No rule to make target
615 ;; 'pjlib-test-unknown-[something]-gnu'.
617 ;; #:test-target "selftest"
619 (modify-phases %standard-phases
620 (add-before 'build 'build-dep
621 (lambda _ (invoke "make" "dep")))
622 (add-before 'patch-source-shebangs 'autoconf
624 (invoke "autoconf" "-v" "-f" "-i" "-o"
625 "aconfigure" "aconfigure.ac")))
626 (add-before 'autoconf 'disable-some-tests
627 ;; Three of the six test programs fail due to missing network
630 (substitute* "Makefile"
631 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
632 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
634 (home-page "https://www.pjsip.org")
635 (synopsis "Session Initiation Protocol (SIP) stack")
636 (description "PJProject provides an implementation of the Session
637 Initiation Protocol (SIP) and a multimedia framework.")
638 (license license:gpl2+)))
640 (define %jami-version "20191101.3.67671e7")
642 (define* (jami-source #:key without-daemon)
645 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
648 (modules '((guix build utils)))
652 (delete-file-recursively "daemon/contrib"))
656 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
658 (define-public pjproject-jami
661 (name "pjproject-jami")
663 `(("savoir-faire-linux-patches" ,(jami-source))
664 ,@(package-native-inputs pjproject)))
667 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
669 (list "--disable-oss"
673 "--disable-speex-aec"
674 "--disable-g711-codec"
675 "--disable-l16-codec"
676 "--disable-gsm-codec"
677 "--disable-g722-codec"
678 "--disable-g7221-codec"
679 "--disable-speex-codec"
680 "--disable-ilbc-codec"
681 "--disable-opencore-amr"
688 "--disable-libwebrtc"
690 "--with-external-srtp"
691 ;; We need -fPIC or else we get the following error when linking
692 ;; against pjproject-jami:
693 ;; relocation R_X86_64_32S against `.rodata' can not be used when
694 ;; making a shared object;
698 (modify-phases %standard-phases
699 (add-after 'unpack 'make-git-checkout-writable
701 (for-each make-file-writable (find-files "."))
703 (add-after 'unpack 'apply-patches
704 (lambda* (#:key inputs #:allow-other-keys)
705 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
707 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
708 ;; WARNING: These amount for huge changes in pjproject.
709 (savoir-faire-linux-patches
710 '("fix_turn_alloc_failure"
716 "fix_ioqueue_ipv6_sendto"
721 "fix_first_packet_turn_tcp"
723 "ignore_ipv6_on_transport_check"
724 "fix_turn_connection_failure"
725 ;; "uwp_vs" ; for windows
726 "disable_local_resolution")))
727 (mkdir-p savoir-faire-linux-patches-directory)
728 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
729 "-C" savoir-faire-linux-patches-directory
730 "--strip-components=5"
731 "ring-project/daemon/contrib/src/pjproject")
734 (invoke "patch" "--force" "-p1" "-i"
735 (string-append savoir-faire-linux-patches-directory "/"
737 savoir-faire-linux-patches))
739 ;; TODO: We could use substitute-keyword-arguments instead of
740 ;; repeating the phases from pjproject, but somehow it does
742 (add-before 'build 'build-dep
743 (lambda _ (invoke "make" "dep")))
744 (add-before 'patch-source-shebangs 'autoconf
746 (invoke "autoconf" "-v" "-f" "-i" "-o"
747 "aconfigure" "aconfigure.ac")))
748 (add-before 'autoconf 'disable-some-tests
749 ;; Three of the six test programs fail due to missing network
752 (substitute* "Makefile"
753 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
754 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
757 (define-public libring
760 (version %jami-version)
761 (source (jami-source #:without-daemon #t))
762 (build-system gnu-build-system)
764 ;; Missing (optional?) dep: libnatpmp.
765 `(("alsa-lib" ,alsa-lib)
767 ("dbus-c++" ,dbus-c++)
780 ("pulseaudio" ,pulseaudio)
781 ("libsamplerate" ,libsamplerate)
782 ("libsndfile" ,libsndfile)
784 ("speexdsp" ,speexdsp)
786 ("libvorbis" ,libvorbis)
788 ("libvdpau" ,libvdpau)
789 ("yaml-cpp" ,yaml-cpp)
792 ("libsecp256k1" ,libsecp256k1)
794 ("python-wrapper" ,python-wrapper)
795 ("restinio" ,restinio)
798 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
799 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
800 ("pjproject" ,pjproject-jami)))
802 `(("autoconf" ,autoconf)
803 ("automake" ,automake)
805 ("pkg-config" ,pkg-config)
808 ("perl" ,perl))) ; Needed for documentation.
810 `(#:tests? #f ; The tests fail to compile due to missing headers.
812 (modify-phases %standard-phases
813 (add-after 'unpack 'change-directory
817 (add-before 'build 'add-lib-dir
821 (synopsis "Distributed multimedia communications platform")
822 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
823 video and chat communication platform that requires no centralized server and
824 leaves the power of privacy in the hands of the user. It supports the SIP and
825 IAX protocols, as well as decentralized calling using P2P-DHT.
827 This package provides a library and daemon implementing the Jami core
829 (home-page "https://jami.net/")
830 (license license:gpl3+)))
832 (define-public libringclient
835 (name "libringclient")
836 (build-system cmake-build-system)
838 `(("libring" ,libring) ; For 'dring'.
839 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
840 ("qttools" ,qttools)))
842 `(#:tests? #f ; There is no testsuite.
844 (list (string-append "-DRING_BUILD_DIR="
845 (assoc-ref %build-inputs "libring") "/include"))
847 (modify-phases %standard-phases
848 (add-after 'unpack 'change-directory
852 (add-before 'configure 'fix-dbus-interfaces-path
853 (lambda* (#:key inputs #:allow-other-keys)
854 (substitute* "CMakeLists.txt"
855 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
856 (string-append (assoc-ref inputs "libring")
857 dbus-interfaces-path-suffix))))))))
858 (synopsis "Distributed multimedia communications platform")
859 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
860 video and chat communication platform that requires no centralized server and
861 leaves the power of privacy in the hands of the user. It supports the SIP and
862 IAX protocols, as well as decentralized calling using P2P-DHT.
864 This package provides a library common to all Jami clients.")
865 (home-page "https://jami.net")
866 (license license:gpl3+)))
872 (build-system cmake-build-system)
874 `(("libringclient" ,libringclient)
876 ("qrencode" ,qrencode)
877 ("libnotify" ,libnotify)
879 ("clutter-gtk" ,clutter-gtk)
880 ("gettext" ,gnu-gettext)
881 ("libcanberra" ,libcanberra)
882 ("webkitgtk" ,webkitgtk)
883 ;; TODO: We must wrap ring-client-gnome to force using the
884 ;; `sqlite-with-column-metadata' package instead of `sqlite' or else it
887 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
888 ;; undefined symbol: sqlite3_column_table_name16
890 ;; qtbase is built against sqlite-with-column-metadata but somehow
891 ;; jami-client-gnome ends up with both `sqlite' and
892 ;; `sqlite-with-column-metadata' as inputs and it seems that
893 ;; libqsqlite.so gets confused.
894 ("sqlite" ,sqlite-with-column-metadata)))
896 `(("pkg-config" ,pkg-config)
897 ("glib:bin" ,glib "bin")
898 ("doxygen" ,doxygen)))
900 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
901 ("adwaita-icon-theme" ,adwaita-icon-theme)
902 ("evolution-data-server" ,evolution-data-server)))
904 `(#:tests? #f ; There is no testsuite.
906 (modify-phases %standard-phases
907 (add-after 'unpack 'change-directory
909 (chdir "client-gnome")
911 (add-after 'install 'wrap
912 (lambda* (#:key inputs outputs #:allow-other-keys)
913 (let* ((out (assoc-ref outputs "out"))
914 (path (string-append (assoc-ref inputs "sqlite") "/lib")))
915 (wrap-program (string-append out "/bin/jami-gnome")
916 `("LD_LIBRARY_PATH" ":" prefix (,path))))
918 (synopsis "Distributed, privacy-respecting communication program")
919 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
920 video and chat communication platform that requires no centralized server and
921 leaves the power of privacy in the hands of the user. It supports the SIP and
922 IAX protocols, as well as decentralized calling using P2P-DHT.
924 This package provides the Jami client for the GNOME desktop.")
925 (home-page "https://jami.net")
926 (license license:gpl3+)))
928 (define-public jami-client-gnome
929 (deprecated-package "jami-client-gnome" jami))