>From e83b805f35c59f0b0ec9a6b97db7105b4ca773ac Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 21 Jan 2021 19:28:34 -0500 Subject: [PATCH 14/18] gnu: Add tg-voip. * gnu/packages/telegram.scm (tg-voip): New variable. --- gnu/packages/telegram.scm | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index e518a8dcd3..f47c82277c 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -19,6 +19,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages) #:use-module (gnu packages assembly) + #:use-module (gnu packages autotools) #:use-module (gnu packages check) #:use-module (gnu packages image) #:use-module (gnu packages linux) @@ -33,6 +34,7 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module (guix build-system meson)) (define-public tg-owt @@ -186,3 +188,53 @@ in telegram-desktop. Rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime.") (home-page "https://github.com/desktop-app/rlottie") (license license:expat)))) + +(define-public tg-voip + (package + (name "tg-voip") + (version "2.4.4") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/telegramdesktop/libtgvoip.git") + (commit "37d98e984fd6fa389262307db826d52ab86c8241"))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "13dzvyq8p20nlhjihv18aj6y97czk07qdl0k6v81vp6mbwcldg7h")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list + "--disable-static" + "--disable-dsp" ; FIXME + "--enable-audio-callback" + "--with-alsa" + "--with-pulse") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-linkers + (lambda _ + (substitute* "Makefile.am" + (("\\$\\(CRYPTO_LIBS\\) \\$\\(OPUS_LIBS\\)") + "$(CRYPTO_LIBS) $(OPUS_LIBS) $(ALSA_LIBS) $(PULSE_LIBS)")) + (substitute* "tgvoip.pc.in" + (("libcrypto opus") + "libcrypto opus alsa libpulse")) + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("alsa" ,alsa-lib) + ("openssl" ,openssl) + ("opus" ,opus) + ("pulseaudio" ,pulseaudio))) + (synopsis "Telegram VoIP Library") + (description "Tg-VoIP is the VoIP library for Telegram Desktop application.") + (home-page "https://github.com/telegramdesktop/libtgvoip") + (license license:unlicense))) -- 2.30.0