+(define-public tdlib
+ (let ((commit "80c35676a2eb1e9b71db355ee217bba79fbdce31")
+ (revision "1")
+ (version "1.5.4"))
+ (package
+ (name "tdlib")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdlib/td.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "09c0pygqirapgxxzcc3sr0x67qhz8cx2klznrbdyi0118r9s8a7a"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #t
+ #:configure-flags
+ (list "-DCMAKE_BUILD_TYPE=Release"
+ "-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
+ #: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") ""))
+ #t)))))
+ (native-inputs
+ `(("gperf" ,gperf)
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)
+ ("php" ,php)
+ ("doxygen" ,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))))
+