gnu: libtgvoip: Update to 2.4.4.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
CommitLineData
8fd3de0b 1;;; GNU Guix --- Functional package management for GNU
63af948f
AE
2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3c9e35cc 4;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6f09178d 5;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
4ff20605 6;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
319ac02b 7;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
47956fa0 8;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
5a103bb8 9;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
7616d75f 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
bd4b6f41 11;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
b61cb244 12;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
bd4b6f41
PN
13;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
fbcd60dd 15;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
a21d9b8d 16;;; Copyright © 2019 Ivan Vilata i Balaguer <ivan@selidor.net>
494135d5 17;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
8fd3de0b
JD
18;;;
19;;; This file is part of GNU Guix.
20;;;
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.
25;;;
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.
30;;;
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/>.
33
34(define-module (gnu packages telephony)
35 #:use-module (gnu packages)
c771b799 36 #:use-module (gnu packages aidc)
4ff20605 37 #:use-module (gnu packages autotools)
faa29e4b 38 #:use-module (gnu packages avahi)
bd4b6f41
PN
39 #:use-module (gnu packages audio)
40 #:use-module (gnu packages base)
faa29e4b 41 #:use-module (gnu packages boost)
80e2524c 42 #:use-module (gnu packages check)
bd4b6f41
PN
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
c771b799 45 #:use-module (gnu packages documentation)
b61cb244 46 #:use-module (gnu packages file)
faa29e4b 47 #:use-module (gnu packages protobuf)
c771b799 48 #:use-module (gnu packages gettext)
a21d9b8d 49 #:use-module (gnu packages gl)
bd4b6f41 50 #:use-module (gnu packages glib)
c771b799 51 #:use-module (gnu packages gnome)
8fd3de0b 52 #:use-module (gnu packages gnupg)
c771b799
PN
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages libcanberra)
3c9e35cc 55 #:use-module (gnu packages linux)
319ac02b
FF
56 #:use-module (gnu packages multiprecision)
57 #:use-module (gnu packages ncurses)
bd4b6f41
PN
58 #:use-module (gnu packages networking)
59 #:use-module (gnu packages pcre)
60 #:use-module (gnu packages perl)
8fd3de0b 61 #:use-module (gnu packages pkg-config)
faa29e4b 62 #:use-module (gnu packages pulseaudio)
bd4b6f41 63 #:use-module (gnu packages python)
faa29e4b 64 #:use-module (gnu packages qt)
bd4b6f41 65 #:use-module (gnu packages serialization)
faa29e4b 66 #:use-module (gnu packages speech)
c771b799 67 #:use-module (gnu packages sqlite)
99e6f9c8 68 #:use-module (gnu packages tls)
bd4b6f41
PN
69 #:use-module (gnu packages upnp)
70 #:use-module (gnu packages video)
c771b799 71 #:use-module (gnu packages webkit)
319ac02b 72 #:use-module (gnu packages xiph)
faa29e4b 73 #:use-module (gnu packages xorg)
b61cb244
JL
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages flex)
974aaf71 78 #:use-module ((guix licenses) #:prefix license:)
8fd3de0b
JD
79 #:use-module (guix packages)
80 #:use-module (guix download)
b61cb244
JL
81 #:use-module (guix git-download)
82 #:use-module (guix build-system cmake)
a21d9b8d
IVB
83 #:use-module (guix build-system gnu)
84 #:use-module (guix build-system qt))
8fd3de0b
JD
85
86(define-public commoncpp
87 (package
88 (name "commoncpp")
89 (version "1.8.1")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
93 version ".tar.gz"))
94 (sha256 (base32
95 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
96 (arguments
97 `(#:phases
dc1d3cde
KK
98 (modify-phases %standard-phases
99 (add-before 'configure 'pre-configure
100 (lambda _
101 (substitute* "src/applog.cpp"
102 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
103 #t)))))
8fd3de0b 104 (build-system gnu-build-system)
12bcf94a 105 (synopsis "(u)Common C++ framework for threaded applications")
8fd3de0b
JD
106 (description "GNU Common C++ is an portable, optimized class framework for
107threaded applications, supporting concurrent synchronization, inter-process
108communications via sockets, and various methods for data handling, such as
109serialization and XML parsing. It includes the uCommon C++ library, a smaller
110reimplementation.")
974aaf71 111 (license license:gpl2+) ; plus runtime exception
6fd52309 112 (home-page "https://www.gnu.org/software/commoncpp/")))
8fd3de0b
JD
113
114(define-public ucommon
115 (package
116 (name "ucommon")
99e6f9c8 117 (version "7.0.0")
8fd3de0b
JD
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "mirror://gnu/commoncpp/" name "-"
121 version ".tar.gz"))
122 (sha256 (base32
99e6f9c8 123 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
8fd3de0b 124 (build-system gnu-build-system)
99e6f9c8 125 (inputs `(("gnutls" ,gnutls)))
35b9e423
EB
126 (synopsis "Common C++ framework for threaded applications")
127 (description "GNU uCommon C++ is meant as a very light-weight C++ library
128to facilitate using C++ design patterns even for very deeply embedded
129applications, such as for systems using uclibc along with posix threading
130support.")
974aaf71 131 (license license:gpl3+)
6fd52309 132 (home-page "https://www.gnu.org/software/commoncpp/")
63e8bb12 133 (properties '((ftp-directory . "/gnu/commoncpp")))))
8fd3de0b
JD
134
135(define-public ccrtp
136 (package
137 (name "ccrtp")
9dc9053f 138 (version "2.1.2")
8fd3de0b
JD
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
142 version ".tar.gz"))
143 (sha256 (base32
9dc9053f 144 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
8fd3de0b
JD
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
151protocol from the IETF. It is suitable both for high capacity servers and
152personal client applications. It is flexible in its design, allowing it to
153function as a framework for the framework, rather than just being a
154packet-manipulation library.")
974aaf71 155 (license license:gpl2+) ; plus runtime exception
6fd52309 156 (home-page "https://www.gnu.org/software/ccrtp/")))
8fd3de0b
JD
157
158
159(define-public osip
160 (package
161 (name "osip")
6dfbbd2c 162 (version "5.0.0")
8fd3de0b
JD
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
75072795 166 (patches (search-patches "osip-CVE-2017-7853.patch"))
6dfbbd2c
LF
167 (sha256
168 (base32
169 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
8fd3de0b
JD
170 (build-system gnu-build-system)
171
172 (synopsis "Library implementing SIP (RFC-3261)")
173 (description "GNU oSIP is an implementation of the SIP protocol. It is
174used to provide multimedia and telecom software developers with an interface
175to initiate and control SIP sessions.")
974aaf71 176 (license license:lgpl2.1+)
6fd52309 177 (home-page "https://www.gnu.org/software/osip/")))
8fd3de0b
JD
178
179
180(define-public exosip
181 (package
182 (name "exosip")
183 (version "4.1.0")
184 (source (origin
185 (method url-fetch)
966a543b
LC
186 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
187 version ".tar.gz"))
8fd3de0b
JD
188 (sha256 (base32
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
e881752c 194SIP protocol for multimedia session establishment. This protocol is mainly to
8fd3de0b 195be used by VoIP telephony applications (endpoints or conference server) but
e881752c 196might be also useful for any application that wish to establish sessions like
8fd3de0b 197multiplayer games.")
974aaf71 198 (license license:gpl2+)
8fd3de0b
JD
199 ;; (plus OpenSSL linking exception)
200 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
340978d7 201 (home-page "https://savannah.nongnu.org/projects/exosip")))
8fd3de0b
JD
202
203(define-public sipwitch
204 (package
205 (name "sipwitch")
419fa59b 206 (version "1.9.15")
8fd3de0b
JD
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
210 version ".tar.gz"))
211 (sha256 (base32
419fa59b 212 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
8fd3de0b 213 (build-system gnu-build-system)
e881752c 214 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
8fd3de0b
JD
215 ;; cross-compiling. Among other issues there the program name "pkg-config"
216 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
e881752c
AK
217 ;; Fortunately we can avoid the use of pkg-config and set the dependency
218 ;; flags ourselves.
219 (arguments `(#:configure-flags
8fd3de0b 220 `("--without-pkg-config"
e881752c 221 ,(string-append "UCOMMON_CFLAGS=-I"
8fd3de0b
JD
222 (assoc-ref %build-inputs "ucommon") "/include")
223 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
e881752c 224 ,(string-append "LIBOSIP2_CFLAGS=-I"
8fd3de0b
JD
225 (assoc-ref %build-inputs "osip") "/include")
226 "LIBOSIP2_LIBS=-losipparser2 -losip2"
e881752c 227 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
8fd3de0b
JD
228 "/etc")
229 "EXOSIP2_LIBS=-leXosip2"
e881752c 230 ,(string-append "EXOSIP2_CFLAGS=-I"
8fd3de0b
JD
231 (assoc-ref %build-inputs "exosip")
232 "/include"))))
233 (inputs `(("ucommon" ,ucommon)
234 ("exosip" ,exosip)
235 ("osip" ,osip)))
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
238uses the SIP protocol. Calls can be made from behind NAT firewalls and
239without the need for a service provider. Its peer-to-peer design ensures that
240there is no central point for media intercept or capture and thus it can be
241used to construct a secure telephone system that operates over the public
242internet.")
974aaf71 243 (license license:gpl3+)
6fd52309 244 (home-page "https://www.gnu.org/software/sipwitch/")))
8fd3de0b 245
3c9e35cc
DH
246(define-public libsrtp
247 (package
248 (name "libsrtp")
f04152ef 249 (version "2.2.0")
3c9e35cc 250 (source (origin
1c956faa
EF
251 (method git-fetch)
252 (uri (git-reference
253 (url "https://github.com/cisco/libsrtp")
254 (commit (string-append "v" version))))
255 (file-name (git-file-name name version))
b0c7e053
TGR
256 (sha256
257 (base32
1c956faa 258 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
3c9e35cc 259 (native-inputs
b0c7e053 260 `(("psmisc" ,psmisc) ;some tests require 'killall'
340f9b9f 261 ("procps" ,procps)))
3c9e35cc
DH
262 (build-system gnu-build-system)
263 (arguments
f04152ef 264 '(#:test-target "runtest"))
3c9e35cc 265 (synopsis "Secure RTP (SRTP) Reference Implementation")
6c0b0887
TGR
266 (description
267 "This package provides an implementation of the Secure Real-time Transport
268Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
269supporting cryptographic kernel.")
3c9e35cc 270 (home-page "https://github.com/cisco/libsrtp")
974aaf71 271 (license license:bsd-3)))
4ff20605 272
80e2524c
RW
273(define-public bctoolbox
274 (package
275 (name "bctoolbox")
276 (version "0.2.0")
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
280 version ".tar.gz"))
281 (sha256
282 (base32
283 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
284 (build-system gnu-build-system)
285 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
286 (native-inputs
287 `(("cunit" ,cunit)))
288 (inputs
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
4186adce 293Communications software like linphone.")
80e2524c
RW
294 (license license:gpl2+)))
295
0c45a6a4
RW
296(define-public ortp
297 (package
298 (name "ortp")
299 (version "0.27.0")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append "https://download.savannah.nongnu.org/"
303 "releases/linphone/ortp/sources/ortp-"
304 version ".tar.gz"))
305 (sha256
306 (base32
307 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
308 (build-system gnu-build-system)
309 (inputs
310 `(("bctoolbox" ,bctoolbox)))
311 (native-inputs
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
316protocol (RFC 3550).")
317 (license license:lgpl2.1+)))
318
4ff20605
LG
319(define-public libiax2
320 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
321 ;; This is the commit used by the Ring Project.
322 (package
323 (name "libiax2")
324 (version (string-append "0.0.0-1." (string-take commit 7)))
325 (source
326 (origin
cd1f661e
RW
327 (method git-fetch)
328 (uri (git-reference
329 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
330 (commit commit)))
331 (file-name (git-file-name name version))
4ff20605
LG
332 (sha256
333 (base32
cd1f661e 334 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
4ff20605
LG
335 (build-system gnu-build-system)
336 (native-inputs
337 `(("autoconf" ,autoconf)
338 ("automake" ,automake)
339 ("libtool" ,libtool)))
4ff20605
LG
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
343Voice-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.
974aaf71
LG
349 (license (list license:lgpl2.0
350 license:public-domain
351 license:gpl2+)))))
319ac02b
FF
352
353(define-public seren
354 (package
355 (name "seren")
356 (version "0.0.21")
357 (source (origin
358 (method url-fetch)
359 (uri (string-append "http://holdenc.altervista.org/"
360 "seren/downloads/seren-" version
361 ".tar.gz"))
362 (sha256
363 (base32
364 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
365 (build-system gnu-build-system)
366 (arguments '(#:tests? #f)) ; no "check" target
367 (inputs
368 `(("alsa-lib" ,alsa-lib)
369 ("gmp" ,gmp)
370 ("libogg" ,libogg)
371 ("ncurses" ,ncurses)
372 ("opus" ,opus)))
373 (synopsis "Simple VoIP program to create conferences from the terminal")
374 (description
375 "Seren is a simple VoIP program based on the Opus codec that allows you
376to create a voice conference from the terminal, with up to 10 participants,
377without having to register accounts, exchange emails, or add people to contact
378lists. All you need to join an existing conference is the host name or IP
379address of one of the participants.")
380 (home-page "http://holdenc.altervista.org/seren/")
974aaf71 381 (license license:gpl3+)))
faa29e4b 382
383(define-public mumble
384 (package
385 (name "mumble")
a21d9b8d 386 (version "1.3.0")
faa29e4b 387 (source (origin
388 (method url-fetch)
389 (uri (string-append "https://mumble.info/snapshot/"
390 name "-" version ".tar.gz"))
391 (sha256
392 (base32
a21d9b8d 393 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
faa29e4b 394 (modules '((guix build utils)))
395 (snippet
396 `(begin
a21d9b8d
IVB
397 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
398 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
399 (for-each
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
407 "3rdparty/opus-src"
408 "3rdparty/sbcelt-helper-build" ; not enabled
409 "3rdparty/sbcelt-lib-build"
410 "3rdparty/sbcelt-src"
411 "3rdparty/speex-build" ; in speex
412 "3rdparty/speex-src"
413 "3rdparty/speexdsp-src" ; in speexdsp
414 "3rdparty/xinputcheck-build" ; for win32
415 "3rdparty/xinputcheck-src"))
faa29e4b 416 #t))))
a21d9b8d 417 (build-system qt-build-system)
faa29e4b 418 (arguments
419 `(#:tests? #f ; no "check" target
420 #:phases
2b583cdd 421 (modify-phases %standard-phases
faa29e4b 422 (replace 'configure
a21d9b8d
IVB
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")
427 "/bin/python3"))
7616d75f
TGR
428 (string-append "CONFIG+="
429 (string-join
a21d9b8d
IVB
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
437 "no-oss" ; use pulse
438 "no-alsa" ; use pulse
439 "no-update"
7616d75f 440 "no-embed-qt-translations"
a21d9b8d
IVB
441 "no-ice" ; not packaged
442 "packaged"
7616d75f
TGR
443 "release")))
444 (string-append "DEFINES+="
445 "PLUGIN_PATH="
446 (assoc-ref outputs "out")
447 "/lib/mumble"))))
faa29e4b 448 (add-before 'configure 'fix-libspeechd-include
449 (lambda _
450 (substitute* "src/mumble/TextToSpeech_unix.cpp"
a21d9b8d
IVB
451 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
452 #t))
453 (add-before 'install 'disable-murmur-ice
454 (lambda _
455 (substitute* "scripts/murmur.ini.system"
456 (("^ice=") ";ice="))
457 #t))
faa29e4b 458 (replace 'install ; install phase does not exist
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (let* ((out (assoc-ref outputs "out"))
bd9f8869 461 (etc (string-append out "/etc/murmur"))
462 (dbus (string-append out "/etc/dbus-1/system.d/"))
faa29e4b 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)
bd9f8869 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)
faa29e4b 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$"))))))))
486 (inputs
487 `(("avahi" ,avahi)
faa29e4b 488 ("boost" ,boost)
a21d9b8d 489 ("libsndfile" ,libsndfile)
faa29e4b 490 ("libxi" ,libxi)
a21d9b8d
IVB
491 ("mesa" ,mesa) ; avoid bundled
492 ("openssl" ,openssl)
493 ("opus" ,opus) ; avoid bundled
494 ("protobuf" ,protobuf)
495 ("pulseaudio" ,pulseaudio)
496 ("qtbase" ,qtbase)
497 ("qtsvg" ,qtsvg)
498 ("speech-dispatcher" ,speech-dispatcher)
499 ("speex" ,speex) ; avoid bundled
500 ("speexdsp" ,speexdsp))) ; avoid bundled
faa29e4b 501 (native-inputs
a21d9b8d
IVB
502 `(("pkg-config" ,pkg-config)
503 ("python" ,python)
504 ("qttools" ,qttools)))
faa29e4b 505 (synopsis "Low-latency, high quality voice chat software")
506 (description
507 "Mumble is an low-latency, high quality voice chat
bd9f8869 508software primarily intended for use while gaming.
509Mumble consists of two applications for separate usage:
510@code{mumble} for the client, and @code{murmur} for the server.")
faa29e4b 511 (home-page "https://wiki.mumble.info/wiki/Main_Page")
a21d9b8d
IVB
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
b61cb244
JL
515
516(define-public twinkle
b61cb244 517 (package
f1371daa
JL
518 (name "twinkle")
519 (version "1.10.2")
520 (source (origin
521 (method git-fetch)
522 (uri (git-reference
523 (url "https://github.com/LubosD/twinkle")
524 (commit (string-append "v" version))))
525 (file-name (git-file-name name version))
526 (sha256
527 (base32
528 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
529 (build-system cmake-build-system)
530 (arguments
531 `(#:tests? #f ; no test target
532 #:configure-flags '("-DWITH_SPEEX=On")
533 #:phases
534 (modify-phases %standard-phases
b61cb244
JL
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)
542 "/lib/qt5/plugins"))
543 '("qtbase" "qtdeclarative")))
544 `("QML2_IMPORT_PATH" ":" prefix
545 ,(map (lambda (label)
546 (string-append (assoc-ref inputs label)
547 "/lib/qt5/qml"))
548 '("qtdeclarative" "qtquickcontrols"))))
549 #t))))))
f1371daa
JL
550 (native-inputs
551 `(("bison" ,bison)
552 ("flex" ,flex)
553 ("readline" ,readline)
554 ("file" ,file)
555 ("ucommon" ,ucommon)
556 ("ccrtp" ,ccrtp)
557 ("libxml2" ,libxml2)
558 ("speex" ,speex)
559 ("speexdsp" ,speexdsp)
560 ("libsndfile" ,libsndfile)
561 ("alsa-lib" ,alsa-lib)
562 ("qttools" ,qttools)))
563 (inputs
564 `(("qtbase" ,qtbase)
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
b61cb244
JL
570messaging communcations using the SIP protocol. You can use it for direct IP
571phone to IP phone communication or in a network using a SIP proxy to route your
572calls and messages")
f1371daa 573 (license license:gpl2+)))
bd4b6f41
PN
574
575(define-public pjproject
576 (package
577 (name "pjproject")
5dc8cad5 578 (version "2.9")
bd4b6f41
PN
579 (source
580 (origin
5dc8cad5
PN
581 (method git-fetch)
582 (uri (git-reference
583 (url "https://github.com/pjsip/pjproject.git")
584 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
bd4b6f41
PN
585 (modules '((guix build utils)))
586 (snippet
587 '(begin
588 (let ((third-party-directories
5dc8cad5
PN
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"
bd4b6f41
PN
595 ;; Keep only resample, build and README.txt.
596 "build/baseclasses" "build/g7221" "build/gsm"
5dc8cad5
PN
597 "build/ilbc" "build/milenage" "build/resample"
598 "build/samplerate" "build/speex" "build/srtp"
599 "build/webrtc" "build/yuv")))
bd4b6f41 600 ;; Keep only Makefiles related to resample.
5dc8cad5 601 (for-each (lambda (directory)
bd4b6f41 602 (delete-file-recursively
5dc8cad5 603 (string-append "third_party/" directory)))
bd4b6f41
PN
604 third-party-directories)
605 #t)
606 (let ((third-party-dirs
607 (list "gsm" "ilbc" "speex" "g7221" "srtp"
608 "portaudio" "resample")))
609 (for-each
610 (lambda (dirs)
611 (substitute* "third_party/build/os-linux.mak"
612 (((string-append "DIRS += " dirs)) "")))
613 third-party-dirs))))
5dc8cad5 614 (file-name (git-file-name name version))
bd4b6f41
PN
615 (sha256
616 (base32
5dc8cad5 617 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
bd4b6f41
PN
618 (build-system gnu-build-system)
619 (inputs
620 `(("portaudio" ,portaudio)))
621 (propagated-inputs
622 ;; These packages are referenced in the Libs field of the pkg-config
623 ;; file that will be installed by pjproject.
624 `(("speex" ,speex)
625 ("libsrtp" ,libsrtp)
626 ("gnutls" ,gnutls)
5dc8cad5 627 ("resample", resample)
bd4b6f41
PN
628 ("util-linux" ,util-linux)))
629 (native-inputs
630 `(("autoconf" ,autoconf)
631 ("automake" ,automake)
632 ("pkg-config" ,pkg-config)
633 ("libtool" ,libtool)))
634 (arguments
635 `(;; FIXME make: No rule to make target
636 ;; 'pjlib-test-unknown-[something]-gnu'.
637 #:tests? #f
638 ;; #:test-target "selftest"
639 #:phases
640 (modify-phases %standard-phases
641 (add-before 'build 'build-dep
642 (lambda _ (invoke "make" "dep")))
643 (add-before 'patch-source-shebangs 'autoconf
644 (lambda _
5dc8cad5 645 (invoke "autoconf" "-v" "-f" "-i" "-o"
bd4b6f41
PN
646 "aconfigure" "aconfigure.ac")))
647 (add-before 'autoconf 'disable-some-tests
648 ;; Three of the six test programs fail due to missing network
649 ;; access.
650 (lambda _
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"))
654 #t)))))
655 (home-page "https://www.pjsip.org")
656 (synopsis "Session Initiation Protocol (SIP) stack")
657 (description "PJProject provides an implementation of the Session
658Initiation Protocol (SIP) and a multimedia framework.")
659 (license license:gpl2+)))
915829e6 660
de65f3f1 661(define %jami-version "20191101.3.67671e7")
915829e6
PN
662
663(define* (jami-source #:key without-daemon)
664 (origin
665 (method url-fetch)
de65f3f1 666 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
915829e6
PN
667 %jami-version
668 ".tar.gz"))
669 (modules '((guix build utils)))
670 (snippet
671 (if without-daemon
672 '(begin
673 (delete-file-recursively "daemon/contrib"))
674 #f))
675 (sha256
676 (base32
de65f3f1 677 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
915829e6
PN
678
679(define-public pjproject-jami
680 (package
681 (inherit pjproject)
682 (name "pjproject-jami")
683 (native-inputs
684 `(("savoir-faire-linux-patches" ,(jami-source))
685 ,@(package-native-inputs pjproject)))
686 (arguments
687 `(#:tests? #f
688 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
689 #:configure-flags
690 (list "--disable-oss"
691 "--disable-sound"
692 "--disable-video"
693 "--enable-ext-sound"
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"
703 "--disable-silk"
704 "--disable-sdl"
705 "--disable-ffmpeg"
706 "--disable-v4l2"
707 "--disable-openh264"
708 "--disable-resample"
709 "--disable-libwebrtc"
fbcd60dd
PN
710 "--with-gnutls"
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;
716 "CFLAGS=-fPIC"
717 "CXXFLAGS=-fPIC")
915829e6
PN
718 #:phases
719 (modify-phases %standard-phases
fbcd60dd
PN
720 (add-after 'unpack 'make-git-checkout-writable
721 (lambda _
722 (for-each make-file-writable (find-files "."))
723 #t))
915829e6
PN
724 (add-after 'unpack 'apply-patches
725 (lambda* (#:key inputs #:allow-other-keys)
726 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
727 ;; Comes from
728 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
729 ;; WARNING: These amount for huge changes in pjproject.
915829e6 730 (savoir-faire-linux-patches
fbcd60dd 731 '("fix_turn_alloc_failure"
915829e6
PN
732 "rfc2466"
733 "ipv6"
915829e6
PN
734 "multiple_listeners"
735 "pj_ice_sess"
736 "fix_turn_fallback"
737 "fix_ioqueue_ipv6_sendto"
738 "add_dtls_transport"
fbcd60dd
PN
739 "rfc6544"
740 "ice_config"
741 "sip_config"
742 "fix_first_packet_turn_tcp"
743 "fix_ebusy_turn"
744 "ignore_ipv6_on_transport_check"
745 "fix_turn_connection_failure"
746 ;; "uwp_vs" ; for windows
747 "disable_local_resolution")))
915829e6
PN
748 (mkdir-p savoir-faire-linux-patches-directory)
749 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
fbcd60dd
PN
750 "-C" savoir-faire-linux-patches-directory
751 "--strip-components=5"
752 "ring-project/daemon/contrib/src/pjproject")
915829e6
PN
753 (for-each
754 (lambda (file)
755 (invoke "patch" "--force" "-p1" "-i"
756 (string-append savoir-faire-linux-patches-directory "/"
757 file ".patch")))
758 savoir-faire-linux-patches))
759 #t))
760 ;; TODO: We could use substitute-keyword-arguments instead of
761 ;; repeating the phases from pjproject, but somehow it does
762 ;; not work.
763 (add-before 'build 'build-dep
764 (lambda _ (invoke "make" "dep")))
765 (add-before 'patch-source-shebangs 'autoconf
766 (lambda _
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
771 ;; access.
772 (lambda _
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"))
776 #t)))))))
1bfcb19b
PN
777
778(define-public libring
779 (package
780 (name "libring")
781 (version %jami-version)
782 (source (jami-source #:without-daemon #t))
783 (build-system gnu-build-system)
784 (inputs
785 ;; Missing (optional?) dep: libnatpmp.
786 `(("alsa-lib" ,alsa-lib)
787 ("boost" ,boost)
788 ("dbus-c++" ,dbus-c++)
789 ("eudev" ,eudev)
790 ("ffmpeg" ,ffmpeg)
791 ("flac" ,flac)
792 ("gmp" ,gmp)
793 ("gsm" ,gsm)
794 ("jack" ,jack-1)
795 ("jsoncpp" ,jsoncpp)
796 ("libogg" ,libogg)
797 ("libva" ,libva)
798 ("opendht" ,opendht)
799 ("opus" ,opus)
800 ("pcre" ,pcre)
801 ("pulseaudio" ,pulseaudio)
802 ("libsamplerate" ,libsamplerate)
803 ("libsndfile" ,libsndfile)
804 ("speex" ,speex)
805 ("speexdsp" ,speexdsp)
806 ("libupnp" ,libupnp)
807 ("libvorbis" ,libvorbis)
808 ("libx264" ,libx264)
809 ("libvdpau" ,libvdpau)
810 ("yaml-cpp" ,yaml-cpp)
811 ("zlib" ,zlib)
812 ("openssl" ,openssl)
813 ("libsecp256k1" ,libsecp256k1)
814 ("python" ,python)
815 ("python-wrapper" ,python-wrapper)
a83855ff 816 ("restinio" ,restinio)
1bfcb19b 817 ("libx11" ,libx11)
a83855ff 818 ("asio" ,asio)
1bfcb19b
PN
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)))
822 (native-inputs
823 `(("autoconf" ,autoconf)
824 ("automake" ,automake)
825 ("libtool" ,libtool)
826 ("pkg-config" ,pkg-config)
827 ("which" ,which)
828 ("cppunit" ,cppunit)
829 ("perl" ,perl))) ; Needed for documentation.
830 (arguments
831 `(#:tests? #f ; The tests fail to compile due to missing headers.
832 #:phases
833 (modify-phases %standard-phases
834 (add-after 'unpack 'change-directory
835 (lambda _
836 (chdir "daemon")
837 #t))
838 (add-before 'build 'add-lib-dir
839 (lambda _
840 (mkdir-p "src/lib")
841 #t)))))
842 (synopsis "Distributed multimedia communications platform")
843 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
844video and chat communication platform that requires no centralized server and
845leaves the power of privacy in the hands of the user. It supports the SIP and
846IAX protocols, as well as decentralized calling using P2P-DHT.
847
848This package provides a library and daemon implementing the Jami core
849functionality.")
850 (home-page "https://jami.net/")
851 (license license:gpl3+)))
b6309672
PN
852
853(define-public libringclient
854 (package
855 (inherit libring)
856 (name "libringclient")
857 (build-system cmake-build-system)
858 (propagated-inputs
859 `(("libring" ,libring) ; For 'dring'.
860 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
861 ("qttools" ,qttools)))
862 (arguments
863 `(#:tests? #f ; There is no testsuite.
864 #:configure-flags
865 (list (string-append "-DRING_BUILD_DIR="
866 (assoc-ref %build-inputs "libring") "/include"))
867 #:phases
868 (modify-phases %standard-phases
869 (add-after 'unpack 'change-directory
870 (lambda _
871 (chdir "lrc")
872 #t))
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,
881video and chat communication platform that requires no centralized server and
882leaves the power of privacy in the hands of the user. It supports the SIP and
883IAX protocols, as well as decentralized calling using P2P-DHT.
884
885This package provides a library common to all Jami clients.")
886 (home-page "https://jami.net")
887 (license license:gpl3+)))
c771b799 888
422e187f 889(define-public jami
c771b799
PN
890 (package
891 (inherit libring)
422e187f 892 (name "jami")
c771b799
PN
893 (build-system cmake-build-system)
894 (inputs
895 `(("libringclient" ,libringclient)
896 ("gtk+" ,gtk+)
897 ("qrencode" ,qrencode)
898 ("libnotify" ,libnotify)
899 ("clutter" ,clutter)
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
906 ;; fails with:
907 ;;
908 ;; /gnu/store/...-qtbase-5.11.2/lib/qt5/plugins/sqldrivers/libqsqlite.so:
909 ;; undefined symbol: sqlite3_column_table_name16
910 ;;
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)))
916 (native-inputs
917 `(("pkg-config" ,pkg-config)
918 ("glib:bin" ,glib "bin")
919 ("doxygen" ,doxygen)))
920 (propagated-inputs
5b028987 921 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
c771b799
PN
922 ("adwaita-icon-theme" ,adwaita-icon-theme)
923 ("evolution-data-server" ,evolution-data-server)))
924 (arguments
925 `(#:tests? #f ; There is no testsuite.
926 #:phases
927 (modify-phases %standard-phases
928 (add-after 'unpack 'change-directory
929 (lambda _
930 (chdir "client-gnome")
931 #t))
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")))
5b028987 936 (wrap-program (string-append out "/bin/jami-gnome")
c771b799
PN
937 `("LD_LIBRARY_PATH" ":" prefix (,path))))
938 #t)))))
5b028987 939 (synopsis "Distributed, privacy-respecting communication program")
c771b799
PN
940 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
941video and chat communication platform that requires no centralized server and
942leaves the power of privacy in the hands of the user. It supports the SIP and
943IAX protocols, as well as decentralized calling using P2P-DHT.
944
945This package provides the Jami client for the GNOME desktop.")
946 (home-page "https://jami.net")
947 (license license:gpl3+)))
422e187f
LC
948
949(define-public jami-client-gnome
950 (deprecated-package "jami-client-gnome" jami))
494135d5
BG
951
952(define-public libtgvoip
953 (package
954 (name "libtgvoip")
5a0d7391 955 (version "2.4.4")
494135d5
BG
956 (source
957 (origin
958 (method git-fetch)
959 (uri (git-reference
5a0d7391 960 (url "https://github.com/grishka/libtgvoip.git")
494135d5
BG
961 (commit version)))
962 (file-name (git-file-name name version))
963 (sha256
964 (base32
5a0d7391 965 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
494135d5
BG
966 (build-system gnu-build-system)
967 (inputs
5a0d7391
BG
968 `(("alsa-lib" ,alsa-lib)
969 ("libopusenc" ,libopusenc)
970 ("openssl" ,openssl)
971 ("pulseaudio" ,pulseaudio)))
494135d5
BG
972 (synopsis "VoIP library for Telegram clients")
973 (description "A collection of libraries and header files for implementing
974telephony functionality into custom Telegram clients.")
975 (home-page "https://github.com/zevlg/libtgvoip")
976 (license license:unlicense)))