gnu: Add wl-clipboard.
[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 Nils Gillmann <ng0@n0.is>
9 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Jovany Leandro G.C <bit4bit@riseup.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages telephony)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages avahi)
32 #:use-module (gnu packages boost)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages file)
35 #:use-module (gnu packages protobuf)
36 #:use-module (gnu packages gnupg)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages multiprecision)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages pulseaudio)
42 #:use-module (gnu packages qt)
43 #:use-module (gnu packages speech)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages xiph)
46 #:use-module (gnu packages xorg)
47 #:use-module (gnu packages xml)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages flex)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix packages)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu))
57
58 (define-public commoncpp
59 (package
60 (name "commoncpp")
61 (version "1.8.1")
62 (source (origin
63 (method url-fetch)
64 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
65 version ".tar.gz"))
66 (sha256 (base32
67 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
68 (arguments
69 `(#:phases
70 (modify-phases %standard-phases
71 (add-before 'configure 'pre-configure
72 (lambda _
73 (substitute* "src/applog.cpp"
74 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
75 #t)))))
76 (build-system gnu-build-system)
77 (synopsis "(u)Common C++ framework for threaded applications")
78 (description "GNU Common C++ is an portable, optimized class framework for
79 threaded applications, supporting concurrent synchronization, inter-process
80 communications via sockets, and various methods for data handling, such as
81 serialization and XML parsing. It includes the uCommon C++ library, a smaller
82 reimplementation.")
83 (license license:gpl2+) ; plus runtime exception
84 (home-page "https://www.gnu.org/software/commoncpp/")))
85
86 (define-public ucommon
87 (package
88 (name "ucommon")
89 (version "7.0.0")
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://gnu/commoncpp/" name "-"
93 version ".tar.gz"))
94 (sha256 (base32
95 "1mv080rvrhyxyhgqiqr8r9jdqhg3xhfawjvfj5zgj47h59nggjba"))))
96 (build-system gnu-build-system)
97 (inputs `(("gnutls" ,gnutls)))
98 (synopsis "Common C++ framework for threaded applications")
99 (description "GNU uCommon C++ is meant as a very light-weight C++ library
100 to facilitate using C++ design patterns even for very deeply embedded
101 applications, such as for systems using uclibc along with posix threading
102 support.")
103 (license license:gpl3+)
104 (home-page "https://www.gnu.org/software/commoncpp/")
105 (properties '((ftp-directory . "/gnu/commoncpp")))))
106
107 (define-public ccrtp
108 (package
109 (name "ccrtp")
110 (version "2.1.2")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
114 version ".tar.gz"))
115 (sha256 (base32
116 "17ili8l7zqbbkzr1rcy4hlnazkf50mds41wg6n7bfdsx3c7cldgh"))))
117 (build-system gnu-build-system)
118 (inputs `(("ucommon" ,ucommon)
119 ("libgcrypt" ,libgcrypt)))
120 (native-inputs `(("pkg-config" ,pkg-config)))
121 (synopsis "Implementation of RTP (real-time transport protocol)")
122 (description "GNU ccRTP is an implementation of RTP, the real-time transport
123 protocol from the IETF. It is suitable both for high capacity servers and
124 personal client applications. It is flexible in its design, allowing it to
125 function as a framework for the framework, rather than just being a
126 packet-manipulation library.")
127 (license license:gpl2+) ; plus runtime exception
128 (home-page "https://www.gnu.org/software/ccrtp/")))
129
130
131 (define-public osip
132 (package
133 (name "osip")
134 (version "5.0.0")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
138 (patches (search-patches "osip-CVE-2017-7853.patch"))
139 (sha256
140 (base32
141 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
142 (build-system gnu-build-system)
143
144 (synopsis "Library implementing SIP (RFC-3261)")
145 (description "GNU oSIP is an implementation of the SIP protocol. It is
146 used to provide multimedia and telecom software developers with an interface
147 to initiate and control SIP sessions.")
148 (license license:lgpl2.1+)
149 (home-page "https://www.gnu.org/software/osip/")))
150
151
152 (define-public exosip
153 (package
154 (name "exosip")
155 (version "4.1.0")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
159 version ".tar.gz"))
160 (sha256 (base32
161 "17cna8kpc8nk1si419vgr6r42k2lda0rdk50vlxrw8rzg0xp2xrw"))))
162 (build-system gnu-build-system)
163 (inputs `(("osip" ,osip)))
164 (synopsis "Sip abstraction library")
165 (description "EXosip is a library that hides the complexity of using the
166 SIP protocol for multimedia session establishment. This protocol is mainly to
167 be used by VoIP telephony applications (endpoints or conference server) but
168 might be also useful for any application that wish to establish sessions like
169 multiplayer games.")
170 (license license:gpl2+)
171 ;; (plus OpenSSL linking exception)
172 ;; http://git.savannah.gnu.org/cgit/exosip.git/plain/LICENSE.OpenSSL
173 (home-page "https://savannah.nongnu.org/projects/exosip")))
174
175 (define-public sipwitch
176 (package
177 (name "sipwitch")
178 (version "1.9.15")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
182 version ".tar.gz"))
183 (sha256 (base32
184 "10lli9c703d7qbarzc0lgmz963ppncvnrklwrnri0s1zcmmahyia"))))
185 (build-system gnu-build-system)
186 ;; The configure.ac uses pkg-config but in a kludgy way which breaks when
187 ;; cross-compiling. Among other issues there the program name "pkg-config"
188 ;; is hard coded instead of respecting the PKG_CONFIG environment variable.
189 ;; Fortunately we can avoid the use of pkg-config and set the dependency
190 ;; flags ourselves.
191 (arguments `(#:configure-flags
192 `("--without-pkg-config"
193 ,(string-append "UCOMMON_CFLAGS=-I"
194 (assoc-ref %build-inputs "ucommon") "/include")
195 "UCOMMON_LIBS=-lusecure -lucommon -lrt -ldl -lpthread"
196 ,(string-append "LIBOSIP2_CFLAGS=-I"
197 (assoc-ref %build-inputs "osip") "/include")
198 "LIBOSIP2_LIBS=-losipparser2 -losip2"
199 ,(string-append "--sysconfdir=" (assoc-ref %outputs "out")
200 "/etc")
201 "EXOSIP2_LIBS=-leXosip2"
202 ,(string-append "EXOSIP2_CFLAGS=-I"
203 (assoc-ref %build-inputs "exosip")
204 "/include"))))
205 (inputs `(("ucommon" ,ucommon)
206 ("exosip" ,exosip)
207 ("osip" ,osip)))
208 (synopsis "Secure peer-to-peer VoIP server for the SIP protocol")
209 (description "GNU SIP Witch is a peer-to-peer Voice-over-IP server that
210 uses the SIP protocol. Calls can be made from behind NAT firewalls and
211 without the need for a service provider. Its peer-to-peer design ensures that
212 there is no central point for media intercept or capture and thus it can be
213 used to construct a secure telephone system that operates over the public
214 internet.")
215 (license license:gpl3+)
216 (home-page "https://www.gnu.org/software/sipwitch/")))
217
218 (define-public libsrtp
219 (package
220 (name "libsrtp")
221 (version "2.2.0")
222 (source (origin
223 (method url-fetch)
224 (uri (string-append "https://github.com/cisco/libsrtp/archive/v"
225 version ".tar.gz"))
226 (file-name (string-append name "-" version ".tar.gz"))
227 (sha256
228 (base32
229 "02x5l5h2nq6f9gq1bmgz5v9jmnqaab51p8aldglng1z7pjbp9za4"))))
230 (native-inputs
231 `(("psmisc" ,psmisc) ;some tests require 'killall'
232 ("procps" ,procps)))
233 (build-system gnu-build-system)
234 (arguments
235 '(#:test-target "runtest"))
236 (synopsis "Secure RTP (SRTP) Reference Implementation")
237 (description
238 "This package provides an implementation of the Secure Real-time Transport
239 Protocol (@dfn{SRTP}), the Universal Security Transform (@dfn{UST}), and a
240 supporting cryptographic kernel.")
241 (home-page "https://github.com/cisco/libsrtp")
242 (license license:bsd-3)))
243
244 (define-public bctoolbox
245 (package
246 (name "bctoolbox")
247 (version "0.2.0")
248 (source (origin
249 (method url-fetch)
250 (uri (string-append "mirror://savannah/linphone/bctoolbox/bctoolbox-"
251 version ".tar.gz"))
252 (sha256
253 (base32
254 "14ivv6bh6qywys6yyb34scy9w78d636xl1f7cyxm3gwx2qv71lx5"))))
255 (build-system gnu-build-system)
256 (arguments '(#:make-flags '("CFLAGS=-fPIC")))
257 (native-inputs
258 `(("cunit" ,cunit)))
259 (inputs
260 `(("mbedtls" ,mbedtls-apache)))
261 (home-page "https://www.linphone.org")
262 (synopsis "Utilities library for linphone software")
263 (description "BCtoolbox is a utilities library used by Belledonne
264 Communications softwares like linphone.")
265 (license license:gpl2+)))
266
267 (define-public ortp
268 (package
269 (name "ortp")
270 (version "0.27.0")
271 (source (origin
272 (method url-fetch)
273 (uri (string-append "https://download.savannah.nongnu.org/"
274 "releases/linphone/ortp/sources/ortp-"
275 version ".tar.gz"))
276 (sha256
277 (base32
278 "1by0dqdqrj5avzcvjws30g8v5sa61wj12x00sxw0kn1smcrshqgb"))))
279 (build-system gnu-build-system)
280 (inputs
281 `(("bctoolbox" ,bctoolbox)))
282 (native-inputs
283 `(("pkg-config" ,pkg-config)))
284 (home-page "https://linphone.org/")
285 (synopsis "Implementation of the Real-time transport protocol")
286 (description "oRTP is a library implementing the Real-time transport
287 protocol (RFC 3550).")
288 (license license:lgpl2.1+)))
289
290 (define-public libiax2
291 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
292 ;; This is the commit used by the Ring Project.
293 (package
294 (name "libiax2")
295 (version (string-append "0.0.0-1." (string-take commit 7)))
296 (source
297 (origin
298 (method git-fetch)
299 (uri (git-reference
300 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
301 (commit commit)))
302 (file-name (git-file-name name version))
303 (sha256
304 (base32
305 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
306 (build-system gnu-build-system)
307 (native-inputs
308 `(("autoconf" ,autoconf)
309 ("automake" ,automake)
310 ("libtool" ,libtool)))
311 (home-page "https://gitlab.savoirfairelinux.com/sflphone/libiax2")
312 (synopsis "Inter-Asterisk-Protocol library")
313 (description "LibIAX2 implements the Inter-Asterisk-Protocol for relaying
314 Voice-over-IP (VoIP) communications.")
315 ;; The file 'src/md5.c' is released into the public domain by RSA Data
316 ;; Security. The files 'src/answer.h', 'src/miniphone.c',
317 ;; 'src/options.c', 'src/options.h', 'src/ring10.h', 'src/winiphone.c' are
318 ;; covered under the 'GPL'.
319 ;; The package as a whole is distributed under the LGPL 2.0.
320 (license (list license:lgpl2.0
321 license:public-domain
322 license:gpl2+)))))
323
324 (define-public seren
325 (package
326 (name "seren")
327 (version "0.0.21")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "http://holdenc.altervista.org/"
331 "seren/downloads/seren-" version
332 ".tar.gz"))
333 (sha256
334 (base32
335 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
336 (build-system gnu-build-system)
337 (arguments '(#:tests? #f)) ; no "check" target
338 (inputs
339 `(("alsa-lib" ,alsa-lib)
340 ("gmp" ,gmp)
341 ("libogg" ,libogg)
342 ("ncurses" ,ncurses)
343 ("opus" ,opus)))
344 (synopsis "Simple VoIP program to create conferences from the terminal")
345 (description
346 "Seren is a simple VoIP program based on the Opus codec that allows you
347 to create a voice conference from the terminal, with up to 10 participants,
348 without having to register accounts, exchange emails, or add people to contact
349 lists. All you need to join an existing conference is the host name or IP
350 address of one of the participants.")
351 (home-page "http://holdenc.altervista.org/seren/")
352 (license license:gpl3+)))
353
354 (define-public mumble
355 (package
356 (name "mumble")
357 (version "1.2.19")
358 (source (origin
359 (method url-fetch)
360 (uri (string-append "https://mumble.info/snapshot/"
361 name "-" version ".tar.gz"))
362 (sha256
363 (base32
364 "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh"))
365 (patches (search-patches "mumble-1.2.19-abs.patch"))
366 (modules '((guix build utils)))
367 (snippet
368 `(begin
369 ;; Remove bundled software.
370 (for-each delete-file-recursively '("3rdparty"
371 "speex"
372 "speexbuild"
373 "opus-build"
374 "opus-src"
375 "sbcelt-helper-build"
376 "sbcelt-lib-build"
377 "sbcelt-src"))
378 ;; TODO: Celt is still bundled. It has been merged into Opus
379 ;; and will be removed after 1.3.0.
380 ;; https://github.com/mumble-voip/mumble/issues/1999
381 #t))))
382 (build-system gnu-build-system)
383 (arguments
384 `(#:tests? #f ; no "check" target
385 #:phases
386 (modify-phases %standard-phases
387 (replace 'configure
388 (lambda* (#:key outputs #:allow-other-keys)
389 (invoke "qmake" "main.pro" "-recursive"
390 (string-append "CONFIG+="
391 (string-join
392 (list "no-update"
393 "no-ice"
394 "no-embed-qt-translations"
395 "no-bundled-speex"
396 "pch"
397 "no-bundled-opus"
398 "no-celt"
399 "no-alsa"
400 "no-oss"
401 "no-portaudio"
402 "speechd"
403 "no-g15"
404 "no-bonjour"
405 "release")))
406 (string-append "DEFINES+="
407 "PLUGIN_PATH="
408 (assoc-ref outputs "out")
409 "/lib/mumble"))))
410 (add-before 'configure 'fix-libspeechd-include
411 (lambda _
412 (substitute* "src/mumble/TextToSpeech_unix.cpp"
413 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))))
414 (replace 'install ; install phase does not exist
415 (lambda* (#:key inputs outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (etc (string-append out "/etc/murmur"))
418 (dbus (string-append out "/etc/dbus-1/system.d/"))
419 (bin (string-append out "/bin"))
420 (services (string-append out "/share/services"))
421 (applications (string-append out "/share/applications"))
422 (icons (string-append out "/share/icons/hicolor/scalable/apps"))
423 (man (string-append out "/share/man/man1"))
424 (lib (string-append out "/lib/mumble")))
425 (install-file "release/mumble" bin)
426 (install-file "scripts/mumble-overlay" bin)
427 (install-file "scripts/mumble.protocol" services)
428 (install-file "scripts/mumble.desktop" applications)
429 (install-file "icons/mumble.svg" icons)
430 (install-file "man/mumble-overlay.1" man)
431 (install-file "man/mumble.1" man)
432 (install-file "release/murmurd" bin)
433 (install-file "scripts/murmur.ini.system" etc)
434 (rename-file (string-append etc "/murmur.ini.system")
435 (string-append etc "/murmur.ini"))
436 (install-file "scripts/murmur.conf" dbus)
437 (install-file "man/murmurd.1" man)
438 (for-each (lambda (file) (install-file file lib))
439 (find-files "." "\\.so\\."))
440 (for-each (lambda (file) (install-file file lib))
441 (find-files "release/plugins" "\\.so$"))))))))
442 (inputs
443 `(("avahi" ,avahi)
444 ("protobuf" ,protobuf)
445 ("openssl" ,openssl)
446 ("libsndfile" ,libsndfile)
447 ("boost" ,boost)
448 ("opus" ,opus)
449 ("speex" ,speex)
450 ("speexdsp" ,speexdsp)
451 ("speech-dispatcher" ,speech-dispatcher)
452 ("libx11" ,libx11)
453 ("libxi" ,libxi)
454 ("qt-4" ,qt-4)
455 ("alsa-lib" ,alsa-lib)
456 ("pulseaudio" ,pulseaudio)))
457 (native-inputs
458 `(("pkg-config" ,pkg-config)))
459 (synopsis "Low-latency, high quality voice chat software")
460 (description
461 "Mumble is an low-latency, high quality voice chat
462 software primarily intended for use while gaming.
463 Mumble consists of two applications for separate usage:
464 @code{mumble} for the client, and @code{murmur} for the server.")
465 (home-page "https://wiki.mumble.info/wiki/Main_Page")
466 (license (list license:bsd-3
467 ;; The bundled celt is bsd-2. Remove after 1.3.0.
468 license:bsd-2))))
469
470 (define-public twinkle
471 (let ((commit "02e1d1538af3337134bd7381dcd95f8d7775b30f")
472 (revision "1"))
473 (package
474 (name "twinkle")
475 (version (git-version "1.10.1" revision commit))
476 (source (origin
477 (method git-fetch)
478 (uri (git-reference
479 (url "https://github.com/LubosD/twinkle")
480 (commit commit)))
481 (patches
482 (search-patches "twinkle-include-qregexpvalidator.patch"))
483 (file-name (git-file-name name version))
484 (sha256
485 (base32
486 "0ds4rp4vr1wagn4m4m7ldqbsx5vgmgbfcqqgyhn1wf6s1dm0020z"))))
487 (build-system cmake-build-system)
488 (arguments
489 `(#:tests? #f ; no test target
490 #:configure-flags '("-DWITH_SPEEX=On")
491 #:phases
492 (modify-phases %standard-phases
493 (add-after 'install 'wrap-executable
494 (lambda* (#:key inputs outputs #:allow-other-keys)
495 (let ((out (assoc-ref outputs "out")))
496 (wrap-program (string-append out "/bin/twinkle")
497 `("QT_PLUGIN_PATH" ":" prefix
498 ,(map (lambda (label)
499 (string-append (assoc-ref inputs label)
500 "/lib/qt5/plugins"))
501 '("qtbase" "qtdeclarative")))
502 `("QML2_IMPORT_PATH" ":" prefix
503 ,(map (lambda (label)
504 (string-append (assoc-ref inputs label)
505 "/lib/qt5/qml"))
506 '("qtdeclarative" "qtquickcontrols"))))
507 #t))))))
508 (native-inputs
509 `(("bison" ,bison)
510 ("flex" ,flex)
511 ("readline" ,readline)
512 ("file" ,file)
513 ("ucommon" ,ucommon)
514 ("ccrtp" ,ccrtp)
515 ("libxml2" ,libxml2)
516 ("speex" ,speex)
517 ("speexdsp" ,speexdsp)
518 ("libsndfile" ,libsndfile)
519 ("alsa-lib" ,alsa-lib)
520 ("qttools" ,qttools)))
521 (inputs
522 `(("qtbase" ,qtbase)
523 ("qtdeclarative" ,qtdeclarative)
524 ("qtquickcontrols" ,qtquickcontrols)))
525 (home-page "http://twinkle.dolezel.info/")
526 (synopsis "Softphone for voice over IP and instant messaging")
527 (description "Twinkle is a softphone for your voice over IP and instant
528 messaging communcations using the SIP protocol. You can use it for direct IP
529 phone to IP phone communication or in a network using a SIP proxy to route your
530 calls and messages")
531 (license license:gpl2+))))