* [bug#51520] [PATCH 0/3] Add weechat-matrix and weechat-wee-slack
@ 2021-10-30 20:21 Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Arun Isaac @ 2021-10-30 20:21 UTC (permalink / raw)
To: 51520; +Cc: Arun Isaac
Hi,
This patchset adds weechat-matrix and weechat-wee-slack. These are scripts
that implement a matrix client and a slack client for weechat.
Regards,
Arun
Arun Isaac (3):
gnu: Add python-webcolors.
gnu: Add weechat-matrix.
gnu: Add weechat-wee-slack.
gnu/packages/messaging.scm | 119 +++++++++++++++++++++++++++++++++++-
gnu/packages/python-web.scm | 40 ++++++++++++
2 files changed, 158 insertions(+), 1 deletion(-)
--
2.33.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#51520] [PATCH 1/3] gnu: Add python-webcolors.
2021-10-30 20:21 [bug#51520] [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Arun Isaac
@ 2021-10-30 20:25 ` Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 2/3] gnu: Add weechat-matrix Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 3/3] gnu: Add weechat-wee-slack Arun Isaac
2021-10-30 23:17 ` [bug#51520] Just what I needed! jgart via Guix-patches via
2021-11-07 21:00 ` bug#51520: [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Efraim Flashner
2 siblings, 2 replies; 6+ messages in thread
From: Arun Isaac @ 2021-10-30 20:25 UTC (permalink / raw)
To: 51520; +Cc: Arun Isaac
* gnu/packages/python-web.scm (python-webcolors): New variable.
---
gnu/packages/python-web.scm | 40 +++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 62de043e70..08e2006a3e 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -44,6 +44,7 @@
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6250,3 +6251,42 @@ (define-public python-w3lib
comments, or tags from HTML snippets, extract base url from HTML snippets,
translate entities on HTML strings, among other things.")
(license license:bsd-3)))
+
+(define-public python-webcolors
+ (package
+ (name "python-webcolors")
+ (version "1.11.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "webcolors" version))
+ (sha256
+ (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/ubernostrum/webcolors")
+ (synopsis "HTML/CSS color definitions library")
+ (description "@code{python-webcolors} is a module for working with
+HTML/CSS color definitions. Normalizing and converting between the following
+formats is supported.
+
+@itemize
+@item Specification-defined color names
+@item Six-digit hexadecimal
+@item Three-digit hexadecimal
+@item Integer rgb() triplet
+@item Percentage rgb() triplet
+@end itemize
+
+Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
+can be handled by the @code{colorsys} module in the Python standard library.")
+ (license license:bsd-3)))
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#51520] [PATCH 2/3] gnu: Add weechat-matrix.
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
@ 2021-10-30 20:25 ` Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 3/3] gnu: Add weechat-wee-slack Arun Isaac
1 sibling, 0 replies; 6+ messages in thread
From: Arun Isaac @ 2021-10-30 20:25 UTC (permalink / raw)
To: 51520; +Cc: Arun Isaac
* gnu/packages/messaging.scm (weechat-matrix): New variable.
---
gnu/packages/messaging.scm | 69 +++++++++++++++++++++++++++++++++++++-
1 file changed, 68 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index d07c1c6566..e684c60c0c 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2016, 2017, 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
-;;; Copyright © 2017, 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2018, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
@@ -2992,4 +2992,71 @@ (define-public matterbridge
(home-page "https://github.com/42wim/matterbridge")
(license license:asl2.0)))
+(define-public weechat-matrix
+ (package
+ (name "weechat-matrix")
+ (version "0.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/poljar/weechat-matrix")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1iv55n4k05139f7jzkhczgw4qp6qwilrvfsy3c6v2m1kxffj12d3"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((weechat-python (string-append (assoc-ref outputs "out")
+ "/share/weechat/python")))
+ ;; Avoid circular import by renaming the matrix module to
+ ;; weechat_matrix.
+ (substitute* (cons "main.py"
+ (append (find-files "matrix")
+ (find-files "tests")))
+ (("from matrix") "from weechat_matrix")
+ (("import matrix") "import weechat_matrix"))
+ ;; Install python modules.
+ (invoke "make" "install-lib"
+ (string-append "INSTALLDIR="
+ (site-packages inputs outputs)
+ "/weechat_matrix"))
+ ;; Extend PYTHONPATH to find installed python modules.
+ (add-installed-pythonpath inputs outputs)
+ ;; Augment sys.path so that dependencies are found.
+ (substitute* "main.py"
+ (("import os\n" all)
+ (apply string-append
+ all
+ "import sys\n"
+ (map (lambda (path)
+ (string-append "sys.path.append('" path "')\n"))
+ (string-split (getenv "PYTHONPATH") #\:)))))
+ ;; Install script.
+ (mkdir-p weechat-python)
+ (copy-file "main.py"
+ (string-append weechat-python "/matrix.py")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
+ (inputs
+ `(("python-matrix-nio" ,python-matrix-nio)
+ ("python-pygments" ,python-pygments)
+ ("python-pyopenssl" ,python-pyopenssl)
+ ("python-webcolors" ,python-webcolors)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/poljar/weechat-matrix")
+ (synopsis "Weechat Matrix protocol script")
+ (description "@code{weechat-matrix} is a Python plugin for Weechat that lets
+Weechat communicate over the Matrix protocol.")
+ (license license:isc)))
+
;;; messaging.scm ends here
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#51520] [PATCH 3/3] gnu: Add weechat-wee-slack.
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 2/3] gnu: Add weechat-matrix Arun Isaac
@ 2021-10-30 20:25 ` Arun Isaac
1 sibling, 0 replies; 6+ messages in thread
From: Arun Isaac @ 2021-10-30 20:25 UTC (permalink / raw)
To: 51520; +Cc: Arun Isaac
* gnu/packages/messaging.scm (weechat-wee-slack): New variable.
---
gnu/packages/messaging.scm | 50 ++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index e684c60c0c..60a9fc3033 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -3059,4 +3059,54 @@ (define-public weechat-matrix
Weechat communicate over the Matrix protocol.")
(license license:isc)))
+(define-public weechat-wee-slack
+ (package
+ (name "weechat-wee-slack")
+ (version "2.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wee-slack/wee-slack")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xfklr0gsc9jgxfyrrb2j756lclz9g8imcb0pk0xgyj8mhsw23zk"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; Augment sys.path so that dependencies are found.
+ (substitute* "wee_slack.py"
+ (("import sys\n" all)
+ (apply string-append
+ all
+ (map (lambda (path)
+ (string-append "sys.path.append('" path "')\n"))
+ (string-split (getenv "PYTHONPATH") #\:)))))
+ ;; Install script.
+ (install-file "wee_slack.py"
+ (string-append (assoc-ref outputs "out")
+ "/share/weechat/python"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest")))))))
+ (inputs
+ `(("python-websocket-client" ,python-websocket-client)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/wee-slack/wee-slack")
+ (synopsis "Weechat Slack script")
+ (description "@code{weechat-wee-slack} is a WeeChat native client for
+Slack. It provides supplemental features only available in the web/mobile
+clients such as synchronizing read markers, typing notification, threads (and
+more)! It connects via the Slack API, and maintains a persistent websocket
+for notification of events.")
+ (license license:expat)))
+
;;; messaging.scm ends here
--
2.33.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#51520] Just what I needed!
2021-10-30 20:21 [bug#51520] [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
@ 2021-10-30 23:17 ` jgart via Guix-patches via
2021-11-07 21:00 ` bug#51520: [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Efraim Flashner
2 siblings, 0 replies; 6+ messages in thread
From: jgart via Guix-patches via @ 2021-10-30 23:17 UTC (permalink / raw)
To: 51520
Just what I needed!
:)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#51520: [PATCH 0/3] Add weechat-matrix and weechat-wee-slack
2021-10-30 20:21 [bug#51520] [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
2021-10-30 23:17 ` [bug#51520] Just what I needed! jgart via Guix-patches via
@ 2021-11-07 21:00 ` Efraim Flashner
2 siblings, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2021-11-07 21:00 UTC (permalink / raw)
To: 51520-done
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
Thanks. Patches pushed.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-07 21:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-30 20:21 [bug#51520] [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 1/3] gnu: Add python-webcolors Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 2/3] gnu: Add weechat-matrix Arun Isaac
2021-10-30 20:25 ` [bug#51520] [PATCH 3/3] gnu: Add weechat-wee-slack Arun Isaac
2021-10-30 23:17 ` [bug#51520] Just what I needed! jgart via Guix-patches via
2021-11-07 21:00 ` bug#51520: [PATCH 0/3] Add weechat-matrix and weechat-wee-slack Efraim Flashner
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.