GNU bug report logs - #38325
[PATCH 1/2] gnu: Add tdlib.

Previous Next

Package: guix-patches;

Reported by: Brett Gilio <brettg <at> posteo.net>

Date: Fri, 22 Nov 2019 18:57:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38325 in the body.
You can then email your comments to 38325 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Fri, 22 Nov 2019 18:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brett Gilio <brettg <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 22 Nov 2019 18:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/2] gnu: Add tdlib.
Date: Fri, 22 Nov 2019 12:55:49 -0600
[0001-gnu-Add-tdlib.patch (text/x-patch, inline)]
From c47ed88ed3945fd7dbdee2b7e507ec512dd799be Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg <at> posteo.net>
Date: Fri, 22 Nov 2019 12:53:32 -0600
Subject: [PATCH 1/2] gnu: Add tdlib.

* gnu/packages/messaging.scm (tdlib): New variable.
---
 gnu/packages/messaging.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 694dfbb51d..e0b8486837 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2018 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact <at> parouby.fr>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
+;;; Copyright © 2019 Brett Gilio <brettg <at> posteo.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +58,7 @@
   #: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 guile)
   #:use-module (gnu packages icu4c)
@@ -72,6 +74,7 @@
   #: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)
@@ -1946,4 +1949,38 @@ Telegram messenger.")
     ;; itself is GPLv2+.
     (license license:gpl2+)))
 
+(define-public tdlib
+  (let ((commit "afca63a4f43531058a079e91eb5c81f54ad744b5")
+	(revision "1")
+	(version "1.5.0"))
+    (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
+                  "1aa3p4k32mfshgc6fv58gwg8pnaix39rv455hfx6znj7llr8na6k"))
+                (file-name (git-file-name name version))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f))
+      (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))))
+  
 ;;; messaging.scm ends here
+  
-- 
2.24.0





Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Tue, 26 Nov 2019 10:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brett Gilio <brettg <at> posteo.net>
Cc: 38325 <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH 1/2] gnu: Add tdlib.
Date: Tue, 26 Nov 2019 11:51:00 +0100
Hello!

Brett Gilio <brettg <at> posteo.net> skribis:

>>From c47ed88ed3945fd7dbdee2b7e507ec512dd799be Mon Sep 17 00:00:00 2001
> From: Brett Gilio <brettg <at> posteo.net>
> Date: Fri, 22 Nov 2019 12:53:32 -0600
> Subject: [PATCH 1/2] gnu: Add tdlib.
>
> * gnu/packages/messaging.scm (tdlib): New variable.

[...]

> +      (build-system cmake-build-system)
> +      (arguments
> +       `(#:tests? #f))

Apparently there are tests.  Could you look into enabling them?

If some of them fail, we should investigate.

Last thing: please address ‘guix lint’ warnings, I think there’s a
couple of them.  :-)

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Tue, 26 Nov 2019 19:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38325 <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH 1/2] gnu: Add tdlib.
Date: Tue, 26 Nov 2019 13:33:14 -0600
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello!
>
> Brett Gilio <brettg <at> posteo.net> skribis:
>
>>>From c47ed88ed3945fd7dbdee2b7e507ec512dd799be Mon Sep 17 00:00:00 2001
>> From: Brett Gilio <brettg <at> posteo.net>
>> Date: Fri, 22 Nov 2019 12:53:32 -0600
>> Subject: [PATCH 1/2] gnu: Add tdlib.
>>
>> * gnu/packages/messaging.scm (tdlib): New variable.
>
> [...]
>
>> +      (build-system cmake-build-system)
>> +      (arguments
>> +       `(#:tests? #f))
>
> Apparently there are tests.  Could you look into enabling them?
>
> If some of them fail, we should investigate.
>
> Last thing: please address ‘guix lint’ warnings, I think there’s a
> couple of them.  :-)
>
> Thank you,
> Ludo’.

Hey Ludo,

I have fixed the linting issue. The reason why I have disabled tests is
because the test cases require internet connection.

[ 1][t 0][1574796396.378631592][mtproto.cpp:64][!GetHostByNameActor]	7 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.378687382][mtproto.cpp:64][!GetHostByNameActor]	8 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.378721476][mtproto.cpp:64][!GetHostByNameActor]	9 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.378756762][mtproto.cpp:64][!GetHostByNameActor]	10 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.378843307][mtproto.cpp:64][!GetHostByNameActor]	11 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.379258633][mtproto.cpp:64][!GetHostByNameActor]	37 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.379312277][mtproto.cpp:64][!GetHostByNameActor]	38 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.379376888][mtproto.cpp:64][!GetHostByNameActor]	39 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.379430532][mtproto.cpp:64][!GetHostByNameActor]	40 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.379479170][mtproto.cpp:64][!GetHostByNameActor]	41 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.381045103][mtproto.cpp:64][!GetHostByNameActor]	67 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.381077766][mtproto.cpp:64][!GetHostByNameActor]	68 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.381108761][mtproto.cpp:64][!GetHostByNameActor]	69 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.381140471][mtproto.cpp:64][!GetHostByNameActor]	70 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
[ 1][t 0][1574796396.381173134][mtproto.cpp:64][!GetHostByNameActor]	71 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]

