# nmail.scm -rw-r--r-- 2.8 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(define-module (nmail)
  #:use-module (guix build-system cmake)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages search)
  #:use-module (gnu packages file)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages cyrus-sasl)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages tls))

(define-public nmail
  (let ((commit "7a85b1ed7bf0c77e1bf6aff592413e1347079b1c")
        (revision "1"))
    (package
      (name "nmail")
      (version (git-version "3.74" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/d99kris/nmail/")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0mi7d5bsxg8m9d5m22vq186iywnzx1xy3k27jx4lkmwjhb6wnhhy"))))
      (build-system cmake-build-system)
      ;; NOTE: You don't need to specify the "out" output.
      (arguments
       (list #:phases
             ;; NOTE: We use a "G-expression" (#~) to specify some code that
             ;; is to be run at build time. We can use (#$), the "ungexp",
             ;; form, to build another gexp and use its result.
             #~(modify-phases %standard-phases
                 (replace 'check
                   ;; NOTE: This procedure is called to run the phase with
                   ;; a few keyword arguments. We don't want any of those,
                   ;; so we just ignore them like this.
                   (lambda _
                     ;; NOTE: invoke is one of the Guix build utilities in
                     ;; (guix build utils), which is automatically imported
                     ;; in build phases.
                     (invoke "ctest" "--output-on-failure"))))))
      (inputs
       ;; NOTE: This is the new inputs syntax.
       (list libetpan xapian sqlite cyrus-sasl ncurses openssl
             file (list util-linux "lib")))
      (native-inputs (list pkg-config))
      (home-page "https://github.com/d99ris/nmail")
      ;; NOTE: We don't say "for Linux and macOS"; a Guix user won't care
      ;; about the latter, and the former is obvious from the fact that
      ;; it's packaged.
      (synopsis "Terminal-based email client")
      (description
       ;; NOTE: It wouldn't be a very good email client if it didn't
       ;; support both IMAP and SMTP, so we'll not mention that :)
       "@command{nmail} is a terminal-based email client with a user
interface similar to @code{alpine} and @code{pine}.")
      (license license:expat))))