From 02114e6e983751ce6156a4d09beb50142109a030 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Wed, 22 Oct 2025 17:55:23 +0200 Subject: [PATCH] gnu: tdlib: Move to (gnu packages telegram). Fixes a circular dependency between (gnu packages telegram) and (gnu packages messaging). * gnu/packages/messaging.scm (tdlib): Move from here... * gnu/packages/telegram.scm (tdlib): ... to here. Fixes: guix/guix#3728 Change-Id: Ib17102dcd77bf94ad026070f7c79f497f785c5e1 Signed-off-by: Andreas Enge --- gnu/packages/messaging.scm | 40 ------------------------------------- gnu/packages/telegram.scm | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 1095b54f51c334266073d8b07dfadb6d37ce4a14..736fd4b97f97200a3a9a06398b81ba637ac8937a 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -103,7 +103,6 @@ #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-web) #:use-module (gnu packages golang-xyz) - #:use-module (gnu packages gperf) #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) @@ -132,7 +131,6 @@ #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages photo) - #:use-module (gnu packages php) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) @@ -2641,44 +2639,6 @@ replacement.") ;; itself is GPLv2+. (license license:gpl2+))) -(define-public tdlib - (let ((commit "7d257dcda5dd2c616c1146540ef51147c5bb2c69")) - (package - (name "tdlib") - (version "1.8.55") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/tdlib/td") - (commit commit))) - (sha256 - (base32 "0w36jwblwi4rb61id0jkfasy01p69c9myvm51qgmv3hlw60kwq51")) - (file-name (git-file-name name version)))) - (build-system cmake-build-system) - (arguments - (list - #:build-type "Release" - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'remove-failing-tests - (lambda _ - (substitute* "test/CMakeLists.txt" - ;; The test cases are compiled into a distinct binary - ;; which uses mtproto.cpp to attempt to connect to - ;; a remote server. Removing this file from the sources - ;; list disables those specific test cases. - (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/mtproto.cpp") ""))))))) - (native-inputs - (list gperf openssl zlib php doxygen)) - (synopsis "Cross-platform library for building Telegram clients") - (description "Tdlib is a cross-platform library for creating custom -Telegram clients following the official Telegram API. It can be easily used -from almost any programming language with a C-FFI and features first-class -support for high performance Telegram Bot creation.") - (home-page "https://core.telegram.org/tdlib") - (license license:boost1.0)))) - (define-public purple-mm-sms (package (name "purple-mm-sms") diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index 6bd48757ae6b99b7c72e55a68b32073094d001b7..a07c362935e4207170c00db1d6cffcd14bbb71f2 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -39,12 +39,14 @@ #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages digest) + #:use-module (gnu packages documentation) #:use-module (gnu packages fcitx5) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) + #:use-module (gnu packages gperf) #:use-module (gnu packages gtk) #:use-module (gnu packages hunspell) #:use-module (gnu packages image) @@ -57,6 +59,7 @@ #:use-module (gnu packages lua) #:use-module (gnu packages messaging) #:use-module (gnu packages perl) + #:use-module (gnu packages php) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages pulseaudio) @@ -438,6 +441,44 @@ and not propagated to upstream.") (base32 "0fg4x4ikj7f3706bmfvkwq4smxc98qr3cgpm25w48n4ys6wfgadg")))) +(define-public tdlib + (let ((commit "7d257dcda5dd2c616c1146540ef51147c5bb2c69")) + (package + (name "tdlib") + (version "1.8.55") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tdlib/td") + (commit commit))) + (sha256 + (base32 "0w36jwblwi4rb61id0jkfasy01p69c9myvm51qgmv3hlw60kwq51")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-failing-tests + (lambda _ + (substitute* "test/CMakeLists.txt" + ;; The test cases are compiled into a distinct binary + ;; which uses mtproto.cpp to attempt to connect to + ;; a remote server. Removing this file from the sources + ;; list disables those specific test cases. + (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/mtproto.cpp") ""))))))) + (native-inputs + (list gperf openssl zlib php doxygen)) + (synopsis "Cross-platform library for building Telegram clients") + (description "Tdlib is a cross-platform library for creating custom +Telegram clients following the official Telegram API. It can be easily used +from almost any programming language with a C-FFI and features first-class +support for high performance Telegram Bot creation.") + (home-page "https://core.telegram.org/tdlib") + (license license:boost1.0)))) + (define tde2e (let ((base tdlib)) (package