all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Raghav Gururajan <rg@raghavgururajan.name>
To: guix-devel@gnu.org
Subject: Re: [Telegram-Desktop]: Help with packaging
Date: Mon, 11 Jan 2021 22:32:54 -0500	[thread overview]
Message-ID: <c97857f9-2a17-7007-fac0-d1b7f298daa4@raghavgururajan.name> (raw)
In-Reply-To: <671cd289-5c83-3673-34f9-8287ff7c30a8@raghavgururajan.name>

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

Hello Guix!

Currently, while building tdesktop, I get this error 
(https://paste.debian.net/plain/1180757).

New diff file is attached with this email, which is to be applied on top 
off master (efa773f94a18b40f2c63795f364ae87dade76f60).

Any ideas on how to rectify this error?

Regards,
RG.

[-- Attachment #2: telegram.diff --]
[-- Type: text/x-patch, Size: 51023 bytes --]

diff --git a/gnu/local.mk b/gnu/local.mk
index 1151d4642e..788f1d736e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -534,6 +534,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/task-management.scm		\
   %D%/packages/tbb.scm				\
   %D%/packages/tcl.scm				\
+  %D%/packages/telegram.scm                 \
   %D%/packages/telephony.scm			\
   %D%/packages/terminals.scm			\
   %D%/packages/terraform.scm			\
@@ -1124,6 +1125,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
   %D%/packages/patches/grub-setup-root.patch			\
   %D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \
+  %D%/packages/patches/gsl-gtest.patch                                \
   %D%/packages/patches/gspell-dash-test.patch			\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
@@ -1288,8 +1290,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch	\
   %D%/packages/patches/libquicktime-ffmpeg.patch 		\
   %D%/packages/patches/libtar-CVE-2013-4420.patch 		\
-  %D%/packages/patches/libtgvoip-disable-sse2.patch 		\
-  %D%/packages/patches/libtgvoip-disable-webrtc.patch 		\
+  %D%/packages/patches/libtgvoip-pkgconfig.patch             \
   %D%/packages/patches/libtheora-config-guess.patch		\
   %D%/packages/patches/libtirpc-hurd.patch			\
   %D%/packages/patches/libtirpc-hurd-client.patch		\
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 56b32792fe..ab74650066 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -31,6 +31,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix deprecation)
   #:use-module (guix build-system gnu)
@@ -43,6 +44,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages file)
   #:use-module (gnu packages hurd)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages serialization)
@@ -52,6 +54,33 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
+(define-public cmake-shared
+  (package
+    (name "cmake-shared")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/lirios/cmake-shared.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1srd3jmlalf0szgyp88ymhbnwds4qiywmf8lq1pif9g8irjjhdry"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))                    ; No target
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)))
+    (synopsis "Shared CMake functions and macros")
+    (description "CMake-Shared are shared functions and macros for projects
+using the CMake build system.")
+    (home-page "https://github.com/lirios/cmake-shared/")
+    (license license:bsd-3)))
+
 ;;; Build phases shared between 'cmake-bootstrap' and the later variants
 ;;; that use cmake-build-system.
 (define %common-build-phases
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 45d3faeafb..4295e6cc3d 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -39,16 +39,19 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libunwind)
@@ -63,6 +66,96 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web))
 
