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