Subject: bug#25918: [PATCH 1/3] gnu: Add libmesode.

From: Mekeor Melire <[email-masked]>
Date: Thu, 02 Mar 2017 23:46:26 +0100

>From f413c7ed74e30d73d9fe17f3b8cd3ef86842e22c Mon Sep 17 00:00:00 2001
From: Mekeor Melire <[email-masked]>
Date: Thu, 2 Mar 2017 23:30:18 +0100
Subject: [PATCH 1/3] gnu: Add libmesode.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 0ffc031c8..8cdb1ac98 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016, 2017 <[email-masked]>
 ;;; Copyright © 2016 Andy Patterson <[email-masked]>
 ;;; Copyright © 2016, 2017 Clément Lassieur <[email-masked]>
+;;; Copyright © 2017 Mekeor Melire <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1222,4 +1223,39 @@ is also scriptable and extensible via Guile.")
     (home-page "https://www.gnu.org/software/freetalk")
     (license license:gpl3+)))
 
+(define-public libmesode
+  (package
+    (name "libmesode")
+    (version "0.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/boothj5/libmesode/archive/"
+                                  version ".tar.gz")
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0iaj56fkd5bjvqpvq3324ni895rmbj1akbfqipjydnghfwaym4z6"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'bootstrap
+           (lambda _
+             (zero? (system* "./bootstrap.sh")))))))
+    (inputs
+     `(("expat" ,expat)
+       ("openssl" ,openssl)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "simple, lightweight C library for writing XMPP clients")
+    (description "Libmesode is a fork of libstrophe for use with Profanity
+XMPP Client.  In particular, libmesode provides extra TLS functionality such as
+manual SSL certificate verification.")
+    (home-page "https://github.com/boothj5/libmesode")
+    ;; Dual licensed.
+    (license (list license:gpl3+ license:x11))))
+
 ;;; messaging.scm ends here
-- 
2.11.0

>From af0bcb551ca9a7b03df9442d2e6bf9c7a6d78b21 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <[email-masked]>
Date: Thu, 2 Mar 2017 23:31:09 +0100
Subject: [PATCH 2/3] gnu: Add libstrophe.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 8cdb1ac98..71e910968 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -1258,4 +1258,39 @@ manual SSL certificate verification.")
     ;; Dual licensed.
     (license (list license:gpl3+ license:x11))))
 
+(define-public libstrophe
+  (package
+    (name "libstrophe")
+    (version "0.9.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/strophe/libstrophe/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1hzwdax4nsz0fncf5bjfza0cn0lc6xsf38y569ql1gg5hvwr6169"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'bootstrap
+           (lambda _
+             (zero? (system* "./bootstrap.sh")))))))
+    (inputs
+     `(("expat" ,expat)
+       ("openssl" ,openssl)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "simple, lightweight C library for writing XMPP clients")
+    (description "Libstrophe is a minimal XMPP library written in C.  It has
+almost no external dependencies, only an XML parsing library (expat or libxml
+are both supported).")
+    (home-page "http://strophe.im/libstrophe")
+    ;; Dual licensed.
+    (license (list license:gpl3+ license:x11))))
+
 ;;; messaging.scm ends here
-- 
2.11.0

>From 90a0cac4263416b01a66f2464208d09d444208f1 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <[email-masked]>
Date: Thu, 2 Mar 2017 23:31:50 +0100
Subject: [PATCH 3/3] gnu: Add profanity.

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

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 71e910968..3fe1186b3 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -44,6 +44,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
   #:use-module (gnu packages crypto)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
@@ -1293,4 +1294,38 @@ are both supported).")
     ;; Dual licensed.
     (license (list license:gpl3+ license:x11))))
 
+(define-public profanity
+    (package
+        (name "profanity")
+        (version "0.5.1")
+        (source (origin
+                  (method url-fetch)
+                  (uri "http://www.profanity.im/profanity-0.5.1.tar.gz")
+                  (sha256
+                   (base32
+                     "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3"))))
+        (build-system gnu-build-system)
+        (inputs
+         `(("curl" ,curl)
+           ("expat" ,expat)
+           ("glib" ,glib)
+           ("gpgme" ,gpgme)
+           ("libmesode" ,libmesode)
+           ("libotr" ,libotr)
+           ("ncurses" ,ncurses)
+           ("openssl" ,openssl)
+           ("readline" ,readline)))
+        (native-inputs
+         `(("autoconf" ,autoconf)
+           ("autoconf-archive" ,autoconf-archive)
+           ("automake" ,automake)
+           ("cmocka" ,cmocka)
+           ("libtool" ,libtool)
+           ("pkg-config" ,pkg-config)))
+        (synopsis "console based XMPP client")
+        (description "Profanity is a console based XMPP client written in C
+using ncurses and libmesode, inspired by Irssi.")
+        (home-page "http://www.profanity.im")
+        (license license:gpl3+)))
+
 ;;; messaging.scm ends here
-- 
2.11.0

Hi Guix,
hi Ricardo.

Ricardo Wurmus <[email-masked]> writes:

> This is almost ready to push, and I could make the needed changes
> myself, but maybe you’d like to handle them yourself.

Sure. :)

> Please add a “file-name” expression here to give the archive a proper
> name in the store.  We do this for all tarballs that don’t include the
> name of the package.

Done.

> Please remove the “A” from the beginning.  (I think “guix lint” also
> complains about it.)

Done. It's unfortunate that “guix lint” doesn't have a “-f” option so
that I could do “guix lint -f gnu/packages/messaging.scm” or so.

(My packaging work-flow is quite uncomfortable. I'm packaging in an my
custom GUIX_PACKAGE_PATH; and then I copy the snippets into my local
guix-repo. I wonder how your workflow looks like.)

> Please separate sentences with two spaces.

Done.

> Please add a comment that explains what this list means.

Done.

> Could you send an updated patch as a response to this email please?

Doing so.

I hope it's fine for you that I'm *attaching* the patches instead of
putting them *inline* because there are three separate patches. (I hope
the attachments reach you because I'm still unconversant with my new
mail client (mu4e).)

Was it a good idea to separate the patches, actually?

--
luv
mekeor

EDD3 DFFA 76F6 11C0 145F 9A99 AC85 BAD8 A2F8 C868