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>
23 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
94 (define-public spandsp
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"))
107 (base32 "0rclrkyspzk575v8fslzjpgp4y2s4x7xk3r55ycvpi4agv33l1fc"))))
108 (build-system gnu-build-system)
109 (outputs '("out" "doc" "static")) ;doc contains HTML documentation
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
117 ;; spandsp looks at hard coded locations of the FHS to
119 (substitute* "configure.ac"
120 (("AC_MSG_CHECKING\\(for libxml/xmlmemory\\.h.*" 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")
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
133 (substitute* '("test-data/itu/fax/Makefile.am"
134 "test-data/etsi/fax/Makefile.am")
135 (("nobase_data_DATA")
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)
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)
152 (string-append static "/"
154 (find-files "lib" "\\.a$")))
157 `(("autoconf" ,autoconf)
158 ("automake" ,automake)
160 ("pkg-config" ,pkg-config)
164 ("libsndfile" ,libsndfile)
168 ;; For the documentation
169 ("docbook-xml" ,docbook-xml-4.3)
170 ("docbook-xsl" ,docbook-xsl)
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
185 (define-public commoncpp
191 (uri (string-append "mirror://gnu/" name "/commoncpp2-"
194 "0kmgr5w3b1qwzxnsnw94q6rqs0hr8nbv9clf07ca2a2fyypx9kjk"))))
197 (modify-phases %standard-phases
198 (add-before 'configure 'pre-configure
200 (substitute* "src/applog.cpp"
201 (("^// TODO sc.*") "#include <sys/types.h>\n#include <sys/stat.h>\n"))
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
210 (license license:gpl2+) ; plus runtime exception
211 (home-page "https://www.gnu.org/software/commoncpp/")))
213 (define-public ucommon
219 (uri (string-append "mirror://gnu/commoncpp/" name "-"
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
230 (license license:gpl3+)
231 (home-page "https://www.gnu.org/software/commoncpp/")
232 (properties '((ftp-directory . "/gnu/commoncpp")))))
240 (uri (string-append "mirror://gnu/ccrtp/ccrtp-"
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/")))
264 (uri (string-append "mirror://gnu/osip/libosip2-" version ".tar.gz"))
265 (patches (search-patches "osip-CVE-2017-7853.patch"))
268 "00yznbrm9q04wgd4b831km8iwlvwvsnwv87igf79g5vj9yakr88q"))))
269 (build-system gnu-build-system)
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/")))
279 (define-public exosip
285 (uri (string-append "mirror://savannah/exosip/libeXosip2-"
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
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")))
302 (define-public sipwitch
308 (uri (string-append "mirror://gnu/sipwitch/sipwitch-"
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
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")
328 "EXOSIP2_LIBS=-leXosip2"
329 ,(string-append "EXOSIP2_CFLAGS=-I"
330 (assoc-ref %build-inputs "exosip")
332 (inputs `(("ucommon" ,ucommon)
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
342 (license license:gpl3+)
343 (home-page "https://www.gnu.org/software/sipwitch/")))
345 (define-public libsrtp
352 (url "https://github.com/cisco/libsrtp")
353 (commit (string-append "v" version))))
354 (file-name (git-file-name name version))
357 "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"))))
359 `(("psmisc" ,psmisc) ;some tests require 'killall'
361 (build-system gnu-build-system)
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)
371 (add-after 'install 'remove-static-library
372 (lambda* (#:key outputs #:allow-other-keys)
373 (delete-file (string-append (assoc-ref outputs "out")
376 (synopsis "Secure RTP (SRTP) Reference Implementation")
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)))
384 (define-public libiax2
385 (let ((commit "0e5980f1d78ce462e2d1ed6bc39ff35c8341f201"))
386 ;; This is the commit used by the Ring Project.
389 (version (string-append "0.0.0-1." (string-take commit 7)))
394 (url "https://gitlab.savoirfairelinux.com/sflphone/libiax2.git")
396 (file-name (git-file-name name version))
399 "0d269474kk1933c55hx4azw3sak5ycfrxkw6ida0sb2cm00kfich"))))
400 (build-system gnu-build-system)
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
424 (uri (string-append "http://holdenc.altervista.org/"
425 "seren/downloads/seren-" version
429 "06mams6bng7ib7p2zpfq88kdr4ffril9svzc9lprkb0wjgmkglk9"))))
430 (build-system gnu-build-system)
431 (arguments '(#:tests? #f)) ; no "check" target
433 `(("alsa-lib" ,alsa-lib)
438 (synopsis "Simple VoIP program to create conferences from the terminal")
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+)))
448 (define-public mumble
454 (uri (string-append "https://mumble.info/snapshot/"
455 name "-" version ".tar.gz"))
458 "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs"))
459 (modules '((guix build utils)))
462 ;; Remove bundled software. Keep arc4random, celt-0.7.0,
463 ;; celt-0.11.0, qqbonjour, rnnoise, smallft.
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
473 "3rdparty/sbcelt-helper-build" ; not enabled
474 "3rdparty/sbcelt-lib-build"
475 "3rdparty/sbcelt-src"
476 "3rdparty/speex-build" ; in speex
478 "3rdparty/speexdsp-src" ; in speexdsp
479 "3rdparty/xinputcheck-build" ; for win32
480 "3rdparty/xinputcheck-src"))
482 (build-system qt-build-system)
484 `(#:tests? #f ; no "check" target
486 (modify-phases %standard-phases
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")
493 (string-append "CONFIG+="
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
503 "no-alsa" ; use pulse
505 "no-embed-qt-translations"
506 "no-ice" ; not packaged
509 (string-append "DEFINES+="
511 (assoc-ref outputs "out")
513 (add-before 'configure 'fix-libspeechd-include
515 (substitute* "src/mumble/TextToSpeech_unix.cpp"
516 (("libspeechd.h") "speech-dispatcher/libspeechd.h"))
518 ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
519 (add-before 'configure 'fix-statistic-gathering-default
521 (substitute* "src/mumble/Settings.cpp"
522 (("bUsage = true;") "bUsage = false;"))
524 (add-before 'install 'disable-murmur-ice
526 (substitute* "scripts/murmur.ini.system"
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$"))))))))
560 ("libsndfile" ,libsndfile)
562 ("mesa" ,mesa) ; avoid bundled
564 ("opus" ,opus) ; avoid bundled
565 ("protobuf" ,protobuf)
566 ("pulseaudio" ,pulseaudio)
569 ("speech-dispatcher" ,speech-dispatcher)
570 ("speex" ,speex) ; avoid bundled
571 ("speexdsp" ,speexdsp))) ; avoid bundled
573 `(("pkg-config" ,pkg-config)
575 ("qttools" ,qttools)))
576 (synopsis "Low-latency, high quality voice chat software")
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
587 (define-public twinkle
594 (url "https://github.com/LubosD/twinkle")
595 (commit (string-append "v" version))))
596 (file-name (git-file-name name version))
599 "0s0gi03xwvzp02ah4q6j33r9jx9nbayr6dxlg2ck9pwbay1nq1hx"))))
600 (build-system cmake-build-system)
602 `(#:tests? #f ; no test target
603 #:configure-flags '("-DWITH_SPEEX=On")
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)
614 '("qtbase" "qtdeclarative")))
615 `("QML2_IMPORT_PATH" ":" prefix
616 ,(map (lambda (label)
617 (string-append (assoc-ref inputs label)
619 '("qtdeclarative" "qtquickcontrols"))))
624 ("readline" ,readline)
630 ("speexdsp" ,speexdsp)
631 ("libsndfile" ,libsndfile)
632 ("alsa-lib" ,alsa-lib)
633 ("qttools" ,qttools)))
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
644 (license license:gpl2+)))
646 (define-public pjproject
654 (url "https://github.com/pjsip/pjproject.git")
655 (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
656 (modules '((guix build utils)))
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)
677 (let ((third-party-dirs
678 (list "gsm" "ilbc" "speex" "g7221" "srtp"
679 "portaudio" "resample")))
682 (substitute* "third_party/build/os-linux.mak"
683 (((string-append "DIRS += " dirs)) "")))
685 (file-name (git-file-name name version))
688 "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
689 (build-system gnu-build-system)
691 `(("portaudio" ,portaudio)))
693 ;; These packages are referenced in the Libs field of the pkg-config
694 ;; file that will be installed by pjproject.
698 ("resample", resample)
699 ("util-linux" ,util-linux "lib")))
701 `(("autoconf" ,autoconf)
702 ("automake" ,automake)
703 ("pkg-config" ,pkg-config)
704 ("libtool" ,libtool)))
706 `(;; FIXME make: No rule to make target
707 ;; 'pjlib-test-unknown-[something]-gnu'.
709 ;; #:test-target "selftest"
711 (modify-phases %standard-phases
712 (add-before 'build 'build-dep
713 (lambda _ (invoke "make" "dep")))
714 (add-before 'patch-source-shebangs 'autoconf
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
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"))
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+)))
732 (define %jami-version "20191101.3.67671e7")
734 (define* (jami-source #:key without-daemon)
737 (uri (string-append "https://dl.jami.net/ring-release/tarballs/ring_"
740 (modules '((guix build utils)))
744 (delete-file-recursively "daemon/contrib"))
748 "0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
750 (define-public pjproject-jami
753 (name "pjproject-jami")
755 `(("savoir-faire-linux-patches" ,(jami-source))
756 ,@(package-native-inputs pjproject)))
759 ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
761 (list "--disable-oss"
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"
780 "--disable-libwebrtc"
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;
790 (modify-phases %standard-phases
791 (add-after 'unpack 'make-git-checkout-writable
793 (for-each make-file-writable (find-files "."))
795 (add-after 'unpack 'apply-patches
796 (lambda* (#:key inputs #:allow-other-keys)
797 (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
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"
808 "fix_ioqueue_ipv6_sendto"
813 "fix_first_packet_turn_tcp"
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")
826 (invoke "patch" "--force" "-p1" "-i"
827 (string-append savoir-faire-linux-patches-directory "/"
829 savoir-faire-linux-patches))
831 ;; TODO: We could use substitute-keyword-arguments instead of
832 ;; repeating the phases from pjproject, but somehow it does
834 (add-before 'build 'build-dep
835 (lambda _ (invoke "make" "dep")))
836 (add-before 'patch-source-shebangs 'autoconf
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
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"))
849 (define-public libring
852 (version %jami-version)
853 (source (jami-source #:without-daemon #t))
854 (build-system gnu-build-system)
856 ;; Missing (optional?) dep: libnatpmp.
857 `(("alsa-lib" ,alsa-lib)
859 ("dbus-c++" ,dbus-c++)
872 ("pulseaudio" ,pulseaudio)
873 ("libsamplerate" ,libsamplerate)
874 ("libsndfile" ,libsndfile)
876 ("speexdsp" ,speexdsp)
878 ("libvorbis" ,libvorbis)
880 ("libvdpau" ,libvdpau)
881 ("yaml-cpp" ,yaml-cpp)
884 ("libsecp256k1" ,libsecp256k1)
886 ("python-wrapper" ,python-wrapper)
887 ("restinio" ,restinio)
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)))
894 `(("autoconf" ,autoconf)
895 ("automake" ,automake)
897 ("pkg-config" ,pkg-config)
900 ("perl" ,perl))) ; Needed for documentation.
902 `(#:tests? #f ; The tests fail to compile due to missing headers.
904 (modify-phases %standard-phases
905 (add-after 'unpack 'change-directory
909 (add-before 'build 'add-lib-dir
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.
919 This package provides a library and daemon implementing the Jami core
921 (home-page "https://jami.net/")
922 (license license:gpl3+)))
924 (define-public libringclient
927 (name "libringclient")
928 (build-system cmake-build-system)
930 `(("libring" ,libring) ; For 'dring'.
931 ("qtbase" ,qtbase) ; Qt is included in several installed headers.
932 ("qttools" ,qttools)))
934 `(#:tests? #f ; There is no testsuite.
936 (list (string-append "-DRING_BUILD_DIR="
937 (assoc-ref %build-inputs "libring") "/include"))
939 (modify-phases %standard-phases
940 (add-after 'unpack 'change-directory
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.
956 This package provides a library common to all Jami clients.")
957 (home-page "https://jami.net")
958 (license license:gpl3+)))
964 (build-system cmake-build-system)
966 `(("libringclient" ,libringclient)
968 ("qrencode" ,qrencode)
969 ("libnotify" ,libnotify)
971 ("clutter-gtk" ,clutter-gtk)
972 ("libcanberra" ,libcanberra)
973 ("webkitgtk" ,webkitgtk)))
975 `(("pkg-config" ,pkg-config)
976 ("gettext" ,gettext-minimal)
977 ("glib:bin" ,glib "bin")
978 ("doxygen" ,doxygen)))
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)))
984 `(#:tests? #f ; There is no testsuite.
986 (modify-phases %standard-phases
987 (add-after 'unpack 'change-directory
989 (chdir "client-gnome")
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.
997 This package provides the Jami client for the GNOME desktop.")
998 (home-page "https://jami.net")
999 (license license:gpl3+)))
1001 (define-public jami-client-gnome
1002 (deprecated-package "jami-client-gnome" jami))
1004 (define-public libtgvoip
1012 (url "https://github.com/grishka/libtgvoip.git")
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.
1019 (search-patches "libtgvoip-disable-webrtc.patch"
1020 "libtgvoip-disable-sse2.patch"))
1023 "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
1024 (build-system gnu-build-system)
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)))