aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/messaging.scm
diff options
context:
space:
mode:
authorTomáš Čech <sleep_walker@gnu.org>2018-10-21 18:18:13 +0200
committerLudovic Courtès <ludo@gnu.org>2018-10-27 16:39:29 +0200
commite9a041577a4c63d86ff9164bd0e0d46e59db6122 (patch)
tree87e2fa2f705e7689c80923b16f360f4f8a31d769 /gnu/packages/messaging.scm
parent932d1600564cbf359a6ccd1086b968a934bef8e5 (diff)
downloadpatches-e9a041577a4c63d86ff9164bd0e0d46e59db6122.tar
patches-e9a041577a4c63d86ff9164bd0e0d46e59db6122.tar.gz
gnu: Add telegram-purple.
* gnu/packages/messaging.scm (telegram-purple): New variable. * gnu/packages/patches/telegram-purple-adjust-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/messaging.scm')
-rw-r--r--gnu/packages/messaging.scm82
1 files changed, 82 insertions, 0 deletions
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 42fb3733bb..0090fe12ce 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1763,4 +1763,86 @@ non-interoperable protocol, which allows it to support features like group
messaging that aren’t available to clients that connect over XMPP.")
(license license:expat)))
+(define-public telegram-purple
+ (package
+ (name "telegram-purple")
+ (version "1.3.1")
+ (home-page "https://github.com/majn/telegram-purple")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (sha256
+ (base32
+ "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "Makefile.in"
+ ;; By default these two directories point to Pidgin's own
+ ;; prefix.
+ (("^PLUGIN_DIR_PURPLE=.*")
+ (string-append
+ "exec_prefix := @exec_prefix@\n"
+ "PLUGIN_DIR_PURPLE := @libdir@/purple-2\n"))
+ (("^DATA_ROOT_DIR_PURPLE=.*")
+ "DATA_ROOT_DIR_PURPLE := @datarootdir@\n")
+
+ ;; Honor sysconfdir instead of trying to write to /etc.
+ (("DESTDIR\\)/etc/telegram-purple")
+ "DESTDIR)@sysconfdir@/telegram-purple"))
+ #t))
+ (patches (search-patches "telegram-purple-adjust-test.patch"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("which" ,which)))
+ (inputs
+ `(("pidgin" ,pidgin)
+ ("libgcrypt" ,libgcrypt)
+ ("libwebp" ,libwebp)
+ ("glib" ,glib)
+ ("gettext" ,gnu-gettext)
+ ("gtk+" ,gtk+-2)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; We're using release tag for repository checkout - let's prepare
+ ;; header defining GIT_COMMIT manually instead of running git to
+ ;; identify version which is being compiled. Git repository
+ ;; is removed anyway and only source code is kept.
+ (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"))))
+ #t))
+ (add-before 'configure 'set-SHELL-variables
+ ;; Set these environment variables so that 'tgl/configure' uses the
+ ;; right shell and not /bin/sh.
+ (lambda _
+ (let ((bash (which "bash")))
+ (setenv "SHELL" bash)
+ (setenv "CONFIG_SHELL" bash)
+ #t))))))
+ (synopsis "Telegram messaging support for Pidgin")
+ (description
+ "Telegram-purple is a plugin for Libpurple, the communication library
+used by the Pidgin instant messaging client, that adds support for the
+Telegram messenger.")
+
+ ;; Code under tgl/ (the Telegram library) is LGPLv2.1+, but the plugin
+ ;; itself is GPLv2+.
+ (license license:gpl2+)))
+
;;; messaging.scm ends here