Subject: [PATCH v2 67/71] gnu: Add go-maunium-net-go-mautrix.

From: Miguel Ángel Moreno <[email-masked]>
Date: Sun, 11 Feb 2024 23:08:57 +0100

* gnu/packages/matrix.scm (go-maunium-net-go-mautrix): New variable.

Change-Id: I325a657b6491778e341ceb04ac98b7f0f3c6e294
---
 gnu/packages/matrix.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm
index 32ae62fcb4..49b274597a 100644
--- a/gnu/packages/matrix.scm
+++ b/gnu/packages/matrix.scm
@@ -27,6 +27,9 @@ (define-module (gnu packages matrix)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages golang)
+  #:use-module (gnu packages golang-check)
+  #:use-module (gnu packages golang-web)
   #:use-module (gnu packages monitoring)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
@@ -36,11 +39,58 @@ (define-module (gnu packages matrix)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system go)
   #:use-module (guix download)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix packages))
 
+(define-public go-maunium-net-go-mautrix
+  (package
+    (name "go-maunium-net-go-mautrix")
+    (version "0.15.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mautrix/go")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0n71zaiir9kcrh5wkyx2h12lkr6h9srlfh3ikdzvjcw9rq2nc7dq"))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:go go-1.19
+      #:import-path "maunium.net/go/mautrix"))
+    (propagated-inputs
+     (list
+      go-github-com-gorilla-mux
+      go-github-com-lib-pq
+      go-github-com-rs-zerolog
+      go-github-com-stretchr-testify
+      go-github-com-tidwall-gjson
+      go-github-com-tidwall-sjson
+      go-github-com-yuin-goldmark
+      go-golang-org-x-crypto
+      go-golang-org-x-net
+      go-mau-fi-zeroconfig
+      go-maunium-net-go-mauflag
+      go-maunium-net-go-maulogger))
+    (home-page "https://github.com/mautrix/go")
+    (synopsis "A Golang Matrix framework")
+    (description "A Golang Matrix framework.  In addition to the basic
+client API features the original project has, this framework also has:
+@itemize
+@item Appservice support (Intent API like mautrix-python, room state
+storage, etc)
+@item End-to-end encryption support (incl. interactive SAS verification)
+@item Structs for parsing event content
+@item Helpers for parsing and generating Matrix HTML
+@item Helpers for handling push rules
+@end itemize")
+    (license license:mpl2.0)))
+
 (define-public python-matrix-client
   (package
     (name "python-matrix-client")
-- 
2.41.0

-- 
Best regards,
Miguel Ángel Moreno