I might be able to strip out those particular tests, but it would seem
to me that needing internet connection on a test case is likely not the
"Guix way" of doing this.

Wdyt?

Brett Gilio




Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Tue, 26 Nov 2019 20:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brett Gilio <brettg <at> posteo.net>
Cc: 38325 <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH 1/2] gnu: Add tdlib.
Date: Tue, 26 Nov 2019 21:58:30 +0100
Hello,

Brett Gilio <brettg <at> posteo.net> skribis:

> I have fixed the linting issue. The reason why I have disabled tests is
> because the test cases require internet connection.
>
> [ 1][t 0][1574796396.378631592][mtproto.cpp:64][!GetHostByNameActor]	7 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.378687382][mtproto.cpp:64][!GetHostByNameActor]	8 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.378721476][mtproto.cpp:64][!GetHostByNameActor]	9 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.378756762][mtproto.cpp:64][!GetHostByNameActor]	10 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.378843307][mtproto.cpp:64][!GetHostByNameActor]	11 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.379258633][mtproto.cpp:64][!GetHostByNameActor]	37 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.379312277][mtproto.cpp:64][!GetHostByNameActor]	38 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.379376888][mtproto.cpp:64][!GetHostByNameActor]	39 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.379430532][mtproto.cpp:64][!GetHostByNameActor]	40 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.379479170][mtproto.cpp:64][!GetHostByNameActor]	41 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.381045103][mtproto.cpp:64][!GetHostByNameActor]	67 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.381077766][mtproto.cpp:64][!GetHostByNameActor]	68 "web.telegram.org" [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.381108761][mtproto.cpp:64][!GetHostByNameActor]	69 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.381140471][mtproto.cpp:64][!GetHostByNameActor]	70 "web.telegram.org." [Error : 0 : Failed to resolve host: Name or service not known]
> [ 1][t 0][1574796396.381173134][mtproto.cpp:64][!GetHostByNameActor]	71 "москва.рф" [Error : 0 : Failed to resolve host: Name or service not known]
>
> I might be able to strip out those particular tests, but it would seem
> to me that needing internet connection on a test case is likely not the
> "Guix way" of doing this.

Right, there’s no network access in the build environment.

So those tests that rely on being able to talk to telegram.org &
co. must be skipped.  If possible, it’s best to skip only those and
still run tests that don’t depend on network access.

If we have to #:tests? #f altogether, then please add a comment
explaining why we’re doing this, for our future selves.  :-)

Thanks in advance!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Wed, 27 Nov 2019 08:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: 38325 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add tdlib.
Date: Wed, 27 Nov 2019 02:09:19 -0600
[0001-gnu-Add-tdlib.patch (text/x-patch, inline)]
From d584c09c37d8e2b70fb5b6b1b2c685698f7ac73d Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg <at> posteo.net>
Date: Wed, 27 Nov 2019 02:08:02 -0600
Subject: [PATCH] gnu: Add tdlib.

