Merge branch 'master' into core-updates
[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 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
19 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
20 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
21 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages telephony)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages admin)
41 #:use-module (gnu packages aidc)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages avahi)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages docbook)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages file)
54 #:use-module (gnu packages protobuf)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages libcanberra)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages multiprecision)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages netpbm)
67 #:use-module (gnu packages networking)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages pulseaudio)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages serialization)
75 #:use-module (gnu packages speech)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages upnp)
78 #:use-module (gnu packages video)
79 #:use-module (gnu packages webkit)
80 #:use-module (gnu packages xiph)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages readline)
84 #:use-module (gnu packages bison)
85 #:use-module (gnu packages flex)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages)
88 #:use-module (guix download)
89 #:use-module (guix git-download)
90 #:use-module (guix build-system cmake)
91 #:use-module (guix build-system gnu)
92 #:use-module (guix build-system qt))
93
94 (define-public spandsp
95 (package
96 (name "spandsp")
97 (version "0.0.6")
98 (source
99 (origin
100 (method url-fetch)
101 (uri
102 ;; The original upstream has been down since the end of March 2020.
103 (string-append "https://web.archive.org/web/20180626203108/"
104 "https://www.soft-switch.org/downloads/" name "/"
105 name "-" version ".tar.gz"))
106 (sha256
107 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
108 (build-system gnu-build-system)
109 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
110 (arguments
111 `(#:configure-flags '("--enable-doc=yes" "--enable-tests=yes")
112 #:parallel-build? #f ;non-deterministic build failures may occur otherwise
113 #:parallel-tests? #f ;fails removing the same the files twice otherwise
114 #:phases (modify-phases %standard-phases
115 (add-after 'unpack 'patch-configure.ac
116 (lambda _
117 ;; spandsp looks at hard coded locations of the FHS to
118 ;; find libxml2.
119 (substitute* "configure.ac"
120 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" all)
121 (string-append all
122 "PKG_CHECK_MODULES(XML2, libxml-2.0)\n"
123 "CPPFLAGS+=\" $XML2_CFLAGS\"\n")))
124 ;; Force a regeneration of the autotools build system.
125 (delete-file "autogen.sh")
126 (delete-file "configure")
127 #t))
128 (add-after 'unpack 'do-not-install-data-files
129 ;; The .tiff images produced for tests are not
130 ;; reproducible and it is not desirable to have those
131 ;; distributed.
132 (lambda _
133 (substitute* '("test-data/itu/fax/Makefile.am"
134 "test-data/etsi/fax/Makefile.am")
135 (("nobase_data_DATA")
136 "noinst_DATA"))
137 #t))
138 (add-after 'install 'install-doc
139 (lambda* (#:key outputs #:allow-other-keys)
140 (let ((doc (string-append (assoc-ref outputs "doc")
141 "/share/doc/" ,name "-" ,version)))
142 (copy-recursively "doc/t38_manual" doc)
143 #t)))
144 (add-after 'install 'move-static-libraries
145 (lambda* (#:key outputs #:allow-other-keys)
146 (let ((out (assoc-ref outputs "out"))
147 (static (assoc-ref outputs "static")))
148 (mkdir-p (string-append static "/lib"))
149 (with-directory-excursion out
150 (for-each (lambda (file)
151 (rename-file file
152 (string-append static "/"
153 file)))
154 (find-files "lib" "\\.a$")))
155 #t))))))
156 (native-inputs
157 `(("autoconf" ,autoconf)
158 ("automake" ,automake)
159 ("libtool" ,libtool)
160 ("pkg-config" ,pkg-config)
161 ;; For the tests
162 ("fftw" ,fftw)
163 ("libpcap" ,libpcap)
164 ("libsndfile" ,libsndfile)
165 ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff
166 ("libtiff" ,libtiff)
167 ("netpbm" ,netpbm)
168 ("sox" ,sox)
169 ;; For the documentation
170 ("docbook-xml" ,docbook-xml-4.3)
171 ("docbook-xsl" ,docbook-xsl)
172 ("doxygen" ,doxygen)
173 ("libxml2" ,libxml2)
174 ("libxslt" ,libxslt)))
175 (synopsis "DSP library for telephony")
176 (description "SpanDSP is a library of DSP functions for telephony, in the
177 8000 sample per second world of E1s, T1s, and higher order PCM channels. It
178 contains low level functions, such as basic filters. It also contains higher
179 level functions, such as cadenced supervisory tone detection, and a complete
180 software FAX machine.")
181 (home-page "https://web.archive.org/web/20180626203108/\
182 https://www.soft-switch.org/index.html")
183 (license (list license:lgpl2.1+ ;for the library
184 license:gpl2+)))) ;for the test suites and support programs
185
186 (define-public commoncpp
187 (package
188 (name "commoncpp")
189 (version "1.8.1")
190 (source (origin
191 (method url-fetch)
192 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
193 version ".tar.gz"))
194 (sha256 (base32
195 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
196 (arguments
197 `(#:phases
198 (modify-phases %standard-phases
199 (add-before 'configure 'pre-configure
200 (lambda _
201 (substitute* "src/applog.cpp"
202 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
203 #t)))))
204 (build-system gnu-build-system)
205 (synopsis "(u)Common C++ framework for threaded applications")
206 (description "GNU Common C++ is an portable, optimized class framework for
207 threaded applications, supporting concurrent synchronization, inter-process
208 communications via sockets, and various methods for data handling, such as
209 serialization and XML parsing. It includes the uCommon C++ library, a smaller
210 reimplementation.")
211 (license license:gpl2+) ; plus runtime exception
212 (home-page "https://www.gnu.org/software/commoncpp/")))
213
214 (define-public ucommon
215 (package
216 (name "ucommon")
217 (version "7.0.0")
218 (source (origin
219 (method url-fetch)
220 (uri (string-append "mirror://gnu/commoncpp/" name "-"
221 version ".tar.gz"))
222 (sha256 (base32
223 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
224 (build-system gnu-build-system)
225 (inputs `(("gnutls" ,gnutls)))
226 (synopsis "Common C++ framework for threaded applications")
227 (description "GNU uCommon C++ is meant as a very light-weight C++ library
228 to facilitate using C++ design patterns even for very deeply embedded
229 applications, such as for systems using uclibc along with posix threading
230 support.")
231 (license license:gpl3+)
232 (home-page "https://www.gnu.org/software/commoncpp/")
233 (properties '((ftp-directory . "/gnu/commoncpp")))))
234
235 (define-public ccrtp
236 (package
237 (name "ccrtp")
238 (version "2.1.2")
239 (source (origin
240 (method url-fetch)
241 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
242 version ".tar.gz"))
243 (sha256 (base32
244 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
245 (build-system gnu-build-system)
246 (inputs `(("ucommon" ,ucommon)
247 ("libgcrypt" ,libgcrypt)))
248 (native-inputs `(("pkg-config" ,pkg-config)))
249 (synopsis "Implementation of RTP (real-time transport protocol)")
250 (description "GNU ccRTP is an implementation of RTP, the real-time transport
251 protocol from the IETF. It is suitable both for high capacity servers and
252 personal client applications. It is flexible in its design, allowing it to
253 function as a framework for the framework, rather than just being a
254 packet-manipulation library.")
255 (license license:gpl2+) ; plus runtime exception
256 (home-page "https://www.gnu.org/software/ccrtp/")))
257
258
259 (define-public osip
260 (package
261 (name "osip")
262 (version "5.0.0")
263 (source (origin
264 (method url-fetch)
265 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
266 (patches (search-patches "osip-CVE-2017-7853.patch"))
267 (sha256
268 (base32
269 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
270 (build-system gnu-build-system)
271
272 (synopsis "Library implementing SIP (RFC-3261)")
273 (description "GNU oSIP is an implementation of the SIP protocol. It is
274 used to provide multimedia and telecom software developers with an interface
275 to initiate and control SIP sessions.")
276 (license license:lgpl2.1+)
277 (home-page "https://www.gnu.org/software/osip/")))
278
279
280 (define-public exosip
281 (package
282 (name "exosip")
283 (version "4.1.0")
284 (source (origin
285 (method url-fetch)
286 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
287 version ".tar.gz"))
288 (sha256 (base32
289 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
290 (build-system gnu-build-system)
291 (inputs `(("osip" ,osip)))
292 (synopsis "Sip abstraction library")
293 (description "EXosip is a library that hides the complexity of using the
294 SIP protocol for multimedia session establishment. This protocol is mainly to
295 be used by VoIP telephony applications (endpoints or conference server) but
296 might be also useful for any application that wish to establish sessions like
297 multiplayer games.")
298 (license license:gpl2+)
299 ;; (plus OpenSSL linking exception)
300 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
301 (home-page "https://savannah.nongnu.org/projects/exosip")))
302
303 (define-public sipwitch
304 (package
305 (name "sipwitch")
306 (version "1.9.15")
307 (source (origin
308 (method url-fetch)
309 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
310 version ".tar.gz"))
311 (sha256 (base32
312 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
313 (build-system gnu-build-system)
314 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
315 ;; cross-compiling. Among other issues there the program name "pkg-config"
316 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
317 ;; Fortunately we can avoid the use of pkg-config and set the dependency
318 ;; flags ourselves.
319 (arguments `(#:configure-flags
320 `("--without-pkg-config"
321 ,(string-append "UCOMMON_CFLAGS=-I"
322 (assoc-ref %build-inputs "ucommon") "/include")
323 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
324 ,(string-append "LIBOSIP2_CFLAGS=-I"
325 (assoc-ref %build-inputs "osip") "/include")
326 "LIBOSIP2_LIBS=-losipparser2 -losip2"
327 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
328 "/etc")
329 "EXOSIP2_LIBS=-leXosip2"
330 ,(string-append "EXOSIP2_CFLAGS=-I"
331 (assoc-ref %build-inputs "exosip")
332 "/include"))))
333 (inputs `(("ucommon" ,ucommon)
334 ("exosip" ,exosip)
335 ("osip" ,osip)))
336 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
337 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
338 uses the SIP protocol. Calls can be made from behind NAT firewalls and
339 without the need for a service provider. Its peer-to-peer design ensures that
340 there is no central point for media intercept or capture and thus it can be
341 used to construct a secure telephone system that operates over the public
342 internet.")
343 (license license:gpl3+)
344 (home-page "https://www.gnu.org/software/sipwitch/")))
345
346 (define-public libsrtp
347 (package
348 (name "libsrtp")
349 (version "2.3.0")
350 (source (origin
351 (method git-fetch)
352 (uri (git-reference
353 (url "https://github.com/cisco/libsrtp")
354 (commit (string-append "v" version))))
355 (file-name (git-file-name name version))
356 (sha256
357 (base32
358 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
359 (native-inputs
360 `(("psmisc" ,psmisc) ;some tests require 'killall'
361 ("procps" ,procps)))
362 (build-system gnu-build-system)
363 (arguments
364 '(#:test-target "runtest"
365 #:phases (modify-phases %standard-phases
366 (add-after 'build 'build-shared
367 (lambda* (#:key (make-flags '()) #:allow-other-keys)
368 ;; Build the shared library separately because
369 ;; the test runner requires a static build.
370 (apply invoke "make" "shared_library" make-flags)
371 #t))
372 (add-after 'install 'remove-static-library
373 (lambda* (#:key outputs #:allow-other-keys)
374 (delete-file (string-append (assoc-ref outputs "out")
375 "/lib/libsrtp2.a"))
376 #t)))))
377 (synopsis "Secure RTP (SRTP) Reference Implementation")
378 (description
379 "This package provides an implementation of the Secure Real-time Transport
380 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
381 supporting cryptographic kernel.")
382 (home-page "https://github.com/cisco/libsrtp")
383 (license license:bsd-3)))
384
385 (define-public libiax2
386 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
387 ;; This is the commit used by the Ring Project.
388 (package
389 (name "libiax2")
390 (version (string-append "0.0.0-1." (string-take commit 7)))
391 (source
392 (origin
393 (method git-fetch)
394 (uri (git-reference
395 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
396 (commit commit)))
397 (file-name (git-file-name name version))
398 (sha256
399 (base32
400 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
401 (build-system gnu-build-system)
402 (native-inputs
403 `(("autoconf" ,autoconf)
404 ("automake" ,automake)
405 ("libtool" ,libtool)))
406 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
407 (synopsis "Inter-Asterisk-Protocol library")
408 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
409 Voice-over-IP (VoIP) communications.")
410 ;; The file 'src/md5.c' is released into the public domain by RSA Data
411 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
412 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
413 ;; covered under the 'GPL'.
414 ;; The package as a whole is distributed under the LGPL 2.0.
415 (license (list license:lgpl2.0
416 license:public-domain
417 license:gpl2+)))))
418
419 (define-public seren
420 (package
421 (name "seren")
422 (version "0.0.21")
423 (source (origin
424 (method url-fetch)
425 (uri (string-append "http://holdenc.altervista.org/"
426 "seren/downloads/seren-" version
427 ".tar.gz"))
428 (sha256
429 (base32
430 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
431 (build-system gnu-build-system)
432 (arguments '(#:tests? #f)) ; no "check" target
433 (inputs
434 `(("alsa-lib" ,alsa-lib)
435 ("gmp" ,gmp)
436 ("libogg" ,libogg)
437 ("ncurses" ,ncurses)
438 ("opus" ,opus)))
439 (synopsis "Simple VoIP program to create conferences from the terminal")
440 (description
441 "Seren is a simple VoIP program based on the Opus codec that allows you
442 to create a voice conference from the terminal, with up to 10 participants,
443 without having to register accounts, exchange emails, or add people to contact
444 lists. All you need to join an existing conference is the host name or IP
445 address of one of the participants.")
446 (home-page "http://holdenc.altervista.org/seren/")
447 (license license:gpl3+)))
448
449 (define-public mumble
450 (package
451 (name "mumble")
452 (version "1.3.0")
453 (source (origin
454 (method url-fetch)
455 (uri (string-append "https://mumble.info/snapshot/"
456 name "-" version ".tar.gz"))
457 (sha256
458 (base32
459 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
460 (modules '((guix build utils)))
461 (snippet
462 `(begin
463 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
464 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
465 (for-each
466 delete-file-recursively
467 '("3rdparty/GL" ; in mesa
468 "3rdparty/mach-override-build" ; for macx
469 "3rdparty/mach-override-src"
470 "3rdparty/minhook-build" ; for win32
471 "3rdparty/minhook-src"
472 "3rdparty/opus-build" ; in opus
473 "3rdparty/opus-src"
474 "3rdparty/sbcelt-helper-build" ; not enabled
475 "3rdparty/sbcelt-lib-build"
476 "3rdparty/sbcelt-src"
477 "3rdparty/speex-build" ; in speex
478 "3rdparty/speex-src"
479 "3rdparty/speexdsp-src" ; in speexdsp
480 "3rdparty/xinputcheck-build" ; for win32
481 "3rdparty/xinputcheck-src"))
482 #t))))
483 (build-system qt-build-system)
484 (arguments
485 `(#:tests? #f ; no "check" target
486 #:phases
487 (modify-phases %standard-phases
488 (replace 'configure
489 (lambda* (#:key inputs outputs #:allow-other-keys)
490 (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
491 (string-append "MUMBLE_PYTHON="
492 (string-append (assoc-ref inputs "python")
493 "/bin/python3"))
494 (string-append "CONFIG+="
495 (string-join
496 ;; Options used are listed in the same order
497 ;; as in the "INSTALL" file
498 ;; (plus the final "packaged" and "release").
499 (list "no-bundled-speex" ; in speex
500 "no-bundled-opus" ; in opus
501 "no-g15" ; not packaged
502 "no-jackaudio" ; use pulse
503 "no-oss" ; use pulse
504 "no-alsa" ; use pulse
505 "no-update"
506 "no-embed-qt-translations"
507 "no-ice" ; not packaged
508 "packaged"
509 "release")))
510 (string-append "DEFINES+="
511 "PLUGIN_PATH="
512 (assoc-ref outputs "out")
513 "/lib/mumble"))))
514 (add-before 'configure 'fix-libspeechd-include
515 (lambda _
516 (substitute* "src/mumble/TextToSpeech_unix.cpp"
517 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
518 #t))
519 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
520 (add-before 'configure 'fix-statistic-gathering-default
521 (lambda _
522 (substitute* "src/mumble/Settings.cpp"
523 (("bUsage = true;") "bUsage = false;"))
524 #t))
525 (add-before 'install 'disable-murmur-ice
526 (lambda _
527 (substitute* "scripts/murmur.ini.system"
528 (("^ice=") ";ice="))
529 #t))
530 (replace 'install ; install phase does not exist
531 (lambda* (#:key inputs outputs #:allow-other-keys)
532 (let* ((out (assoc-ref outputs "out"))
533 (etc (string-append out "/etc/murmur"))
534 (dbus (string-append out "/etc/dbus-1/system.d/"))
535 (bin (string-append out "/bin"))
536 (services (string-append out "/share/services"))
537 (applications (string-append out "/share/applications"))
538 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
539 (man (string-append out "/share/man/man1"))
540 (lib (string-append out "/lib/mumble")))
541 (install-file "release/mumble" bin)
542 (install-file "scripts/mumble-overlay" bin)
543 (install-file "scripts/mumble.protocol" services)
544 (install-file "scripts/mumble.desktop" applications)
545 (install-file "icons/mumble.svg" icons)
546 (install-file "man/mumble-overlay.1" man)
547 (install-file "man/mumble.1" man)
548 (install-file "release/murmurd" bin)
549 (install-file "scripts/murmur.ini.system" etc)
550 (rename-file (string-append etc "/murmur.ini.system")
551 (string-append etc "/murmur.ini"))
552 (install-file "scripts/murmur.conf" dbus)
553 (install-file "man/murmurd.1" man)
554 (for-each (lambda (file) (install-file file lib))
555 (find-files "." "\\.so\\."))
556 (for-each (lambda (file) (install-file file lib))
557 (find-files "release/plugins" "\\.so$"))))))))
558 (inputs
559 `(("avahi" ,avahi)
560 ("boost" ,boost)
561 ("libsndfile" ,libsndfile)
562 ("libxi" ,libxi)
563 ("mesa" ,mesa) ; avoid bundled
564 ("openssl" ,openssl)
565 ("opus" ,opus) ; avoid bundled
566 ("protobuf" ,protobuf)
567 ("pulseaudio" ,pulseaudio)
568 ("qtbase" ,qtbase)
569 ("qtsvg" ,qtsvg)
570 ("speech-dispatcher" ,speech-dispatcher)
571 ("speex" ,speex) ; avoid bundled
572 ("speexdsp" ,speexdsp))) ; avoid bundled
573 (native-inputs
574 `(("pkg-config" ,pkg-config)
575 ("python" ,python)
576 ("qttools" ,qttools)))
577 (synopsis "Low-latency, high quality voice chat software")
578 (description
579 "Mumble is an low-latency, high quality voice chat
580 software primarily intended for use while gaming.
581 Mumble consists of two applications for separate usage:
582 @code{mumble} for the client, and @code{murmur} for the server.")
583 (home-page "https://wiki.mumble.info/wiki/Main_Page")
584 (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft
585 license:bsd-2 ; celt-0.11.0
586 license:isc)))) ; arc4random
587
588 (define-public twinkle
589 (package
590 (name "twinkle")
591 (version "1.10.2")
592 (source (origin
593 (method git-fetch)
594 (uri (git-reference
595 (url "https://github.com/LubosD/twinkle")
596 (commit (string-append "v" version))))
597 (file-name (git-file-name name version))
598 (sha256
599 (base32
600 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
601 (build-system cmake-build-system)
602 (arguments
603 `(#:tests? #f ; no test target
604 #:configure-flags '("-DWITH_SPEEX=On")
605 #:phases
606 (modify-phases %standard-phases
607 (add-after 'install 'wrap-executable
608 (lambda* (#:key inputs outputs #:allow-other-keys)
609 (let ((out (assoc-ref outputs "out")))
610 (wrap-program (string-append out "/bin/twinkle")
611 `("QT_PLUGIN_PATH" ":" prefix
612 ,(map (lambda (label)
613 (string-append (assoc-ref inputs label)
614 "/lib/qt5/plugins"))
615 '("qtbase" "qtdeclarative")))
616 `("QML2_IMPORT_PATH" ":" prefix
617 ,(map (lambda (label)
618 (string-append (assoc-ref inputs label)
619 "/lib/qt5/qml"))
620 '("qtdeclarative" "qtquickcontrols"))))
621 #t))))))
622 (native-inputs
623 `(("bison" ,bison)
624 ("flex" ,flex)
625 ("readline" ,readline)
626 ("file" ,file)
627 ("ucommon" ,ucommon)
628 ("ccrtp" ,ccrtp)
629 ("libxml2" ,libxml2)
630 ("speex" ,speex)
631 ("speexdsp" ,speexdsp)
632 ("libsndfile" ,libsndfile)
633 ("alsa-lib" ,alsa-lib)
634 ("qttools" ,qttools)))
635 (inputs
636 `(("qtbase" ,qtbase)
637 ("qtdeclarative" ,qtdeclarative)
638 ("qtquickcontrols" ,qtquickcontrols)))
639 (home-page "http://twinkle.dolezel.info/")
640 (synopsis "Softphone for voice over IP and instant messaging")
641 (description "Twinkle is a softphone for your voice over IP and instant
642 messaging communcations using the SIP protocol. You can use it for direct IP
643 phone to IP phone communication or in a network using a SIP proxy to route your
644 calls and messages")
645 (license license:gpl2+)))
646
647 (define-public pjproject
648 (package
649 (name "pjproject")
650 (version "2.9")
651 (source
652 (origin
653 (method git-fetch)
654 (uri (git-reference
655 (url "https://github.com/pjsip/pjproject.git")
656 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
657 (modules '((guix build utils)))
658 (snippet
659 '(begin
660 (let ((third-party-directories
661 ;; Things we don't need:
662 ;; BaseClasses - contains libraries from Windows SDK
663 ;; we don't need it, at least not now.
664 (list "BaseClasses" "g7221" "ilbc" "milenage"
665 "speex" "threademulation" "yuv" "bdsound"
666 "gsm" "mp3" "resample" "srtp" "webrtc"
667 ;; Keep only resample, build and README.txt.
668 "build/baseclasses" "build/g7221" "build/gsm"
669 "build/ilbc" "build/milenage" "build/resample"
670 "build/samplerate" "build/speex" "build/srtp"
671 "build/webrtc" "build/yuv")))
672 ;; Keep only Makefiles related to resample.
673 (for-each (lambda (directory)
674 (delete-file-recursively
675 (string-append "third_party/" directory)))
676 third-party-directories)
677 #t)
678 (let ((third-party-dirs
679 (list "gsm" "ilbc" "speex" "g7221" "srtp"
680 "portaudio" "resample")))
681 (for-each
682 (lambda (dirs)
683 (substitute* "third_party/build/os-linux.mak"
684 (((string-append "DIRS += " dirs)) "")))
685 third-party-dirs))))
686 (file-name (git-file-name name version))
687 (sha256
688 (base32
689 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
690 (build-system gnu-build-system)
691 (inputs
692 `(("portaudio" ,portaudio)))
693 (propagated-inputs
694 ;; These packages are referenced in the Libs field of the pkg-config
695 ;; file that will be installed by pjproject.
696 `(("speex" ,speex)
697 ("libsrtp" ,libsrtp)
698 ("gnutls" ,gnutls)
699 ("resample", resample)
700 ("util-linux" ,util-linux "lib")))
701 (native-inputs
702 `(("autoconf" ,autoconf)
703 ("automake" ,automake)
704 ("pkg-config" ,pkg-config)
705 ("libtool" ,libtool)))
706 (arguments
707 `(;; FIXME make: No rule to make target
708 ;; 'pjlib-test-unknown-[something]-gnu'.
709 #:tests? #f
710 ;; #:test-target "selftest"
711 #:phases
712 (modify-phases %standard-phases
713 (add-before 'build 'build-dep
714 (lambda _ (invoke "make" "dep")))
715 (add-before 'patch-source-shebangs 'autoconf
716 (lambda _
717 (invoke "autoconf" "-v" "-f" "-i" "-o"
718 "aconfigure" "aconfigure.ac")))
719 (add-before 'autoconf 'disable-some-tests
720 ;; Three of the six test programs fail due to missing network
721 ;; access.
722 (lambda _
723 (substitute* "Makefile"
724 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
725 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
726 #t)))))
727 (home-page "https://www.pjsip.org")
728 (synopsis "Session Initiation Protocol (SIP) stack")
729 (description "PJProject provides an implementation of the Session
730 Initiation Protocol (SIP) and a multimedia framework.")
731 (license license:gpl2+)))
732
733 (define %jami-version "20191101.3.67671e7")
734
735 (define* (jami-source #:key without-daemon)
736 (origin
737 (method url-fetch)
738 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
739 %jami-version
740 ".tar.gz"))
741 (modules '((guix build utils)))
742 (snippet
743 (if without-daemon
744 '(begin
745 (delete-file-recursively "daemon/contrib"))
746 #f))
747 (sha256
748 (base32
749 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
750
751 (define-public pjproject-jami
752 (package
753 (inherit pjproject)
754 (name "pjproject-jami")
755 (native-inputs
756 `(("savoir-faire-linux-patches" ,(jami-source))
757 ,@(package-native-inputs pjproject)))
758 (arguments
759 `(#:tests? #f
760 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
761 #:configure-flags
762 (list "--disable-oss"
763 "--disable-sound"
764 "--disable-video"
765 "--enable-ext-sound"
766 "--disable-speex-aec"
767 "--disable-g711-codec"
768 "--disable-l16-codec"
769 "--disable-gsm-codec"
770 "--disable-g722-codec"
771 "--disable-g7221-codec"
772 "--disable-speex-codec"
773 "--disable-ilbc-codec"
774 "--disable-opencore-amr"
775 "--disable-silk"
776 "--disable-sdl"
777 "--disable-ffmpeg"
778 "--disable-v4l2"
779 "--disable-openh264"
780 "--disable-resample"
781 "--disable-libwebrtc"
782 "--with-gnutls"
783 "--with-external-srtp"
784 ;; We need -fPIC or else we get the following error when linking
785 ;; against pjproject-jami:
786 ;; relocation R_X86_64_32S against `.rodata' can not be used when
787 ;; making a shared object;
788 "CFLAGS=-fPIC"
789 "CXXFLAGS=-fPIC")
790 #:phases
791 (modify-phases %standard-phases
792 (add-after 'unpack 'make-git-checkout-writable
793 (lambda _
794 (for-each make-file-writable (find-files "."))
795 #t))
796 (add-after 'unpack 'apply-patches
797 (lambda* (#:key inputs #:allow-other-keys)
798 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
799 ;; Comes from
800 ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
801 ;; WARNING: These amount for huge changes in pjproject.
802 (savoir-faire-linux-patches
803 '("fix_turn_alloc_failure"
804 "rfc2466"
805 "ipv6"
806 "multiple_listeners"
807 "pj_ice_sess"
808 "fix_turn_fallback"
809 "fix_ioqueue_ipv6_sendto"
810 "add_dtls_transport"
811 "rfc6544"
812 "ice_config"
813 "sip_config"
814 "fix_first_packet_turn_tcp"
815 "fix_ebusy_turn"
816 "ignore_ipv6_on_transport_check"
817 "fix_turn_connection_failure"
818 ;; "uwp_vs" ; for windows
819 "disable_local_resolution")))
820 (mkdir-p savoir-faire-linux-patches-directory)
821 (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
822 "-C" savoir-faire-linux-patches-directory
823 "--strip-components=5"
824 "ring-project/daemon/contrib/src/pjproject")
825 (for-each
826 (lambda (file)
827 (invoke "patch" "--force" "-p1" "-i"
828 (string-append savoir-faire-linux-patches-directory "/"
829 file ".patch")))
830 savoir-faire-linux-patches))
831 #t))
832 ;; TODO: We could use substitute-keyword-arguments instead of
833 ;; repeating the phases from pjproject, but somehow it does
834 ;; not work.
835 (add-before 'build 'build-dep
836 (lambda _ (invoke "make" "dep")))
837 (add-before 'patch-source-shebangs 'autoconf
838 (lambda _
839 (invoke "autoconf" "-v" "-f" "-i" "-o"
840 "aconfigure" "aconfigure.ac")))
841 (add-before 'autoconf 'disable-some-tests
842 ;; Three of the six test programs fail due to missing network
843 ;; access.
844 (lambda _
845 (substitute* "Makefile"
846 (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
847 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
848 #t)))))))
849
850 (define-public libring
851 (package
852 (name "libring")
853 (version %jami-version)
854 (source (jami-source #:without-daemon #t))
855 (build-system gnu-build-system)
856 (inputs
857 ;; Missing (optional?) dep: libnatpmp.
858 `(("alsa-lib" ,alsa-lib)
859 ("boost" ,boost)
860 ("dbus-c++" ,dbus-c++)
861 ("eudev" ,eudev)
862 ("ffmpeg" ,ffmpeg)
863 ("flac" ,flac)
864 ("gmp" ,gmp)
865 ("gsm" ,gsm)
866 ("jack" ,jack-1)
867 ("jsoncpp" ,jsoncpp)
868 ("libogg" ,libogg)
869 ("libva" ,libva)
870 ("opendht" ,opendht)
871 ("opus" ,opus)
872 ("pcre" ,pcre)
873 ("pulseaudio" ,pulseaudio)
874 ("libsamplerate" ,libsamplerate)
875 ("libsndfile" ,libsndfile)
876 ("speex" ,speex)
877 ("speexdsp" ,speexdsp)
878 ("libupnp" ,libupnp)
879 ("libvorbis" ,libvorbis)
880 ("libx264" ,libx264)
881 ("libvdpau" ,libvdpau)
882 ("yaml-cpp" ,yaml-cpp)
883 ("zlib" ,zlib)
884 ("openssl" ,openssl)
885 ("libsecp256k1" ,libsecp256k1)
886 ("python" ,python)
887 ("python-wrapper" ,python-wrapper)
888 ("restinio" ,restinio)
889 ("libx11" ,libx11)
890 ("asio" ,asio)
891 ;; TODO: Upstream seems to rely on a custom pjproject (a.k.a. pjsip) version.
892 ;; See https://git.jami.net/savoirfairelinux/ring-daemon/issues/24.
893 ("pjproject" ,pjproject-jami)))
894 (native-inputs
895 `(("autoconf" ,autoconf)
896 ("automake" ,automake)
897 ("libtool" ,libtool)
898 ("pkg-config" ,pkg-config)
899 ("which" ,which)
900 ("cppunit" ,cppunit)
901 ("perl" ,perl))) ; Needed for documentation.
902 (arguments
903 `(#:tests? #f ; The tests fail to compile due to missing headers.
904 #:phases
905 (modify-phases %standard-phases
906 (add-after 'unpack 'change-directory
907 (lambda _
908 (chdir "daemon")
909 #t))
910 (add-before 'build 'add-lib-dir
911 (lambda _
912 (mkdir-p "src/lib")
913 #t)))))
914 (synopsis "Distributed multimedia communications platform")
915 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
916 video and chat communication platform that requires no centralized server and
917 leaves the power of privacy in the hands of the user. It supports the SIP and
918 IAX protocols, as well as decentralized calling using P2P-DHT.
919
920 This package provides a library and daemon implementing the Jami core
921 functionality.")
922 (home-page "https://jami.net/")
923 (license license:gpl3+)))
924
925 (define-public libringclient
926 (package
927 (inherit libring)
928 (name "libringclient")
929 (build-system cmake-build-system)
930 (propagated-inputs
931 `(("libring" ,libring) ; For 'dring'.
932 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
933 ("qttools" ,qttools)))
934 (arguments
935 `(#:tests? #f ; There is no testsuite.
936 #:configure-flags
937 (list (string-append "-DRING_BUILD_DIR="
938 (assoc-ref %build-inputs "libring") "/include"))
939 #:phases
940 (modify-phases %standard-phases
941 (add-after 'unpack 'change-directory
942 (lambda _
943 (chdir "lrc")
944 #t))
945 (add-before 'configure 'fix-dbus-interfaces-path
946 (lambda* (#:key inputs #:allow-other-keys)
947 (substitute* "CMakeLists.txt"
948 (("\\$\\{CMAKE_INSTALL_PREFIX\\}(/share/dbus-1/interfaces)" _ dbus-interfaces-path-suffix)
949 (string-append (assoc-ref inputs "libring")
950 dbus-interfaces-path-suffix))))))))
951 (synopsis "Distributed multimedia communications platform")
952 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
953 video and chat communication platform that requires no centralized server and
954 leaves the power of privacy in the hands of the user. It supports the SIP and
955 IAX protocols, as well as decentralized calling using P2P-DHT.
956
957 This package provides a library common to all Jami clients.")
958 (home-page "https://jami.net")
959 (license license:gpl3+)))
960
961 (define-public jami
962 (package
963 (inherit libring)
964 (name "jami")
965 (build-system cmake-build-system)
966 (inputs
967 `(("libringclient" ,libringclient)
968 ("gtk+" ,gtk+)
969 ("qrencode" ,qrencode)
970 ("libnotify" ,libnotify)
971 ("clutter" ,clutter)
972 ("clutter-gtk" ,clutter-gtk)
973 ("libcanberra" ,libcanberra)
974 ("webkitgtk" ,webkitgtk)))
975 (native-inputs
976 `(("pkg-config" ,pkg-config)
977 ("gettext" ,gettext-minimal)
978 ("glib:bin" ,glib "bin")
979 ("doxygen" ,doxygen)))
980 (propagated-inputs
981 `(("libring" ,libring) ; Contains `dring', the daemon, which is automatically by d-bus.
982 ("adwaita-icon-theme" ,adwaita-icon-theme)
983 ("evolution-data-server" ,evolution-data-server)))
984 (arguments
985 `(#:tests? #f ; There is no testsuite.
986 #:phases
987 (modify-phases %standard-phases
988 (add-after 'unpack 'change-directory
989 (lambda _
990 (chdir "client-gnome")
991 #t)))))
992 (synopsis "Distributed, privacy-respecting communication program")
993 (description "Jami (formerly GNU Ring) is a secure and distributed voice,
994 video and chat communication platform that requires no centralized server and
995 leaves the power of privacy in the hands of the user. It supports the SIP and
996 IAX protocols, as well as decentralized calling using P2P-DHT.
997
998 This package provides the Jami client for the GNOME desktop.")
999 (home-page "https://jami.net")
1000 (license license:gpl3+)))
1001
1002 (define-public jami-client-gnome
1003 (deprecated-package "jami-client-gnome" jami))
1004
1005 (define-public libtgvoip
1006 (package
1007 (name "libtgvoip")
1008 (version "2.4.4")
1009 (source
1010 (origin
1011 (method git-fetch)
1012 (uri (git-reference
1013 (url "https://github.com/grishka/libtgvoip.git")
1014 (commit version)))
1015 (file-name (git-file-name name version))
1016 ;; Fix compilation on i686-linux architecture.
1017 ;; NOTE: Applying these patches is order-dependent!
1018 ;; The patch for WebRTC /must/ precede the patch for SSE2.
1019 (patches
1020 (search-patches "libtgvoip-disable-webrtc.patch"
1021 "libtgvoip-disable-sse2.patch"))
1022 (sha256
1023 (base32
1024 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
1025 (build-system gnu-build-system)
1026 (inputs
1027 `(("alsa-lib" ,alsa-lib)
1028 ("libopusenc" ,libopusenc)
1029 ("openssl" ,openssl)
1030 ("pulseaudio" ,pulseaudio)))
1031 (synopsis "VoIP library for Telegram clients")
1032 (description "A collection of libraries and header files for implementing
1033 telephony functionality into custom Telegram clients.")
1034 (home-page "https://github.com/zevlg/libtgvoip")
1035 (license license:unlicense)))