+(define-public rlottie
+  (package
+    (name "rlottie")
+    (version "0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/Samsung/rlottie.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "10bxr1zf9wxl55d4cw2j02r6sgqln7mbxplhhfvhw0z92fi40kr3"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-Dlog=true"
+        "-Dtest=true")))
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Lottie Animation Library")
+    (description "Rlottie is a platform independent standalone c++ library for
+rendering vector based animations and art in realtime.")
+    (home-page "https://github.com/Samsung/rlottie/")
+    (license license:expat)))
+
+(define-public range-v3
+  (package
+    (name "range-v3")
+    (version "0.11.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/ericniebler/range-v3.git")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("perl" ,perl)))
+    (inputs
+     `(("boost" ,boost)))
+    (synopsis "Range library for C++14/17/20")
+    (description "Range-v3 is the range library for C++14/17/20.  This code was
+the basis of a formal proposal to add range support to the C++ standard library.")
+    (home-page "https://github.com/ericniebler/range-v3/")
+    (license
+     (list
+      ;; Dual-Licensed
+      license:expat
+      license:ncsa))))
+
+(define-public gsl
+  (package
+    (name "gsl")
+    (version "3.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/microsoft/GSL.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (patches
+        (search-patches "gsl-gtest.patch"))
+       (sha256
+        (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("googletest" ,googletest)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Guidelines Support Library")
+    (description "GSL contains functions and types that are suggested for use by
+the C++ Core Guidelines maintained by the Standard C++ Foundation.")
+    (home-page "https://github.com/microsoft/GSL/")
+    (license license:expat)))
+
 (define-public libzen
   (package
     (name "libzen")
diff --git a/gnu/packages/fcitx.scm b/gnu/packages/fcitx.scm
index d52edf1750..18d7d4ee34 100644
--- a/gnu/packages/fcitx.scm
+++ b/gnu/packages/fcitx.scm
@@ -19,11 +19,13 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages fcitx)
-  #:use-module ((guix licenses) #:select (gpl2+))
+  #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix build-system qt)
   #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages enchant)
@@ -33,14 +35,69 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages xdisorg))
+
+(define-public fcitx-qt5
+  (package
+    (name "fcitx-qt5")
+    (version "1.2.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/fcitx/fcitx-qt5.git")
+         (commit version)))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1d56bp11jp85b2r4syw1clfg4vqxqfh7gygpwz8wk5sxmfmmdq83"))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "quickphrase-editor/CMakeLists.txt"
+               (("\\$\\{FCITX4_ADDON_INSTALL_DIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/fcitx")))
+             (substitute* "platforminputcontext/CMakeLists.txt"
+               (("\\$\\{CMAKE_INSTALL_QTPLUGINDIR\\}")
+                (string-append
+                 (assoc-ref outputs "out")
+                 "/lib/qt5/plugins")))
+             #t)))))
+    (native-inputs
+     `(("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("fcitx" ,fcitx)
+       ("libintl" ,intltool)
+       ("libxkbcommon" ,libxkbcommon)))
+    (propagated-inputs
+     `(("qtbase" ,qtbase)))
+    (synopsis "Fcitx Qt5 Input Context")
+    (description "Fcitx support for Qt5")
+    (home-page "https://github.com/fcitx/fcitx-qt5/")
+    (license
+     (list
+      ;; Plugin
+      bsd-3
+      ;; Others
+      gpl2+))))
 
 (define-public presage
   (package
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index ef35349ec2..6dd37005ae 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -2021,14 +2021,15 @@ useful with system integration.")
        ("xvfb" ,xorg-server-for-tests)))
     (inputs
      `(("dbus-glib" ,dbus-glib)
-       ("gtk+" ,gtk+)
-       ("libdbusmenu" ,libdbusmenu)
        ("libindicator" ,libindicator)
        ("python@2" ,python-2)
        ("python2-pygtk" ,python2-pygtk)
        ("python2-pygobject-2" ,python2-pygobject-2)
        ;; ("mono" ,mono) ; requires non-packaged gapi
        ("vala" ,vala)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+)
+       ("libdbusmenu" ,libdbusmenu)))
     (arguments
      ;; FIXME: do not hardcode gtk version
      `(#:configure-flags '("--with-gtk=3")
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 3f17465039..1d1fe94690 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -23,36 +23,278 @@
 
 (define-module (gnu packages language)
   #:use-module (gnu packages)
+  #:use-module (gnu packages anthy)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages audio)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages emacs)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages ibus)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ocr)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl-check)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
   #:use-module (guix packages)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses)
                 #:select
-                (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ perl-license zpl2.1))
+                (bsd-3 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ perl-license zpl2.1 fdl1.2+))
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix utils))
 
+(define-public nimf
+  (package
+    (name "nimf")
+    (version "1.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/hamonikr/nimf.git")
+         (commit
+          (string-append "nimf-" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "01qi7flmaqrn2fk03sa42r0caks9d8lsv88s0bgxahhxwk1x76gc"))))
+    (build-system glib-or-gtk-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:configure-flags
+       (list
+        "--with-im-config-data"
+        "--with-imsettings-data"
+        (string-append "--with-html-dir="
+                       (assoc-ref %outputs "doc")
+                       "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-flags
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "configure.ac"
+               (("-Werror")
+                "-Wno-error"))
+             #t))
+         (add-after 'patch-flags 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs"
+               (substitute* "nimf-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             #t))
+         (add-after 'patch-docbook-xml 'patch-paths
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* "configure.ac"
+               (("/usr/share/anthy/anthy.dic")
+                (string-append (assoc-ref inputs "anthy")
+                               "/share/anthy/anthy.dic")))
+             (substitute* "configure.ac"
+               (("/usr/bin:\\$GTK3_LIBDIR/libgtk-3-0")
+                (string-append (assoc-ref inputs "gtk+:bin")
+                               "/bin:$GTK3_LIBDIR/libgtk-3-0"))
+               (("/usr/bin:\\$GTK2_LIBDIR/libgtk2.0-0")
+                (string-append (assoc-ref inputs "gtk+-2:bin")
+                               "/bin:$GTK2_LIBDIR/libgtk2.0-0")))
+             (substitute* "modules/clients/gtk/Makefile.am"
+               (("\\$\\(GTK3_LIBDIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib"))
+               (("\\$\\(GTK2_LIBDIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib")))
+             (substitute* "modules/clients/qt4/Makefile.am"
+               (("\\$\\(QT4_LIB_DIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib")))
+             (substitute* "modules/clients/qt5/Makefile.am"
+               (("\\$\\(QT5_IM_MODULE_DIR\\)")
+                (string-append (assoc-ref outputs "out")
+                               "/lib/qt5/plugins/inputmethods")))
+             (substitute* '("bin/nimf-settings/Makefile.am"
+                            "data/apparmor-abstractions/Makefile.am"
+                            "data/Makefile.am" "data/im-config/Makefile.am"
+                            "data/imsettings/Makefile.am")
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc"))
+               (("/usr/share")
+                (string-append (assoc-ref outputs "out")
+                               "/share")))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("gettext" ,gettext-minimal)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+-2:bin" ,gtk+-2 "bin")
+       ("gtk+:bin" ,gtk+ "bin")
+       ("gtk-doc" ,gtk-doc)
+       ("intltool" ,intltool)
+       ("libtool" ,libtool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("which" ,which)))
+    (inputs
+     `(("anthy" ,anthy)
+       ("appindicator" ,libappindicator)
+       ("gtk+-2" ,gtk+-2)
+       ("gtk+" ,gtk+)
+       ("hangul" ,libhangul)
+       ("m17n-db" ,m17n-db)
+       ("m17n-lib" ,m17n-lib)
+       ("qt-4" ,qt-4)
+       ("qtbase" ,qtbase)
+       ("rime" ,librime)
+       ("rsvg" ,librsvg)
+       ("wayland" ,wayland)
+       ("wayland-protocols" ,wayland-protocols)
+       ("x11" ,libx11)
+       ("xkbcommon" ,libxkbcommon)
+       ("xklavier" ,libxklavier)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Korean input method framework")
+    (description "Nimf is a lightweight, fast and extensible input method
+framework.")
+    (home-page "https://github.com/hamonikr/nimf/")
+    (license lgpl3+)))
+
+(define-public libchewing
+  (package
+    (name "libchewing")
+    (version "0.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/chewing/libchewing.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "04d09w6xdd08v6laj9y4qmqsijw5i2jvshcilhh4vg6cfnfgl2my"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (substitute* "test/Makefile.am"
+               (("	test-bopomofo ")
+                "")
+               (("	test-config ")
+                "")
+               (("	test-reset ")
+                "")
+               (("	test-symbol ")
+                "")
+               (("	test-keyboardless ")
+                "")
+               (("	test-special-symbol ")
+                ""))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("texinfo" ,texinfo)))
+    (inputs
+     `(("ncurses" ,ncurses)
+       ("sqlite" ,sqlite)))
+    (synopsis "Chinese phonetic input method")
+    (description "Chewing is an intelligent phonetic (Zhuyin/Bopomofo) input
+method, one of the most popular choices for Traditional Chinese users.")
+    (home-page "http://chewing.im/")
+    (license lgpl2.1+)))
+
+(define-public hime
+  (package
+    (name "hime")
+    (version "0.9.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/hime-ime/hime.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1wn0ici78x5qh6hvv50bf76ld7ds42hzzl4l5qz34hp8wyvrwakw"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:configure-flags
+       (list
+        ;; FIXME
+        ;; error: unknown type name ‘GtkStatusIcon’
+        "--disable-system-tray")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-std
+           (lambda _
+             (substitute* '("configure" "Makefile")
+               (("17")
+                "11"))
+             #t)))))
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("pkg-config" ,pkg-config)
+       ("whereis" ,util-linux)))
+    (inputs
+     `(("anthy" ,anthy)
+       ("appindicator" ,libappindicator)
+       ("chewing" ,libchewing)
+       ("gtk+" ,gtk+)
+       ("qtbase" ,qtbase)
+       ("xtst" ,libxtst)))
+    (synopsis "HIME Input Method Editor")
+    (description "Hime is an extremely easy-to-use input method framework.  It
+is lightweight, stable, powerful and supports many commonly used input methods,
+including Cangjie, Zhuyin, Dayi, Ranked, Shrimp, Greek, Anthy, Korean, Latin,
+Random Cage Fighting Birds, Cool Music etc.")
+    (home-page "http://hime-ime.github.io/")
+    (license
+     (list
+      gpl2+
+      lgpl2.1+
+      ;; Documentation
+      fdl1.2+))))
+
 (define-public liblouis
   (package
     (name "liblouis")
diff --git a/gnu/packages/patches/gsl-gtest.patch b/gnu/packages/patches/gsl-gtest.patch
new file mode 100644
index 0000000000..2def650292
--- /dev/null
+++ b/gnu/packages/patches/gsl-gtest.patch
@@ -0,0 +1,96 @@
+From f5cf01083baf7e8dc8318db3648bc6098dc32d67 Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <guriev-ns@ya.ru>
+Date: Sat, 18 Apr 2020 13:30:17 +0300
+Subject: [PATCH] Search for GoogleTest via pkg-config first
+
+---
+ tests/CMakeLists.txt | 55 ++++++++++++++++++++++++--------------------
+ 1 file changed, 30 insertions(+), 25 deletions(-)
+
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 02193197..53d475c2 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -1,36 +1,41 @@
+ cmake_minimum_required(VERSION 3.0.2)
+ 
+ project(GSLTests CXX)
++include(FindPkgConfig)
+ 
+ # will make visual studio generated project group files
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+ 
+-configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
+-execute_process(
+-    COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
+-    RESULT_VARIABLE result
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+-    message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
++pkg_search_module(GTestMain gtest_main)
++if (NOT GTestMain_FOUND)
++    configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt)
++    execute_process(
++        COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
++        RESULT_VARIABLE result
++        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
++    )
++    if(result)
++        message(FATAL_ERROR "CMake step for googletest failed: ${result}")
++    endif()
+ 
+-execute_process(
+-    COMMAND ${CMAKE_COMMAND} --build .
+-    RESULT_VARIABLE result
+-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
+-)
+-if(result)
+-    message(FATAL_ERROR "CMake step for googletest failed: ${result}")
+-endif()
++    execute_process(
++        COMMAND ${CMAKE_COMMAND} --build .
++        RESULT_VARIABLE result
++        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download
++    )
++    if(result)
++        message(FATAL_ERROR "CMake step for googletest failed: ${result}")
++    endif()
+ 
+-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
++    set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
++    set(GTestMain_LIBRARIES gtest_main)
+ 
+-add_subdirectory(
+-    ${CMAKE_CURRENT_BINARY_DIR}/googletest-src
+-    ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
+-    EXCLUDE_FROM_ALL
+-)
++    add_subdirectory(
++        ${CMAKE_CURRENT_BINARY_DIR}/googletest-src
++        ${CMAKE_CURRENT_BINARY_DIR}/googletest-build
++        EXCLUDE_FROM_ALL
++    )
++endif()
+ 
+ if (MSVC AND (GSL_CXX_STANDARD EQUAL 17))
+     set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-)
+@@ -149,7 +154,7 @@ function(add_gsl_test name)
+     target_link_libraries(${name}
+         GSL
+         gsl_tests_config
+-        gtest_main
++        ${GTestMain_LIBRARIES}
+     )
+     add_test(
+         ${name}
+@@ -254,7 +259,7 @@ function(add_gsl_test_noexcept name)
+     target_link_libraries(${name}
+         GSL
+         gsl_tests_config_noexcept
+-        gtest_main
++        ${GTestMain_LIBRARIES}
+     )
+     add_test(
+       ${name}
diff --git a/gnu/packages/patches/libtgvoip-disable-sse2.patch b/gnu/packages/patches/libtgvoip-disable-sse2.patch
deleted file mode 100644
index 0e4faeab26..0000000000
--- a/gnu/packages/patches/libtgvoip-disable-sse2.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Copied from Debian.
-
-Description: Disable SSE2 code on i386
- This patch is not complete. A high-graded solution may use automatic switching
- between SSE2 and C++ implementations based on the results of runtime checks.
- The webrtc code already provides for one of them inside its GetCPUInfo function.
-Bug-Debian: https://bugs.debian.org/892823
-Author: Nicholas Guriev <guriev-ns@ya.ru>
-Last-Update: Tue, 29 Jan 2019 23:26:38 +0300
-
---- a/libtgvoip.gyp
-+++ b/libtgvoip.gyp
-@@ -871,11 +871,7 @@
-                 'WEBRTC_POSIX',
-               ],
-               'conditions': [
--                [ '"<!(uname -m)" == "i686"', {
--                  'cflags_cc': [
--                    '-msse2',
--                  ],
--                }], ['"<!(uname -s)" == "Linux"', {
-+                [ '"<!(uname -s)" == "Linux"', {
-                   'defines': [
-                     'WEBRTC_LINUX',
-                   ],
---- a/webrtc_dsp/rtc_base/system/arch.h
-+++ b/webrtc_dsp/rtc_base/system/arch.h
-@@ -28,7 +28,10 @@
- #define WEBRTC_ARCH_64_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
- #elif defined(_M_IX86) || defined(__i386__)
-+#if defined(__SSE2__)
-+// This macro is mostly used to detect SSE2 extension.
- #define WEBRTC_ARCH_X86_FAMILY
-+#endif
- #define WEBRTC_ARCH_X86
- #define WEBRTC_ARCH_32_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
---- a/webrtc_dsp/typedefs.h
-+++ b/webrtc_dsp/typedefs.h
-@@ -28,7 +28,10 @@
- #define WEBRTC_ARCH_64_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
- #elif defined(_M_IX86) || defined(__i386__)
-+#if defined(__SSE2__)
-+// This macro is mostly used to detect SSE2 extension.
- #define WEBRTC_ARCH_X86_FAMILY
-+#endif
- #define WEBRTC_ARCH_X86
- #define WEBRTC_ARCH_32_BITS
- #define WEBRTC_ARCH_LITTLE_ENDIAN
diff --git a/gnu/packages/patches/libtgvoip-disable-webrtc.patch b/gnu/packages/patches/libtgvoip-disable-webrtc.patch
deleted file mode 100644
index 0ca532301c..0000000000
--- a/gnu/packages/patches/libtgvoip-disable-webrtc.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Copied from Debian.
-
-Description: Fix build of  WebRTC on non-Linux systems
- * Define the WEBRTC_LINUX macro only on Linux, and not on GNU/Hurd or FreeBSD.
- * Fix type cast in the CurrentThreadId function.
-Bug-Debian: https://bugs.debian.org/920851
-Author: Nicholas Guriev <guriev-ns@ya.ru>
-Last-Update: Tue, 29 Jan 2019 23:26:44 +0300
-
---- a/libtgvoip.gyp
-+++ b/libtgvoip.gyp
-@@ -869,20 +869,18 @@
-             '"<(OS)" == "linux"', {
-               'defines': [
-                 'WEBRTC_POSIX',
--                'WEBRTC_LINUX',
-               ],
-               'conditions': [
-                 [ '"<!(uname -m)" == "i686"', {
-                   'cflags_cc': [
-                     '-msse2',
-                   ],
-+                }], ['"<!(uname -s)" == "Linux"', {
-+                  'defines': [
-+                    'WEBRTC_LINUX',
-+                  ],
-                 }]
-               ],
--              'direct_dependent_settings': {
--                'libraries': [
--
--                ],
--              },
-             },
-           ],
-         ],
---- a/webrtc_dsp/rtc_base/platform_thread_types.cc
-+++ b/webrtc_dsp/rtc_base/platform_thread_types.cc
-@@ -31,7 +31,7 @@ PlatformThreadId CurrentThreadId() {
-   return syscall(__NR_gettid);
- #else
-   // Default implementation for nacl and solaris.
--  return reinterpret_cast<pid_t>(pthread_self());
-+  return static_cast<pid_t>(pthread_self());
- #endif
- #endif  // defined(WEBRTC_POSIX)
- }
diff --git a/gnu/packages/patches/libtgvoip-pkgconfig.patch b/gnu/packages/patches/libtgvoip-pkgconfig.patch
new file mode 100644
index 0000000000..23794e8d77
--- /dev/null
+++ b/gnu/packages/patches/libtgvoip-pkgconfig.patch
@@ -0,0 +1,61 @@
+From 4ce5e22ed2dc24e9211c4874c1dd6b05faad2a87 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010@ya.ru>
+Date: Sun, 5 Jan 2020 12:25:31 +0400
+Subject: [PATCH] Add support for pkg-config
+
+---
+ Makefile.am  |  2 ++
+ configure.ac |  4 +++-
+ tgvoip.pc.in | 10 ++++++++++
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+ create mode 100644 tgvoip.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 03c8866..a9c9715 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -755,6 +755,8 @@ libtgvoip_la_SOURCES = $(SRC) $(TGVOIP_HDRS)
+ tgvoipincludedir = $(includedir)/tgvoip
+ nobase_tgvoipinclude_HEADERS = $(TGVOIP_HDRS)
+ 
++pkgconfig_DATA = tgvoip.pc
++
+ CXXFLAGS += -std=gnu++0x $(CFLAGS)
+ if TARGET_OS_OSX
+ OBJCFLAGS = $(CFLAGS)
+diff --git a/configure.ac b/configure.ac
+index 222f541..e2df927 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,6 +9,8 @@ AM_INIT_AUTOMAKE([subdir-objects])
+ AM_SILENT_RULES([yes])
+ LT_INIT
+ 
++PKG_INSTALLDIR
++
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CC
+@@ -109,5 +111,5 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_CHECK_FUNCS([clock_gettime floor gettimeofday inet_ntoa memmove memset select socket sqrt strcasecmp strchr strerror strncasecmp strstr strtol strtoul uname])
+ 
+-AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([Makefile tgvoip.pc])
+ AC_OUTPUT
+diff --git a/tgvoip.pc.in b/tgvoip.pc.in
+new file mode 100644
+index 0000000..1ca7758
+--- /dev/null
++++ b/tgvoip.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: tgvoip
++Description: VoIP library for Telegram clients
++Version: 2.4.4
++Libs: -L${libdir} -ltgvoip
++Cflags: -I${includedir}/tgvoip
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 79d41b3e73..cd24f2c319 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -45,6 +45,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system qt)
   #:use-module (guix packages)
   #:use-module (guix deprecation)
   #:use-module (guix utils)
@@ -72,6 +73,7 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages kde-frameworks)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -103,6 +105,79 @@
   #:use-module (gnu packages xml)
   #:use-module (srfi srfi-1))
 
+(define-public qt5ct
+  (package
+    (name "qt5ct")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
+       (sha256
+        (base32 "1lnx4wqk87lbr6lqc64w5g5ppjjv75kq2r0q0bz9gfpryzdw8xxg"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qt5ct.pro"
+               (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
+                (string-append (assoc-ref inputs "qttools")
+                               "/bin/lrelease")))
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               (invoke "qmake"
+                       (string-append "PREFIX=" out)
+                       (string-append "BINDIR=" out "/bin")
+                       (string-append "DATADIR=" out "/share")
+                       (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
+             #t)))))
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)))
+    (synopsis "Qt5 Configuration Tool")
+    (description "Qt5CT is a program that allows users to configure Qt5 settings
+(theme, font, icons, etc.) under DE/WM without Qt integration.")
+    (home-page "https://qt5ct.sourceforge.io/")
+    (license license:bsd-2)))
+
+(define-public materialdecoration
+  (package
+    (name "materialdecoration")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/lirios/materialdecoration.git")
+         (commit "2079487116c6c794af3a15452342a69293039b46")))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "1pczmxbmnsgj9s1g6ap55qq2q4ccibcnhsw9b6cl5rzgc48izy06"))))
+    (build-system qt-build-system)
+    (native-inputs
+     `(("cmake-shared" ,cmake-shared)
+       ("extra-cmake-modules" ,extra-cmake-modules)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("qtwayland" ,qtwayland)
+       ("wayland" ,wayland)))
+    (synopsis "Material Decoration for Qt")
+    (description "MaterialDecoration is the client-side decoration for Qt
+applications on Wayland.")
+    (home-page "https://github.com/lirios/materialdecoration")
+    (license license:lgpl3+)))
+
 (define-public grantlee
   (package
     (name "grantlee")
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
new file mode 100644
index 0000000000..513f2246df
--- /dev/null
+++ b/gnu/packages/telegram.scm
@@ -0,0 +1,321 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages telegram)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages aidc)
+  #:use-module (gnu packages audio)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages check)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
+  #:use-module (gnu packages digest)
+  #:use-module (gnu packages fcitx)
+  #:use-module (gnu packages fcitx5)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
+  #:use-module (gnu packages libreoffice)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages lxqt)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
+  #:use-module (gnu packages telephony)
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xorg)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system cmake))
+
+(define-public tdesktop
+  (package
+    (name "tdesktop")
+    (version "2.5.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/telegramdesktop/tdesktop.git")
+         (commit
+          (string-append "v" version))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "0drirhkr9gnm1g03lcqmvap5ljlk859c29gbsm63hhsgv15dlw0y"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        "-DTDESKTOP_API_ID=17349"
+        "-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'make-writable
+           (lambda _
+             (for-each make-file-writable
+                       (find-files "."))
+             #t))
+         (add-after 'make-writable 'copy-inputs
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((to (getcwd))
+                    (cmake_helpers (assoc-ref inputs "cmake_helpers"))
+                    (codegen (assoc-ref inputs "codegen"))
+                    (lib_base (assoc-ref inputs "lib_base"))
+                    (lib_crl (assoc-ref inputs "lib_crl"))
+                    (lib_lottie (assoc-ref inputs "lib_lottie"))
+                    (lib_qr (assoc-ref inputs "lib_qr"))
+                    (lib_rlottie (assoc-ref inputs "lib_rlottie"))
+                    (lib_rpl (assoc-ref inputs "lib_rpl"))
+                    (lib_spellcheck (assoc-ref inputs "lib_spellcheck"))
+                    (lib_storage (assoc-ref inputs "lib_storage"))
+                    (lib_tl (assoc-ref inputs "lib_tl"))
+                    (lib_ui (assoc-ref inputs "lib_ui"))
+                    (lib_webrtc (assoc-ref inputs "lib_webrtc"))
+                    (tgcalls (assoc-ref inputs "tgcalls")))
+               (copy-recursively cmake_helpers (string-append to "/cmake"))
+               (copy-recursively codegen (string-append to "/Telegram/codegen"))
+               (copy-recursively lib_base (string-append to "/Telegram/lib_base"))
+               (copy-recursively lib_crl (string-append to "/Telegram/lib_crl"))
+               (copy-recursively lib_lottie (string-append to "/Telegram/lib_lottie"))
+               (copy-recursively lib_qr (string-append to "/Telegram/lib_qr"))
+               (copy-recursively lib_rlottie (string-append to "/Telegram/lib_rlottie"))
+               (copy-recursively lib_rpl (string-append to "/Telegram/lib_rpl"))
+               (copy-recursively lib_spellcheck (string-append to "/Telegram/lib_spellcheck"))
+               (copy-recursively lib_storage (string-append to "/Telegram/lib_storage"))
+               (copy-recursively lib_tl (string-append to "/Telegram/lib_tl"))
+               (copy-recursively lib_ui (string-append to "/Telegram/lib_ui"))
+               (copy-recursively lib_webrtc (string-append to "/Telegram/lib_webrtc"))
+               (copy-recursively tgcalls (string-append to "/Telegram/ThirdParty/tgcalls")))
+             #t))
+         (add-before 'configure 'patch-cxx-flags
+           (lambda _
+             (substitute* "cmake/options_linux.cmake"
+               (("class-memaccess")
+                "all"))
+             #t)))))
+    (native-inputs
+     `(("cmake_helpers"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/cmake_helpers.git")
+             (commit "a81345a")))
+           (file-name
+            (git-file-name "cmake_helpers" version))
+           (sha256
+            (base32 "0s5hxip68dmkaspjq6j30wx1r5v4prnrjza79hdbznz6i57a2248"))))
+       ("gcc" ,gcc-9)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+:bin" ,gtk+ "bin")
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("qttools" ,qttools)))
+    (inputs
+     `(("alsa" ,alsa-lib)
+       ("catch" ,catch-framework2)
+       ("codegen"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/codegen.git")
+             (commit "127968d")))
+           (file-name
+            (git-file-name "codegen" version))
+           (sha256
+            (base32 "036hzjrsk134ky62192nra43rsln5kh5gz20q1920s922661zky2"))))
+       ("expected" ,libexpected)
+       ("fcitx-qt5" ,fcitx-qt5)
+       ("fcitx5-qt" ,fcitx5-qt)
+       ("ffmpeg" ,ffmpeg)
+       ("glib" ,glib)
+       ("gsl" ,gsl)
+       ("gtk+" ,gtk+)
+       ("hime" ,hime)
+       ("hunspell" ,hunspell)
+       ("iconv" ,libiconv)
+       ("lib_base"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_base.git")
+             (commit "81df0d0")))
+           (file-name
+            (git-file-name "lib_base" version))
+           (sha256
+            (base32 "0ikddprjnjvg0ic8jr2886xq0f18syp587q6z2kci9xmdnvjl217"))))
+       ("lib_crl"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_crl.git")
+             (commit "16150bf")))
+           (file-name
+            (git-file-name "lib_crl" version))
+           (sha256
+            (base32 "0qhagdr26aqb9w7wnchcmk1j7ln28x3wbkkkm06b8h0mybksbj7q"))))
+       ("lib_lottie"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_lottie.git")
+             (commit "fb40f37")))
+           (file-name
+            (git-file-name "lib_lottie" version))
+           (sha256
+            (base32 "1vq0mqxcrrv7akcqk9cl4mm61zw6dcfmy8adl0pcp49kynm64saw"))))
+       ("lib_qr"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_qr.git")
+             (commit "92ce41a")))
+           (file-name
+            (git-file-name "lib_qr" version))
+           (sha256
+            (base32 "182939nv7xs9b3bgah3gl5y9hx5r59mabd2jw3z6717vc96qi2pj"))))
+       ("lib_rlottie"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_rlottie.git")
+             (commit "0671bf7")))
+           (file-name
+            (git-file-name "lib_rlottie" version))
+           (sha256
+            (base32 "05qnza7j15356s8jq16pkbyp4zr586lssmd86lz5jq23lcb3raxv"))))
+       ("lib_rpl"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_rpl.git")
+             (commit "e1b9639")))
+           (file-name
+            (git-file-name "lib_rpl" version))
+           (sha256
+            (base32 "1wvqazljd2kq1fxlj250jhjrig529499bym9p81dx33kh1l9dgss"))))
+       ("lib_spellcheck"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_spellcheck.git")
+             (commit "1b540b3")))
+           (file-name
+            (git-file-name "lib_spellcheck" version))
+           (sha256
+            (base32 "0a7042h5zrdvgs7v153ral2dh1zj84di5yjcmgcry5k4s1im9di7"))))
+       ("lib_storage"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_storage.git")
+             (commit "cbe5172")))
+           (file-name
+            (git-file-name "lib_storage" version))
+           (sha256
+            (base32 "045l5xsyagyz17gbhmmvl2miss4nb92p0dmza7yfs9pkg9gs0f87"))))
+       ("lib_tl"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_tl.git")
+             (commit "404c83d")))
+           (file-name
+            (git-file-name "lib_tl" version))
+           (sha256
+            (base32 "1k34nkvvcjqw5q81n1qmklid60cvzjk4lmn9qjimk437m6wbii7f"))))
+       ("lib_ui"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_ui.git")
+             (commit "1e27992")))
+           (file-name
+            (git-file-name "lib_ui" version))
+           (sha256
+            (base32 "0kd4njcvic2700f00qn25vn3b80vsd2flsm3pi2synnldkiy8lcw"))))
+       ("lib_webrtc"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/desktop-app/lib_webrtc.git")
+             (commit "4bc51d6")))
+           (file-name
+            (git-file-name "lib_webrtc" version))
+           (sha256
+            (base32 "06hpyq4qglrj3cb1xg8ghlmzm9ra8f5n6vm7hcy67n2wk8sy4cal"))))
+       ("libdbusmenu-qt" ,libdbusmenu-qt)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libtgvoip" ,libtgvoip)
+       ("lz4" ,lz4)
+       ("materialdecoration" ,materialdecoration)
+       ("minizip" ,minizip)
+       ("nimf" ,nimf)
+       ("openal" ,openal)
+       ("openssl" ,openssl)
+       ("opus" ,opus)
+       ("pulseaudio" ,pulseaudio)
+       ("qrcodegen" ,qrcodegen-cpp)
+       ("qt" ,qtbase)
+       ("qt5ct" ,qt5ct)
+       ("qtwayland" ,qtwayland)
+       ("range-v3" ,range-v3)
+       ("rlottie" ,rlottie)
+       ("tg_owt" ,tg_owt)
+       ("tgcalls"
+        ,(origin
+           (method git-fetch)
+           (uri
+            (git-reference
+             (url "https://github.com/TelegramMessenger/tgcalls.git")
+             (commit "178983f")))
+           (file-name
+            (git-file-name "tgcalls" version))
+           (sha256
+            (base32 "1xad65c9m6mj6zdj08flafvh8xjkd7xi9r1agcyc64y69lr427d0"))))
+       ("x11" ,libx11)
+       ("xcb" ,libxcb)
+       ("xcb-keysyms" ,xcb-util-keysyms)
+       ("xxhash" ,xxhash)
+       ("zlib" ,zlib)))
+    (synopsis "Telegram Desktop")
+    (description "Tdesktop is the official desktop application for telegram
+messenger.")
+    (home-page "https://desktop.telegram.org/")
+    (license license:gpl3+)))
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 48e30abfc3..2f9d2c8cc6 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages admin)
   #:use-module (gnu packages aidc)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages audio)
@@ -47,6 +48,7 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
@@ -93,6 +95,54 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system qt))
 
+(define-public tg_owt
+  (package
+    (name "tg_owt")
+    (version "0.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/desktop-app/tg_owt.git")
+         (commit "10b988a")))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "12wwj1hgmklpxs1m0mx6xa2a3n6prfvi539kx444pny31440nhpj"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f                      ; No target
+       #:configure-flags
+       (list
+        "-DCMAKE_C_FLAGS=-fPIC"
+        "-DCMAKE_CXX_FLAGS=-fPIC"
+        "-DBUILD_SHARED_LIBS=ON"
+        "-DTG_OWT_USE_PROTOBUF=ON")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("yasm" ,yasm)))
+    (inputs
+     `(("abseil-cpp" ,abseil-cpp)
+       ("alsa" ,alsa-lib)
+       ("ffmpeg" ,ffmpeg)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libsrtp" ,libsrtp)
+       ("libvpx" ,libvpx)
+       ;; ("libyuv" ,libyuv)
+       ("openh264" ,openh264)
+       ("openssl" ,openssl)
+       ("opus" ,opus)
+       ("protobuf" ,protobuf)
+       ("pulseaudio" ,pulseaudio)
+       ("rnnoise" ,rnnoise)))
+    (synopsis "WebRTC build for Telegram")
+    (description "TG_OWT is the packaged build of WebRTC, for its use in
+Telegram-Desktop application.")
+    (home-page "https://github.com/desktop-app/tg_owt")
+    (license license:bsd-3)))
+
 (define-public libilbc
   (package
     (name "libilbc")
@@ -874,40 +924,38 @@ Initiation Protocol (SIP) and a multimedia framework.")
              (url "https://github.com/grishka/libtgvoip")
              (commit version)))
        (file-name (git-file-name name version))