* gnu/packages/messaging.scm (tdlib): New variable.
---
 gnu/packages/messaging.scm | 47 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 33e752c9a0..b268805b9b 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2018 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact <at> parouby.fr>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
+;;; Copyright © 2019 Brett Gilio <brettg <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +58,7 @@
   #: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 guile)
   #:use-module (gnu packages icu4c)
@@ -72,6 +74,7 @@
   #: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)
@@ -1946,4 +1949,48 @@ Telegram messenger.")
     ;; itself is GPLv2+.
     (license license:gpl2+)))
 
+(define-public tdlib
+  (let ((commit "afca63a4f43531058a079e91eb5c81f54ad744b5")
+	(revision "1")
+	(version "1.5.0"))
+    (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
+                  "1aa3p4k32mfshgc6fv58gwg8pnaix39rv455hfx6znj7llr8na6k"))
+                (file-name (git-file-name name version))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #t
+         #: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))))
+
 ;;; messaging.scm ends here
-- 
2.24.0





Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Wed, 27 Nov 2019 08:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: 38325 <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH] gnu: Add tdlib.
Date: Wed, 27 Nov 2019 02:18:38 -0600
Brett Gilio <brettg <at> posteo.net> writes:

> From d584c09c37d8e2b70fb5b6b1b2c685698f7ac73d Mon Sep 17 00:00:00 2001
> From: Brett Gilio <brettg <at> posteo.net>
> Date: Wed, 27 Nov 2019 02:08:02 -0600
> Subject: [PATCH] gnu: Add tdlib.
>
> * gnu/packages/messaging.scm (tdlib): New variable.
> ---
>  gnu/packages/messaging.scm | 47 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>
> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
> index 33e752c9a0..b268805b9b 100644
> --- a/gnu/packages/messaging.scm
> +++ b/gnu/packages/messaging.scm
> @@ -16,6 +16,7 @@
>  ;;; Copyright © 2018 Leo Famulari <leo <at> famulari.name>
>  ;;; Copyright © 2018 Pierre-Antoine Rouby <contact <at> parouby.fr>
>  ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
> +;;; Copyright © 2019 Brett Gilio <brettg <at> posteo.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -57,6 +58,7 @@
>    #: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 guile)
>    #:use-module (gnu packages icu4c)
> @@ -72,6 +74,7 @@
>    #: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)
> @@ -1946,4 +1949,48 @@ Telegram messenger.")
>      ;; itself is GPLv2+.
>      (license license:gpl2+)))
>  
> +(define-public tdlib
> +  (let ((commit "afca63a4f43531058a079e91eb5c81f54ad744b5")
> +	(revision "1")
> +	(version "1.5.0"))
> +    (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
> +                  "1aa3p4k32mfshgc6fv58gwg8pnaix39rv455hfx6znj7llr8na6k"))
> +                (file-name (git-file-name name version))))
> +      (build-system cmake-build-system)
> +      (arguments
> +       `(#:tests? #t
> +         #: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))))
> +
>  ;;; messaging.scm ends here

Ludo,

Hopefully this one is better. I also described how I
rectified the issue with the test suite. I suppose I could have removed
#:tests? #t, but I was just happy I believe I found the right
solution. The test suite for this project is more than a little
unconventional (at least to my experience).

Brett Gilio





Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Thu, 28 Nov 2019 19:09:01 GMT) Full text and rfc822 format available.

Message #23 received at 38325 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: 38325 <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH] gnu: Add tdlib.
Date: Thu, 28 Nov 2019 13:08:33 -0600
Brett Gilio <brettg <at> posteo.net> writes:

> Brett Gilio <brettg <at> posteo.net> writes:
>
>> From d584c09c37d8e2b70fb5b6b1b2c685698f7ac73d Mon Sep 17 00:00:00 2001
>> From: Brett Gilio <brettg <at> posteo.net>
>> Date: Wed, 27 Nov 2019 02:08:02 -0600
>> Subject: [PATCH] gnu: Add tdlib.
>>
>> * gnu/packages/messaging.scm (tdlib): New variable.
>> ---
>>  gnu/packages/messaging.scm | 47 ++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 47 insertions(+)
>>
>> diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
>> index 33e752c9a0..b268805b9b 100644
>> --- a/gnu/packages/messaging.scm
>> +++ b/gnu/packages/messaging.scm
>> @@ -16,6 +16,7 @@
>>  ;;; Copyright © 2018 Leo Famulari <leo <at> famulari.name>
>>  ;;; Copyright © 2018 Pierre-Antoine Rouby <contact <at> parouby.fr>
>>  ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
>> +;;; Copyright © 2019 Brett Gilio <brettg <at> posteo.net>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -57,6 +58,7 @@
>>    #: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 guile)
>>    #:use-module (gnu packages icu4c)
>> @@ -72,6 +74,7 @@
>>    #: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)
>> @@ -1946,4 +1949,48 @@ Telegram messenger.")
>>      ;; itself is GPLv2+.
>>      (license license:gpl2+)))
>>  
>> +(define-public tdlib
>> +  (let ((commit "afca63a4f43531058a079e91eb5c81f54ad744b5")
>> +	(revision "1")
>> +	(version "1.5.0"))
>> +    (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
>> +                  "1aa3p4k32mfshgc6fv58gwg8pnaix39rv455hfx6znj7llr8na6k"))
>> +                (file-name (git-file-name name version))))
>> +      (build-system cmake-build-system)
>> +      (arguments
>> +       `(#:tests? #t
>> +         #: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))))
>> +
>>  ;;; messaging.scm ends here
>
> Ludo,
>
> Hopefully this one is better. I also described how I
> rectified the issue with the test suite. I suppose I could have removed
> #:tests? #t, but I was just happy I believe I found the right
> solution. The test suite for this project is more than a little
> unconventional (at least to my experience).
>
> Brett Gilio

Is there any further need for review for this revised patch? If not, can
we get it tested and merged. :)

Thanks!

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 29 Nov 2019 13:11:02 GMT) Full text and rfc822 format available.

