Subject: [PATCH 2/2] gnu: Add cyrus-sasl-xoauth2.

From: reza <[email-masked]>
Date: Wed, 18 Dec 2024 08:58:59 +0000

* gnu/packages/cyrus-sasl.scm (cyrus-sasl-xoauth2): New variable.

Change-Id: I2e7d415c2ae18467d9901118c987155aa3f0edca
---
 gnu/packages/cyrus-sasl.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm
index ee8ad14d08..4ef5564d41 100644
--- a/gnu/packages/cyrus-sasl.scm
+++ b/gnu/packages/cyrus-sasl.scm
@@ -77,3 +77,35 @@ (define-public cyrus-sasl
     (license (license:non-copyleft "file://COPYING"
                                    "See COPYING in the distribution."))
     (home-page "https://cyrusimap.org/sasl/")))
+
+(define-public cyrus-sasl-xoauth2
+  (package
+    (name "cyrus-sasl-xoauth2")
+    (version "0.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/moriyoshi/"
+                                  "cyrus-sasl-xoauth2/archive/tags/v"
+				  version ".tar.gz"))
+              (sha256
+               (base32
+                "0hz95rp2n0xrkc0y2fgif2s7d61hlhd4qki5m8q0s44qc1b2cb56"))))
+    (build-system gnu-build-system)
+    (inputs (list autoconf
+                  automake
+                  libtool
+                  cyrus-sasl))
+    (arguments
+     (list #:configure-flags
+	   #~(list (string-append "--with-cyrus-sasl=" #$output))
+	   #:phases
+	   #~(modify-phases %standard-phases
+	       (add-after 'unpack 'add-shebang
+		 (lambda _
+		   (substitute* "autogen.sh"
+		     (("libtoolize") "#!/bin/sh\nlibtoolize")))))))
+    (synopsis "XOAUTH2 mechanism plugin for cyrus-sasl")
+    (description
+     "This is a plugin implementation of XOAUTH2 for cyrus-sasl.")
+    (home-page "https://github.com/moriyoshi/cyrus-sasl-xoauth2")
+    (license license:expat)))
-- 
2.46.0