unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Tomáš Čech" <sleep_walker@gnu.org>
To: 32727@debbugs.gnu.org
Subject: [bug#32727] [PATCH] gnu: Add telegram-purple.
Date: Thu, 13 Sep 2018 13:49:58 +0200	[thread overview]
Message-ID: <20180913114958.14496-1-sleep_walker@gnu.org> (raw)
In-Reply-To: <20180913114524.9280-1-sleep_walker@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..22865ead5 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

  reply	other threads:[~2018-09-13 11:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 11:45 [bug#32727] [PATCH] gnu: Add telegram-purple Tomáš Čech
2018-09-13 11:49 ` Tomáš Čech [this message]
2018-09-13 12:20   ` Tomáš Čech
2018-09-16  0:58     ` Leo Famulari
2018-10-02  9:48       ` Ludovic Courtès
2018-10-21 16:18       ` Tomáš Čech
2018-10-27 14:35         ` bug#32727: " Ludovic Courtès
2018-10-27 14:57           ` [bug#32727] " Tomáš Čech
2018-10-28 22:27             ` Ludovic Courtès
2018-09-13 16:39 ` Leo Famulari

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20180913114958.14496-1-sleep_walker@gnu.org \
    --to=sleep_walker@gnu.org \
    --cc=32727@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).