Notification sent to Brett Gilio <brettg <at> posteo.net>:
bug acknowledged by developer. (Fri, 29 Nov 2019 13:11:02 GMT) Full text and rfc822 format available.

Message #28 received at 38325-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brett Gilio <brettg <at> posteo.net>
Cc: 38325-done <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH] gnu: Add tdlib.
Date: Fri, 29 Nov 2019 14:10:15 +0100
Hi Brett,

Brett Gilio <brettg <at> posteo.net> skribis:

>>From d584c09c37d8e2b70fb5b6b1b2c685698f7ac73d Mon Sep 17 00:00:00 2001
> From: Brett Gilio <brettg <at> posteo.net>
> Date: Wed, 27 Nov 2019 02:08:02 -0600
> Subject: [PATCH] gnu: Add tdlib.
>
> * gnu/packages/messaging.scm (tdlib): New variable.

Applied, thanks.

And apologies for the delay!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#38325; Package guix-patches. (Fri, 29 Nov 2019 19:10:01 GMT) Full text and rfc822 format available.

Message #31 received at 38325-done <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 38325-done <at> debbugs.gnu.org
Subject: Re: [bug#38325] [PATCH] gnu: Add tdlib.
Date: Fri, 29 Nov 2019 13:08:57 -0600
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Brett,
>
> Brett Gilio <brettg <at> posteo.net> skribis:
>
>>>From d584c09c37d8e2b70fb5b6b1b2c685698f7ac73d Mon Sep 17 00:00:00 2001
>> From: Brett Gilio <brettg <at> posteo.net>
>> Date: Wed, 27 Nov 2019 02:08:02 -0600
>> Subject: [PATCH] gnu: Add tdlib.
>>
>> * gnu/packages/messaging.scm (tdlib): New variable.
>
> Applied, thanks.
>
> And apologies for the delay!
>
> Ludo’.

Thank you :).

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 Dec 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.