diff mbox series

[bug#51587,v2,3/3] gnu: Add rss2email.

Message ID BYAPR05MB40235E40ED1C4879258B6C73C5949@BYAPR05MB4023.namprd05.prod.outlook.com
State Accepted
Headers show
Series gnu: Add rss2email. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Morgan Smith Nov. 11, 2021, 3:30 p.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/mail.scm (rss2email): New variable.
---
 gnu/packages/mail.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 31cf4ec6b0..1d9f361b80 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -42,6 +42,7 @@ 
 ;;; Copyright © 2020 divoplade <d@divoplade.fr>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
+;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -4612,3 +4613,41 @@  (define-public crm114
 Bigrams, WINNOW, Correlation, KNN/Hyperspace, or Bit Entropy (or by other
 means--it's all programmable).")
     (license license:gpl3)))
+
+(define-public rss2email
+  (package
+    (name "rss2email")
+    (version "3.13.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rss2email/rss2email")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0g1yr3v3ibdh2jqil64fbdbplx5m2yzxr893fqfkwcc5c7fbwl4d"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion "test"
+                 ;; Skip networking tests
+                 (substitute* "test.py"
+                   (("( *)class (:?TestSend|TestFetch).*" match indent)
+                    (string-append indent "@unittest.skip(\"Networking stuff skipped\")\n"
+                                   indent match)))
+                 (invoke "python" "-m" "unittest"))))))))
+    (inputs
+     `(("python-feedparser" ,python-feedparser)
+       ("python-html2text" ,python-html2text)))
+    (home-page "https://github.com/rss2email/rss2email")
+    (synopsis "Converts RSS/Atom newsfeeds to email")
+    (description "Fetches RSS/Atom newsfeeds, converts them into emails, and
+emails them.")
+    ;; GPL version 2 or 3.  NOT 2+.
+    (license (list license:gpl2
+                   license:gpl3))))