Commit | Line | Data |
---|---|---|
a661e420 | 1 | ;;; GNU Guix --- Functional package management for GNU |
a7e59c50 | 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
681a6588 | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
a661e420 LC |
4 | ;;; |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
8 | ;;; under the terms of the GNU General Public License as published by | |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
12 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
1fdd3ee2 | 20 | (define-module (gnu packages mail) |
59a43334 | 21 | #:use-module (gnu packages) |
d983a14f | 22 | #:use-module (gnu packages autotools) |
4fd6bf53 | 23 | #:use-module (gnu packages cyrus-sasl) |
d983a14f | 24 | #:use-module (gnu packages dejagnu) |
1ffa7090 | 25 | #:use-module (gnu packages gdbm) |
524e1df6 | 26 | #:use-module (gnu packages gnupg) |
d983a14f | 27 | #:use-module (gnu packages gnutls) |
1ffa7090 | 28 | #:use-module (gnu packages guile) |
d983a14f AE |
29 | #:use-module (gnu packages linux) |
30 | #:use-module (gnu packages m4) | |
31 | #:use-module (gnu packages mysql) | |
1ffa7090 | 32 | #:use-module (gnu packages ncurses) |
d983a14f | 33 | #:use-module (gnu packages openssl) |
13f04f48 | 34 | #:use-module (gnu packages perl) |
1ffa7090 | 35 | #:use-module (gnu packages readline) |
1ffa7090 | 36 | #:use-module (gnu packages texinfo) |
681a6588 MW |
37 | #:use-module (gnu packages compression) |
38 | #:use-module (gnu packages glib) | |
39 | #:use-module (gnu packages pkg-config) | |
a7e59c50 LC |
40 | #:use-module (gnu packages flex) |
41 | #:use-module (gnu packages bdb) | |
d983a14f | 42 | #:use-module ((guix licenses) |
a7e59c50 | 43 | #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+)) |
a661e420 LC |
44 | #:use-module (guix packages) |
45 | #:use-module (guix download) | |
681a6588 MW |
46 | #:use-module (guix build-system gnu) |
47 | #:use-module (srfi srfi-1)) | |
a661e420 LC |
48 | |
49 | (define-public mailutils | |
50 | (package | |
51 | (name "mailutils") | |
52 | (version "2.2") | |
53 | (source (origin | |
54 | (method url-fetch) | |
55 | (uri (string-append "mirror://gnu/mailutils/mailutils-" | |
56 | version ".tar.bz2")) | |
57 | (sha256 | |
58 | (base32 | |
01eafd38 LC |
59 | "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65")) |
60 | (patches (list (search-patch "m4-gets-undeclared.patch"))))) | |
a661e420 LC |
61 | (build-system gnu-build-system) |
62 | (arguments | |
63 | '(;; TODO: Add `--with-sql'. | |
a661e420 LC |
64 | #:phases (alist-cons-before |
65 | 'build 'pre-build | |
66 | (lambda _ | |
67 | ;; Use Guile 2.0's public API. | |
68 | (substitute* "libmu_scm/mu_message.c" | |
69 | (("scm_i_string_length") | |
70 | "scm_c_string_length")) | |
71 | ||
72 | ;; This file should be generated to use the right | |
73 | ;; value of $(libdir) et al. | |
74 | (delete-file "libmu_scm/mailutils.scm") | |
75 | ||
76 | ;; Use the right file name for `cat'. | |
77 | (substitute* "testsuite/lib/mailutils.exp" | |
78 | (("/bin/cat") | |
79 | (which "cat")))) | |
80 | %standard-phases) | |
81 | #:parallel-tests? #f)) | |
82 | (inputs | |
83 | `(("dejagnu" ,dejagnu) | |
84 | ("m4" ,m4) | |
85 | ("texinfo" ,texinfo) | |
86 | ("guile" ,guile-2.0) | |
87 | ("gnutls" ,gnutls) | |
88 | ("ncurses" ,ncurses) | |
eb8cc645 MW |
89 | |
90 | ;; With Readline 6.3, examples/pop3client.c fails to build because it | |
91 | ;; uses the now undefined 'CPPFunction' type. | |
92 | ("readline" ,readline-6.2) | |
93 | ||
a661e420 LC |
94 | ("linux-pam" ,linux-pam) |
95 | ("libtool" ,libtool) | |
01eafd38 | 96 | ("gdbm" ,gdbm))) |
a661e420 | 97 | (home-page "http://www.gnu.org/software/mailutils/") |
f50d2669 | 98 | (synopsis "Utilities and library for reading and serving mail") |
a661e420 | 99 | (description |
79c311b8 LC |
100 | "GNU Mailutils is a collection of programs for managing, viewing and |
101 | processing electronic mail. It contains both utilities and server daemons | |
102 | and all operate in a protocol-agnostic way. The underlying libraries are | |
103 | also available, simplifying the addition of mail capabilities to new | |
104 | software.") | |
a661e420 LC |
105 | (license |
106 | ;; Libraries are under LGPLv3+, and programs under GPLv3+. | |
107 | (list gpl3+ lgpl3+)))) | |
d983a14f AE |
108 | |
109 | (define-public fetchmail | |
110 | (package | |
111 | (name "fetchmail") | |
112 | (version "6.3.26") | |
113 | (source (origin | |
114 | (method url-fetch) | |
115 | (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-" | |
116 | version ".tar.xz")) | |
117 | (sha256 | |
118 | (base32 | |
119 | "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r")))) | |
120 | (build-system gnu-build-system) | |
121 | (inputs | |
122 | `(("openssl" ,openssl))) | |
123 | (arguments | |
124 | `(#:configure-flags (list (string-append "--with-ssl=" | |
125 | (assoc-ref %build-inputs "openssl"))))) | |
126 | (home-page "http://fetchmail.berlios.de/") | |
127 | (synopsis "Remote-mailr etrieval and forwarding utility") | |
128 | (description | |
129 | "Fetchmail is a full-featured, robust, well-documented remote-mail | |
130 | retrieval and forwarding utility intended to be used over on-demand | |
131 | TCP/IP links (such as SLIP or PPP connections). It supports every | |
132 | remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, | |
133 | KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 | |
134 | and IPSEC. | |
135 | ||
136 | Fetchmail retrieves mail from remote mail servers and forwards it via SMTP, | |
137 | so it can then be read by normal mail user agents such as mutt, elm | |
138 | or BSD Mail. It allows all your system MTA's filtering, forwarding, and | |
139 | aliasing facilities to work just as they would on normal mail.") | |
140 | (license gpl2+))) ; most files are actually public domain or x11 | |
13f04f48 AE |
141 | |
142 | (define-public mutt | |
143 | (package | |
144 | (name "mutt") | |
fb9c3acc | 145 | (version "1.5.23") |
13f04f48 AE |
146 | (source (origin |
147 | (method url-fetch) | |
fb9c3acc MW |
148 | (uri (list ;; Temporarily put bitbucket first, because |
149 | ;; ftp.mutt.org has been down for a while. | |
150 | (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-" | |
151 | version ".tar.gz") | |
152 | (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-" | |
153 | version ".tar.gz"))) | |
13f04f48 AE |
154 | (sha256 |
155 | (base32 | |
fb9c3acc | 156 | "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s")))) |
13f04f48 AE |
157 | (build-system gnu-build-system) |
158 | (inputs | |
4fd6bf53 | 159 | `(("cyrus-sasl" ,cyrus-sasl) |
524e1df6 | 160 | ("gpgme" ,gpgme) |
4fd6bf53 | 161 | ("ncurses" ,ncurses) |
13f04f48 AE |
162 | ("openssl" ,openssl) |
163 | ("perl" ,perl))) | |
164 | (arguments | |
165 | `(#:configure-flags '("--enable-smtp" | |
166 | "--enable-imap" | |
167 | "--enable-pop" | |
524e1df6 | 168 | "--enable-gpgme" |
13f04f48 | 169 | "--with-ssl" |
4fd6bf53 | 170 | "--with-sasl" |
13f04f48 AE |
171 | ;; so that mutt does not check whether the path |
172 | ;; exists, which it does not in the chroot | |
173 | "--with-mailpath=/var/mail"))) | |
174 | (home-page "http://www.mutt.org/") | |
175 | (synopsis "Mail client") | |
176 | (description | |
177 | "Mutt is a small but very powerful text-based mail client for Unix | |
178 | operating systems.") | |
179 | (license gpl2+))) | |
681a6588 MW |
180 | |
181 | (define-public gmime | |
182 | (package | |
183 | (name "gmime") | |
184 | (version "2.6.19") | |
185 | (source (origin | |
186 | (method url-fetch) | |
75630043 | 187 | (uri (string-append "mirror://gnome/sources/gmime/" |
681a6588 MW |
188 | (string-join (take (string-split version #\.) |
189 | 2) | |
190 | ".") | |
191 | "/gmime-" version ".tar.xz")) | |
192 | (sha256 | |
193 | (base32 | |
194 | "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg")))) | |
195 | (build-system gnu-build-system) | |
196 | (native-inputs | |
197 | `(("pkg-config" ,pkg-config) | |
198 | ("gnupg" ,gnupg))) ; for tests only | |
199 | (inputs `(("glib" ,glib) | |
200 | ("gpgme" ,gpgme) | |
201 | ("zlib" ,zlib))) | |
202 | (arguments | |
203 | `(#:phases | |
204 | (alist-cons-after | |
205 | 'unpack 'patch-paths-in-tests | |
206 | (lambda _ | |
207 | ;; The test programs run several programs using 'system' | |
208 | ;; with hard-coded paths. Here we patch them all. We also | |
209 | ;; change "gpg" to "gpg2". | |
210 | (substitute* (find-files "tests" "\\.c$") | |
211 | (("(system *\\(\")(/[^ ]*)" all pre prog-path) | |
212 | (let* ((base (basename prog-path)) | |
213 | (prog (which (if (string=? base "gpg") "gpg2" base)))) | |
214 | (string-append pre (or prog (error "not found: " base))))))) | |
215 | %standard-phases))) | |
216 | (home-page "http://spruce.sourceforge.net/gmime/") | |
217 | (synopsis "MIME message parser and creator library") | |
218 | (description | |
219 | "GMime provides a core library and set of utilities which may be used for | |
220 | the creation and parsing of messages using the Multipurpose Internet Mail | |
221 | Extension (MIME).") | |
222 | (license (list lgpl2.1+ gpl2+ gpl3+)))) | |
223 | ||
a7e59c50 LC |
224 | (define-public bogofilter |
225 | (package | |
226 | (name "bogofilter") | |
227 | (version "1.2.4") | |
228 | (source (origin | |
229 | (method url-fetch) | |
230 | (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-" | |
231 | version "/bogofilter-" | |
232 | version ".tar.bz2")) | |
233 | (sha256 | |
234 | (base32 | |
235 | "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1")))) | |
236 | (build-system gnu-build-system) | |
237 | (arguments | |
238 | '(#:phases (alist-cons-before | |
239 | 'check 'pre-check | |
240 | (lambda _ | |
241 | (substitute* "src/tests/t.frame" | |
242 | (("GREP=/bin/grep") | |
243 | (string-append "GREP=" (which "grep") "\n")))) | |
244 | %standard-phases))) | |
245 | (native-inputs `(("flex" ,flex))) | |
246 | (inputs `(("bdb" ,bdb))) | |
247 | (home-page "http://bogofilter.sourceforge.net/") | |
248 | (synopsis "Mail classifier based on a Bayesian filter") | |
249 | (description | |
250 | "Bogofilter is a mail filter that classifies mail as spam or ham | |
251 | (non-spam) by a statistical analysis of the message's header and | |
252 | content (body). The program is able to learn from the user's classifications | |
253 | and corrections. It is based on a Bayesian filter.") | |
254 | (license gpl2))) | |
255 | ||
681a6588 | 256 | ;;; mail.scm ends here |