-       ;; Fix compilation on i686-linux architecture.
-       ;; NOTE: Applying these patches is order-dependent!
-       ;; The patch for WebRTC /must/ precede the patch for SSE2.
        (patches
-        (search-patches "libtgvoip-disable-webrtc.patch"
-                        "libtgvoip-disable-sse2.patch"))
+        (search-patches "libtgvoip-pkgconfig.patch"))
        (sha256
         (base32
          "122kn3jx6v0kkldlzlpzvlwqxgp6pmzxsjhrhcxw12bx9c08sar5"))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("libopusenc" ,libopusenc)
        ("openssl" ,openssl)
+       ("opus" ,opus)
        ("pulseaudio" ,pulseaudio)))
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       (list
+        "--disable-static"
+        "--enable-audio-callback")
+       #:phases
        (modify-phases %standard-phases
-         ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where
-         ;; they are.
-         (add-after 'unpack 'patch-dlopen
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "os/linux/AudioPulse.cpp"
-               (("libpulse\\.so")
-                (string-append (assoc-ref inputs "pulseaudio")
-                              "/lib/libpulse.so")))
-             (substitute* '("os/linux/AudioInputALSA.cpp"
-                            "os/linux/AudioOutputALSA.cpp")
-               (("libasound\\.so")
-                (string-append (assoc-ref inputs "alsa-lib")
-                               "/lib/libasound.so")))
+         (add-after 'unpack 'trigger-bootstrap
+           (lambda _
+             (for-each delete-file
+                       (list
+                        "configure"
+                        "Makefile.in"))
              #t)))))
     (synopsis "VoIP library for Telegram clients")
     (description "A collection of libraries and header files for implementing
 telephony functionality into custom Telegram clients.")
-    (home-page "https://github.com/zevlg/libtgvoip")
+    (home-page "https://github.com/grishka/libtgvoip")
     (license license:unlicense)))

      parent reply	other threads:[~2021-01-12  3:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  1:54 [Telegram-Desktop]: Help with packaging Raghav Gururajan
2021-01-08  1:59 ` Raghav Gururajan
2021-01-08 12:11   ` Ekaitz Zarraga
2021-01-08 12:20     ` Julien Lepiller
2021-01-08 12:16   ` Ricardo Wurmus
2021-01-08 21:21     ` Mark H Weaver
2021-01-08 22:04       ` Ricardo Wurmus
2021-01-08 22:52         ` Raghav Gururajan
2021-01-09  1:59 ` Raghav Gururajan
2021-01-12  3:32 ` Raghav Gururajan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c97857f9-2a17-7007-fac0-d1b7f298daa4@raghavgururajan.name \
    --to=rg@raghavgururajan.name \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.