gnu: libtgvoip: Update to 2.4.4.
[jackhill/guix/guix.git] / gnu / packages / telephony.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
7 ;;; Copyright © 2016 Francesco Frassinelli <fraph24@gmail.com>
8 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2017 Adonay Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@hyperbola.info>
12 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
13 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
14 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
15 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
16 ;;; Copyright © 2019 Ivan Vilata i Balaguer <ivan@selidor.net>
17 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
18 ;;;
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)
36 #:use-module (gnu packages aidc)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages avahi)
39 #:use-module (gnu packages audio)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages documentation)
46 #:use-module (gnu packages file)
47 #:use-module (gnu packages protobuf)
48 #:use-module (gnu packages gettext)
49 #:use-module (gnu packages gl)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnome)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages libcanberra)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages multiprecision)
57 #:use-module (gnu packages ncurses)
58 #:use-module (gnu packages networking)
59 #:use-module (gnu packages pcre)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pulseaudio)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages qt)
65 #:use-module (gnu packages serialization)
66 #:use-module (gnu packages speech)
67 #:use-module (gnu packages sqlite)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages upnp)
70 #:use-module (gnu packages video)
71 #:use-module (gnu packages webkit)
72 #:use-module (gnu packages xiph)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages flex)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix download)
81 #:use-module (guix git-download)
82 #:use-module (guix build-system cmake)
83 #:use-module (guix build-system gnu)
84 #:use-module (guix build-system qt))
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
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)))))
104 (build-system gnu-build-system)
105 (synopsis "(u)Common C++ framework for threaded applications")
106 (description "GNU Common C++ is an portable, optimized class framework for
107 threaded applications, supporting concurrent synchronization, inter-process
108 communications via sockets, and various methods for data handling, such as
109 serialization and XML parsing. It includes the uCommon C++ library, a smaller
110 reimplementation.")
111 (license license:gpl2+) ; plus runtime exception
112 (home-page "https://www.gnu.org/software/commoncpp/")))
113
114 (define-public ucommon
115 (package
116 (name "ucommon")
117 (version "7.0.0")
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "mirror://gnu/commoncpp/" name "-"
121 version ".tar.gz"))
122 (sha256 (base32
123 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
124 (build-system gnu-build-system)
125 (inputs `(("gnutls" ,gnutls)))
126 (synopsis "Common C++ framework for threaded applications")
127 (description "GNU uCommon C++ is meant as a very light-weight C++ library
128 to facilitate using C++ design patterns even for very deeply embedded
129 applications, such as for systems using uclibc along with posix threading
130 support.")
131 (license license:gpl3+)
132 (home-page "https://www.gnu.org/software/commoncpp/")
133 (properties '((ftp-directory . "/gnu/commoncpp")))))
134
135 (define-public ccrtp
136 (package
137 (name "ccrtp")
138 (version "2.1.2")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
142 version ".tar.gz"))
143 (sha256 (base32
144 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
145 (build-system gnu-build-system)
146 (inputs `(("ucommon" ,ucommon)
147 ("libgcrypt" ,libgcrypt)))
148 (native-inputs `(("pkg-config" ,pkg-config)))
149 (synopsis "Implementation of RTP (real-time transport protocol)")
150 (description "GNU ccRTP is an implementation of RTP, the real-time transport
151 protocol from the IETF. It is suitable both for high capacity servers and
152 personal client applications. It is flexible in its design, allowing it to
153 function as a framework for the framework, rather than just being a
154 packet-manipulation library.")
155 (license license:gpl2+) ; plus runtime exception
156 (home-page "https://www.gnu.org/software/ccrtp/")))
157
158
159 (define-public osip
160 (package
161 (name "osip")
162 (version "5.0.0")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
166 (patches (search-patches "osip-CVE-2017-7853.patch"))
167 (sha256
168 (base32
169 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
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
174 used to provide multimedia and telecom software developers with an interface
175 to initiate and control SIP sessions.")
176 (license license:lgpl2.1+)
177 (home-page "https://www.gnu.org/software/osip/")))
178
179
180 (define-public exosip
181 (package
182 (name "exosip")
183 (version "4.1.0")
184 (source (origin
185 (method url-fetch)
186 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
187 version ".tar.gz"))
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
194 SIP protocol for multimedia session establishment. This protocol is mainly to
195 be used by VoIP telephony applications (endpoints or conference server) but
196 might be also useful for any application that wish to establish sessions like
197 multiplayer games.")
198 (license license:gpl2+)
199 ;; (plus OpenSSL linking exception)
200 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
201 (home-page "https://savannah.nongnu.org/projects/exosip")))
202
203 (define-public sipwitch
204 (package
205 (name "sipwitch")
206 (version "1.9.15")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
210 version ".tar.gz"))
211 (sha256 (base32
212 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
213 (build-system gnu-build-system)
214 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
215 ;; cross-compiling. Among other issues there the program name "pkg-config"
216 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
217 ;; Fortunately we can avoid the use of pkg-config and set the dependency
218 ;; flags ourselves.
219 (arguments `(#:configure-flags
220 `("--without-pkg-config"
221 ,(string-append "UCOMMON_CFLAGS=-I"
222 (assoc-ref %build-inputs "ucommon") "/include")
223 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
224 ,(string-append "LIBOSIP2_CFLAGS=-I"
225 (assoc-ref %build-inputs "osip") "/include")
226 "LIBOSIP2_LIBS=-losipparser2 -losip2"
227 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
228 "/etc")
229 "EXOSIP2_LIBS=-leXosip2"
230 ,(string-append "EXOSIP2_CFLAGS=-I"
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
238 uses the SIP protocol. Calls can be made from behind NAT firewalls and
239 without the need for a service provider. Its peer-to-peer design ensures that
240 there is no central point for media intercept or capture and thus it can be
241 used to construct a secure telephone system that operates over the public
242 internet.")
243 (license license:gpl3+)
244 (home-page "https://www.gnu.org/software/sipwitch/")))
245
246 (define-public libsrtp
247 (package
248 (name "libsrtp")
249 (version "2.2.0")
250 (source (origin
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))
256 (sha256
257 (base32
258 "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"))))
259 (native-inputs
260 `(("psmisc" ,psmisc) ;some tests require 'killall'
261 ("procps" ,procps)))
262 (build-system gnu-build-system)
263 (arguments
264 '(#:test-target "runtest"))
265 (synopsis "Secure RTP (SRTP) Reference Implementation")
266 (description
267 "This package provides an implementation of the Secure Real-time Transport
268 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
269 supporting cryptographic kernel.")
270 (home-page "https://github.com/cisco/libsrtp")
271 (license license:bsd-3)))
272
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
293 Communications software like linphone.")
294 (license license:gpl2+)))
295
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
316 protocol (RFC 3550).")
317 (license license:lgpl2.1+)))
318
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
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))
332 (sha256
333 (base32
334 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
335 (build-system gnu-build-system)
336 (native-inputs
337 `(("autoconf" ,autoconf)
338 ("automake" ,automake)
339 ("libtool" ,libtool)))
340 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
341 (synopsis "Inter-Asterisk-Protocol library")
342 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
343 Voice-over-IP (VoIP) communications.")
344 ;; The file 'src/md5.c' is released into the public domain by RSA Data
345 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
346 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
347 ;; covered under the 'GPL'.
348 ;; The package as a whole is distributed under the LGPL 2.0.
349 (license (list license:lgpl2.0
350 license:public-domain
351 license:gpl2+)))))
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
376 to create a voice conference from the terminal, with up to 10 participants,
377 without having to register accounts, exchange emails, or add people to contact
378 lists. All you need to join an existing conference is the host name or IP
379 address of one of the participants.")
380 (home-page "http://holdenc.altervista.org/seren/")
381 (license license:gpl3+)))
382
383 (define-public mumble
384 (package
385 (name "mumble")
386 (version "1.3.0")
387 (source (origin
388 (method url-fetch)
389 (uri (string-append "https://mumble.info/snapshot/"
390 name "-" version ".tar.gz"))
391 (sha256
392 (base32
393 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
394 (modules '((guix build utils)))
395 (snippet
396 `(begin
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"))
416 #t))))
417 (build-system qt-build-system)
418 (arguments
419 `(#:tests? #f ; no "check" target
420 #:phases
421 (modify-phases %standard-phases
422 (replace 'configure
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"))
428 (string-append "CONFIG+="
429 (string-join
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"
440 "no-embed-qt-translations"
441 "no-ice" ; not packaged
442 "packaged"
443 "release")))
444 (string-append "DEFINES+="
445 "PLUGIN_PATH="
446 (assoc-ref outputs "out")
447 "/lib/mumble"))))
448 (add-before 'configure 'fix-libspeechd-include
449 (lambda _
450 (substitute* "src/mumble/TextToSpeech_unix.cpp"
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))
458 (replace 'install ; install phase does not exist
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (let* ((out (assoc-ref outputs "out"))
461 (etc (string-append out "/etc/murmur"))
462 (dbus (string-append out "/etc/dbus-1/system.d/"))
463 (bin (string-append out "/bin"))
464 (services (string-append out "/share/services"))
465 (applications (string-append out "/share/applications"))
466 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
467 (man (string-append out "/share/man/man1"))
468 (lib (string-append out "/lib/mumble")))
469 (install-file "release/mumble" bin)
470 (install-file "scripts/mumble-overlay" bin)
471 (install-file "scripts/mumble.protocol" services)
472 (install-file "scripts/mumble.desktop" applications)
473 (install-file "icons/mumble.svg" icons)
474 (install-file "man/mumble-overlay.1" man)
475 (install-file "man/mumble.1" man)
476 (install-file "release/murmurd" bin)
477 (install-file "scripts/murmur.ini.system" etc)
478 (rename-file (string-append etc "/murmur.ini.system")
479 (string-append etc "/murmur.ini"))
480 (install-file "scripts/murmur.conf" dbus)
481 (install-file "man/murmurd.1" man)
482 (for-each (lambda (file) (install-file file lib))
483 (find-files "." "\\.so\\."))
484 (for-each (lambda (file) (install-file file lib))
485 (find-files "release/plugins" "\\.so$"))))))))
486 (inputs
487 `(("avahi" ,avahi)
488 ("boost" ,boost)
489 ("libsndfile" ,libsndfile)
490 ("libxi" ,libxi)
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
501 (native-inputs
502 `(("pkg-config" ,pkg-config)
503 ("python" ,python)
504 ("qttools" ,qttools)))
505 (synopsis "Low-latency, high quality voice chat software")
506 (description
507 "Mumble is an low-latency, high quality voice chat
508 software primarily intended for use while gaming.
509 Mumble consists of two applications for separate usage:
510 @code{mumble} for the client, and @code{murmur} for the server.")
511 (home-page "https://wiki.mumble.info/wiki/Main_Page")
512 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
513 license:bsd-2 ; celt-0.11.0
514 license:isc)))) ; arc4random
515
516 (define-public twinkle
517 (package
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
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))))))
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
570 messaging communcations using the SIP protocol. You can use it for direct IP
571 phone to IP phone communication or in a network using a SIP proxy to route your
572 calls and messages")
573 (license license:gpl2+)))
574
575 (define-public pjproject
576 (package
577 (name "pjproject")
578 (version "2.9")
579 (source
580 (origin
581 (method git-fetch)
582 (uri (git-reference
583 (url "https://github.com/pjsip/pjproject.git")
584 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
585 (modules '((guix build utils)))
586 (snippet
587 '(begin
588 (let ((third-party-directories
589 ;; Things we don't need:
590 ;; BaseClasses - contains libraries from Windows SDK
591 ;; we don't need it, at least not now.
592 (list "BaseClasses" "g7221" "ilbc" "milenage"
593 "speex" "threademulation" "yuv" "bdsound"
594 "gsm" "mp3" "resample" "srtp" "webrtc"
595 ;; Keep only resample, build and README.txt.
596 "build/baseclasses" "build/g7221" "build/gsm"
597 "build/ilbc" "build/milenage" "build/resample"
598 "build/samplerate" "build/speex" "build/srtp"
599 "build/webrtc" "build/yuv")))
600 ;; Keep only Makefiles related to resample.
601 (for-each (lambda (directory)
602 (delete-file-recursively
603 (string-append "third_party/" directory)))
604 third-party-directories)
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))))
614 (file-name (git-file-name name version))
615 (sha256
616 (base32
617 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
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)
627 ("resample", resample)
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 _
645 (invoke "autoconf" "-v" "-f" "-i" "-o"
646 "aconfigure" "aconfigure.ac")))
647 (add-before 'autoconf 'disable-some-tests
648 ;; Three of the six test programs fail due to missing network
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
658 Initiation Protocol (SIP) and a multimedia framework.")
659 (license license:gpl2+)))
660
661 (define %jami-version "20191101.3.67671e7")
662
663 (define* (jami-source #:key without-daemon)
664 (origin
665 (method url-fetch)
666 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
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
677 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
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"
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")
718 #:phases
719 (modify-phases %standard-phases
720 (add-after 'unpack 'make-git-checkout-writable
721 (lambda _
722 (for-each make-file-writable (find-files "."))
723 #t))
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.
730 (savoir-faire-linux-patches
731 '("fix_turn_alloc_failure"
732 "rfc2466"
733 "ipv6"
734 "multiple_listeners"
735 "pj_ice_sess"
736 "fix_turn_fallback"
737 "fix_ioqueue_ipv6_sendto"
738 "add_dtls_transport"
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")))
748 (mkdir-p savoir-faire-linux-patches-directory)
749 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
750 "-C" savoir-faire-linux-patches-directory
751 "--strip-components=5"
752 "ring-project/daemon/contrib/src/pjproject")
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)))))))
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)
816 ("restinio" ,restinio)
817 ("libx11" ,libx11)
818 ("asio" ,asio)
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,
844 video and chat communication platform that requires no centralized server and
845 leaves the power of privacy in the hands of the user. It supports the SIP and
846 IAX protocols, as well as decentralized calling using P2P-DHT.
847
848 This package provides a library and daemon implementing the Jami core
849 functionality.")
850 (home-page "https://jami.net/")
851 (license license:gpl3+)))
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,
881 video and chat communication platform that requires no centralized server and
882 leaves the power of privacy in the hands of the user. It supports the SIP and
883 IAX protocols, as well as decentralized calling using P2P-DHT.
884
885 This package provides a library common to all Jami clients.")
886 (home-page "https://jami.net")
887 (license license:gpl3+)))
888
889 (define-public jami
890 (package
891 (inherit libring)
892 (name "jami")
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
921 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
922 ("adwaita-icon-theme" ,adwaita-icon-theme)
923 ("evolution-data-server" ,evolution-data-server)))
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")))
936 (wrap-program (string-append out "/bin/jami-gnome")
937 `("LD_LIBRARY_PATH" ":" prefix (,path))))
938 #t)))))
939 (synopsis "Distributed, privacy-respecting communication program")
940 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
941 video and chat communication platform that requires no centralized server and
942 leaves the power of privacy in the hands of the user. It supports the SIP and
943 IAX protocols, as well as decentralized calling using P2P-DHT.
944
945 This package provides the Jami client for the GNOME desktop.")
946 (home-page "https://jami.net")
947 (license license:gpl3+)))
948
949 (define-public jami-client-gnome
950 (deprecated-package "jami-client-gnome" jami))
951
952 (define-public libtgvoip
953 (package
954 (name "libtgvoip")
955 (version "2.4.4")
956 (source
957 (origin
958 (method git-fetch)
959 (uri (git-reference
960 (url "https://github.com/grishka/libtgvoip.git")
961 (commit version)))
962 (file-name (git-file-name name version))
963 (sha256
964 (base32
965 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
966 (build-system gnu-build-system)
967 (inputs
968 `(("alsa-lib" ,alsa-lib)
969 ("libopusenc" ,libopusenc)
970 ("openssl" ,openssl)
971 ("pulseaudio" ,pulseaudio)))
972 (synopsis "VoIP library for Telegram clients")
973 (description "A collection of libraries and header files for implementing
974 telephony functionality into custom Telegram clients.")
975 (home-page "https://github.com/zevlg/libtgvoip")
976 (license license:unlicense)))