aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-01-27 18:57:44 -0500
committerLeo Prikler <leo.prikler@student.tugraz.at>2021-01-31 09:22:50 +0100
commit27fa48443aa684bcb8f7604c4bae80c436052dcc (patch)
tree32acc2cb2a8c8eb4b4ea331a0e5533210ba6a269 /gnu
parentcda5fb481c404ca64d7e9cdda9f26c9ea36e216e (diff)
downloadguix-27fa48443aa684bcb8f7604c4bae80c436052dcc.tar.gz
guix-27fa48443aa684bcb8f7604c4bae80c436052dcc.zip
gnu: Add libtgvoip-for-telegram-desktop.
* gnu/packages/telegram.scm (libtgvoip-for-telegram-desktop): New variable. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/telegram.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 18fcc0569b..9de9a84e3b 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -20,6 +20,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages animation)
#: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)
@@ -27,6 +28,7 @@
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages telephony)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
#:use-module (gnu packages xiph)
@@ -34,6 +36,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 webrtc-for-telegram-desktop
@@ -179,3 +182,47 @@ Telegram project, for its use in telegram desktop client.")
(("werror=true")
"werror=false"))
#t)))))))))
+
+(define-public libtgvoip-for-telegram-desktop
+ (let ((commit "37d98e984fd6fa389262307db826d52ab86c8241")
+ (revision "87"))
+ (hidden-package
+ (package
+ (inherit libtgvoip)
+ (version
+ (git-version "2.4.4" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/telegramdesktop/libtgvoip.git")
+ (commit commit)))
+ (file-name
+ (git-file-name "libtgvoip-for-telegram-desktop" version))
+ (sha256
+ (base32 "13dzvyq8p20nlhjihv18aj6y97czk07qdl0k6v81vp6mbwcldg7h"))))
+ (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)))))))