Subject: [PATCH 17/24] gnu: Add python-matrix-nio.

From: slg <[email-masked]>
Date: Sat, 19 Jun 2021 22:07:35 -0300

* gnu/packages/matrix.scm (python-matrix-nio): New variable.
---
 gnu/packages/matrix.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/matrix.scm b/gnu/packages/matrix.scm
index 5c2b194d07..d7438deebd 100644
--- a/gnu/packages/matrix.scm
+++ b/gnu/packages/matrix.scm
@@ -22,6 +22,7 @@
 (define-module (gnu packages matrix)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages monitoring)
   #:use-module (gnu packages python-crypto)
@@ -149,3 +150,42 @@ Python/Twisted.  It is intended to showcase the concept of Matrix and let
 folks see the spec in the context of a codebase and let you run your own
 homeserver and generally help bootstrap the ecosystem.")
     (license license:asl2.0)))
+
+(define-public python-matrix-nio
+  (package
+    (name "python-matrix-nio")
+    (version "0.18.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "matrix-nio" version))
+       (sha256
+        (base32
+         "09ld9jakq7h4hsa6lyqn82p5cb5qc2dl0gn418i98kz870p01qm2"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-aiofiles" ,python-aiofiles)
+       ("python-aiohttp-socks" ,python-aiohttp-socks)
+       ("python-aiohttp" ,python-aiohttp)
+       ("python-future" ,python-future)
+       ("python-h11" ,python-h11)
+       ("python-h2" ,python-h2)
+       ("python-jsonschema" ,python-jsonschema)
+       ("python-logbook" ,python-logbook)
+       ("python-pycryptodome" ,python-pycryptodome)
+       ("python-unpaddedbase64" ,python-unpaddedbase64)
+       ;; EE2E requirements
+       ("libolm" ,libolm)
+       ("libolm" ,libolm "python")
+       ("python-cachetools" ,python-cachetools)
+       ("python-peewee" ,python-peewee)
+       ("python-atomicwrites" ,python-atomicwrites)))
+    (arguments
+     `(#:tests? #f)) ;; PyPI tarball misses tests, but git version uses
+                     ;; different build system
+    (home-page "https://github.com/poljar/matrix-nio")
+    (synopsis "Matrix client library for Python")
+    (description "@code{nio} is a multilayered Matrix client library.  The
+underlying base layer doesn't do any network IO on its own, but on top of
+that is a full fledged batteries-included asyncio layer using aiohttp.")
+    (license license:isc)))
-- 
2.32.0