From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Q4V-0005K6-22 for guix-patches@gnu.org; Thu, 13 Sep 2018 07:46:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0Q4R-00068o-TQ for guix-patches@gnu.org; Thu, 13 Sep 2018 07:46:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g0Q4R-00068a-PT for guix-patches@gnu.org; Thu, 13 Sep 2018 07:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g0Q4P-0000dc-V7 for guix-patches@gnu.org; Thu, 13 Sep 2018 07:46:03 -0400 Subject: [bug#32727] [PATCH] gnu: Add telegram-purple. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Q3z-000551-0H for guix-patches@gnu.org; Thu, 13 Sep 2018 07:45:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g0Q3v-0005We-SG for guix-patches@gnu.org; Thu, 13 Sep 2018 07:45:34 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g0Q3v-0005WQ-OO for guix-patches@gnu.org; Thu, 13 Sep 2018 07:45:31 -0400 From: =?UTF-8?Q?Tom=C3=A1=C5=A1_?= =?UTF-8?Q?=C4=8Cech?= Date: Thu, 13 Sep 2018 13:45:24 +0200 Message-Id: <20180913114524.9280-1-sleep_walker@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32727@debbugs.gnu.org * gnu/packages/messaging.scm (telegram-purple): New variable. --- gnu/packages/messaging.scm | 70 +++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 42a0847b7..90c1b7b47 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -96,7 +96,8 @@ #:use-module (gnu packages less) #:use-module (gnu packages readline) #:use-module (gnu packages photo) - #:use-module (gnu packages texinfo)) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages version-control)) (define-public libotr (package @@ -1719,4 +1720,71 @@ QMatrixClient project.") (license (list license:gpl3+ ; all source code license:lgpl3+)))) ; icons/breeze +(define-public telegram-purple + (package + (name "telegram-purple") + (version "1.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/majn/telegram-purple") + (commit (string-append "v" version)) + (recursive? #t))) + (sha256 + (base32 + "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("git" ,git) + ("which" ,which))) + (inputs + `(("pidgin" ,pidgin) + ("libgcrypt" ,libgcrypt) + ("libwebp" ,libwebp) + ("glib" ,glib) + ("gettext" ,gnu-gettext) + ("gtk+" ,gtk+-2) + ("zlib" ,zlib))) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'prepare-commit.h + (lambda _ + (with-output-to-file "./commit.h" + (lambda () + (display + (string-append "//generated by guix, use version instead of " + "commit\n" + "#ifndef GIT_COMMIT\n" + "# define GIT_COMMIT \"v" + ,version "\"\n" + "#endif\n")))))) + (replace 'configure + ;; configure does not work followed by both "SHELL=..." and + ;; "CONFIG_SHELL=..."; set environment variables instead + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "CONFIG_SHELL" bash) + (apply invoke "./configure" flags)))) + (replace 'install + ;; install is trying to use pidgin's lib directory instead of + ;; its own + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let* ((tgt (string-append (assoc-ref outputs "out") + "/lib/purple-2/"))) + (mkdir-p tgt) + (install-file "bin/telegram-purple.so" + tgt))))))) + ;; gettext + (home-page "https://github.com/majn/telegram-purple") + (synopsis "Telegram support for pidgin") + (description "Telegram protocol support for pidgin.") + (license license:gpl2+)))) + ;;; messaging.scm ends here -- 2.18.0