[PATCH] Add nmail

OpenSubmitted by matf.
Details
2 participants
  • matf
  • (
Owner
unassigned
Severity
normal
Merged with
M
M
matf wrote 6 days ago
(address . guix-patches@gnu.org)(name . M)(address . matf@disr.it)
24b34888cb54d3702eaeebf40267d910be9b54bb.1659666096.git.matf@disr.it
From: M <matf@disr.it>

---
gnu/packages/mail.scm | 74 ++++++++++++++++++++++++++++++++-----------
1 file changed, 55 insertions(+), 19 deletions(-)

Toggle diff (165 lines)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ca4b3e819e..0bc6519dd2 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -49,6 +49,7 @@
 ;;; Copyright © 2022 Thiago Jung Bauermann <bauermann@kolabnow.com>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2022 muradm <mail@muradm.net>
+;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,8 +67,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages mail)
-  #:use-module (guix gexp)
-  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages aspell)
@@ -94,6 +93,7 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages file)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gawk)
@@ -101,15 +101,14 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
-  #:use-module (gnu packages golang)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
-  #:use-module (gnu packages flex)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages kerberos)
@@ -124,13 +123,14 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages mail)
   #:use-module (gnu packages man)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages nettle)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages ninja)
-  #:use-module (gnu packages openldap)
   #:use-module (gnu packages onc-rpc)
+  #:use-module (gnu packages openldap)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
@@ -145,14 +145,14 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ragel)
-  #:use-module (gnu packages regex)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages regex)
   #:use-module (gnu packages ruby)
-  #:use-module (gnu packages search)
-  #:use-module (gnu packages serialization)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages screen)
+  #:use-module (gnu packages search)
+  #:use-module (gnu packages serialization)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tcl)
@@ -164,28 +164,28 @@ (define-module (gnu packages mail)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
   #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg)
   #:use-module (gnu packages xml)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
-  #:use-module (guix deprecation)
-  #:use-module (guix download)
-  #:use-module (guix git-download)
-  #:use-module (guix svn-download)
-  #:use-module (guix utils)
+  #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system emacs)
   #:use-module (guix build-system glib-or-gtk)
-  #:use-module (guix build-system go)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system guile)
-  #:use-module (guix build-system emacs)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
-  #:use-module (srfi srfi-1)
+  #:use-module (guix deprecation)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix svn-download)
+  #:use-module (guix utils)
   #:use-module (ice-9 match))
+  #:use-module (srfi srfi-1))
 
 (define-public abook
   (package
@@ -441,6 +441,42 @@ (define-public guile2.2-mailutils
      (modify-inputs (package-inputs mailutils)
        (replace "guile" guile-2.2)))))
 
+(define-public nmail
+  (package
+    (name "nmail")
+    (version "3.74")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/d99kris/nmail/")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "07lkl5syx3l37dhsl41nhmjknhxqgmvwc4il4gygsnr333qk75c9"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (replace 'check
+                          (lambda*
+                              (#:key tests? #:allow-other-keys)
+                              (when tests? (invoke "ctest" "--output-on-failure")))))))
+    (inputs (list libetpan
+                  xapian
+                  sqlite
+                  cyrus-sasl
+                  ncurses
+                  openssl
+                  file
+                  (list util-linux "lib")))
+    (native-inputs (list pkg-config))
+    (home-page "https://github.com/d99kris/nmail")
+    (synopsis "Terminal-based email client")
+    (description
+     "@command{nmail} is a terminal-based email client with a
+@code{ncurses} user interface similar to @code{alpine} and @code{pine}.")
+    (license license:expat)))
+
 (define-public nullmailer
   (package
     (name "nullmailer")
-- 
2.34.0
M
M
Mathieu wrote 5 days ago
Re: bug#56994: Acknowledgement ([PATCH] Add nmail)
(address . 56994@debbugs.gnu.org)
b207e400-f103-48ec-be1b-d825bbf8b6d8@disroot.org
This is my first attempt at packaging for Guix, I hope I didn't do any huge mistakes. And thanks IRC for the massive help I've received to slowly progress with Scheme.

I was unsure where to add the `use-module` I needed for `nmail.scm` when adding it into `mail.scm`, and in the end I think all modules were all already there, but to check that, I ordered them alphabetically in `mail.scm` and this revealed some duplicates, so the patch reflects that too.
(
(
( wrote 5 days ago
Re: [bug#56994] [PATCH] Add nmail
CLY3H5RT7TGF.2D2ROQS8D6IIP@guix-aspire
Nice to see you got it working :) Some stylistic nits:

On Fri Aug 5, 2022 at 3:21 AM BST, wrote:
Toggle quote (4 lines)
> From: M <matf@disr.it>
>
> ---

You need to write a commit message following the project's conventions. In
this case, it'd be something like:

Toggle quote (6 lines)
> gnu: packages: Add nmail.
>
> * gnu/packages/mail.scm: Reorder module imports. Remove
> duplicate imports.
> (nmail): New variable.

(No, I don't like it much either :))

Toggle quote (7 lines)
> + (arguments
> + (list #:phases #~(modify-phases %standard-phases
> + (replace 'check
> + (lambda*
> + (#:key tests? #:allow-other-keys)
> + (when tests? (invoke "ctest" "--output-on-failure")))))))

This part should be reformatted like this:

Toggle quote (17 lines)
> (arguments
> (list #:phases
> #~(modify-phases %standard-phases
> (replace 'check
> (lambda* (#:key tests? #:allow-other-keys)
> (when tests?
> (invoke "ctest" "--output-on-failure")))))))

> + (inputs (list libetpan
> + xapian
> + sqlite
> + cyrus-sasl
> + ncurses
> + openssl
> + file
> + (list util-linux "lib")))

And this as:

Toggle quote (23 lines)
> (inputs
> (list cyrus-sasl
> file
> ncurses
> openssl
> sqlite
> (list util-linux "lib")
> xapian))

> + (native-inputs (list pkg-config))
> + (home-page "https://github.com/d99kris/nmail")
> + (synopsis "Terminal-based email client")
> + (description
> + "@command{nmail} is a terminal-based email client with a
> +@code{ncurses} user interface similar to @code{alpine} and @code{pine}.")
> + (license license:expat)))
> +
> (define-public nullmailer
> (package
> (name "nullmailer")
> --
> 2.34.0

Other than that, LGTM! :)

-- (
M
M
Mathieu wrote 4 days ago
merge 56994 57201
(address . control@debbugs.gnu.org)
e1b4c5ad-ffb1-4aed-a26f-92ac831441f6@disroot.org
merge 56994 57021
?