Commit | Line | Data |
---|---|---|
a661e420 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 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) | |
d983a14f | 40 | #:use-module ((guix licenses) |
681a6588 | 41 | #:select (gpl2+ gpl3+ lgpl2.1+ lgpl3+)) |
a661e420 LC |
42 | #:use-module (guix packages) |
43 | #:use-module (guix download) | |
681a6588 MW |
44 | #:use-module (guix build-system gnu) |
45 | #:use-module (srfi srfi-1)) | |
a661e420 LC |
46 | |
47 | (define-public mailutils | |
48 | (package | |
49 | (name "mailutils") | |
50 | (version "2.2") | |
51 | (source (origin | |
52 | (method url-fetch) | |
53 | (uri (string-append "mirror://gnu/mailutils/mailutils-" | |
54 | version ".tar.bz2")) | |
55 | (sha256 | |
56 | (base32 | |
01eafd38 LC |
57 | "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65")) |
58 | (patches (list (search-patch "m4-gets-undeclared.patch"))))) | |
a661e420 LC |
59 | (build-system gnu-build-system) |
60 | (arguments | |
61 | '(;; TODO: Add `--with-sql'. | |
a661e420 LC |
62 | #:phases (alist-cons-before |
63 | 'build 'pre-build | |
64 | (lambda _ | |
65 | ;; Use Guile 2.0's public API. | |
66 | (substitute* "libmu_scm/mu_message.c" | |
67 | (("scm_i_string_length") | |
68 | "scm_c_string_length")) | |
69 | ||
70 | ;; This file should be generated to use the right | |
71 | ;; value of $(libdir) et al. | |
72 | (delete-file "libmu_scm/mailutils.scm") | |
73 | ||
74 | ;; Use the right file name for `cat'. | |
75 | (substitute* "testsuite/lib/mailutils.exp" | |
76 | (("/bin/cat") | |
77 | (which "cat")))) | |
78 | %standard-phases) | |
79 | #:parallel-tests? #f)) | |
80 | (inputs | |
81 | `(("dejagnu" ,dejagnu) | |
82 | ("m4" ,m4) | |
83 | ("texinfo" ,texinfo) | |
84 | ("guile" ,guile-2.0) | |
85 | ("gnutls" ,gnutls) | |
86 | ("ncurses" ,ncurses) | |
87 | ("readline" ,readline) | |
88 | ("linux-pam" ,linux-pam) | |
89 | ("libtool" ,libtool) | |
01eafd38 | 90 | ("gdbm" ,gdbm))) |
a661e420 | 91 | (home-page "http://www.gnu.org/software/mailutils/") |
f50d2669 | 92 | (synopsis "Utilities and library for reading and serving mail") |
a661e420 | 93 | (description |
79c311b8 LC |
94 | "GNU Mailutils is a collection of programs for managing, viewing and |
95 | processing electronic mail. It contains both utilities and server daemons | |
96 | and all operate in a protocol-agnostic way. The underlying libraries are | |
97 | also available, simplifying the addition of mail capabilities to new | |
98 | software.") | |
a661e420 LC |
99 | (license |
100 | ;; Libraries are under LGPLv3+, and programs under GPLv3+. | |
101 | (list gpl3+ lgpl3+)))) | |
d983a14f AE |
102 | |
103 | (define-public fetchmail | |
104 | (package | |
105 | (name "fetchmail") | |
106 | (version "6.3.26") | |
107 | (source (origin | |
108 | (method url-fetch) | |
109 | (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-" | |
110 | version ".tar.xz")) | |
111 | (sha256 | |
112 | (base32 | |
113 | "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r")))) | |
114 | (build-system gnu-build-system) | |
115 | (inputs | |
116 | `(("openssl" ,openssl))) | |
117 | (arguments | |
118 | `(#:configure-flags (list (string-append "--with-ssl=" | |
119 | (assoc-ref %build-inputs "openssl"))))) | |
120 | (home-page "http://fetchmail.berlios.de/") | |
121 | (synopsis "Remote-mailr etrieval and forwarding utility") | |
122 | (description | |
123 | "Fetchmail is a full-featured, robust, well-documented remote-mail | |
124 | retrieval and forwarding utility intended to be used over on-demand | |
125 | TCP/IP links (such as SLIP or PPP connections). It supports every | |
126 | remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, | |
127 | KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 | |
128 | and IPSEC. | |
129 | ||
130 | Fetchmail retrieves mail from remote mail servers and forwards it via SMTP, | |
131 | so it can then be read by normal mail user agents such as mutt, elm | |
132 | or BSD Mail. It allows all your system MTA's filtering, forwarding, and | |
133 | aliasing facilities to work just as they would on normal mail.") | |
134 | (license gpl2+))) ; most files are actually public domain or x11 | |
13f04f48 AE |
135 | |
136 | (define-public mutt | |
137 | (package | |
138 | (name "mutt") | |
139 | (version "1.5.21") | |
140 | (source (origin | |
141 | (method url-fetch) | |
142 | (uri (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-" | |
143 | version ".tar.gz")) | |
144 | (sha256 | |
145 | (base32 | |
146 | "1864cwz240gh0zy56fb47qqzwyf6ghg01037rb4p2kqgimpg6h91")))) | |
147 | (build-system gnu-build-system) | |
148 | (inputs | |
4fd6bf53 | 149 | `(("cyrus-sasl" ,cyrus-sasl) |
524e1df6 | 150 | ("gpgme" ,gpgme) |
4fd6bf53 | 151 | ("ncurses" ,ncurses) |
13f04f48 AE |
152 | ("openssl" ,openssl) |
153 | ("perl" ,perl))) | |
154 | (arguments | |
155 | `(#:configure-flags '("--enable-smtp" | |
156 | "--enable-imap" | |
157 | "--enable-pop" | |
524e1df6 | 158 | "--enable-gpgme" |
13f04f48 | 159 | "--with-ssl" |
4fd6bf53 | 160 | "--with-sasl" |
13f04f48 AE |
161 | ;; so that mutt does not check whether the path |
162 | ;; exists, which it does not in the chroot | |
163 | "--with-mailpath=/var/mail"))) | |
164 | (home-page "http://www.mutt.org/") | |
165 | (synopsis "Mail client") | |
166 | (description | |
167 | "Mutt is a small but very powerful text-based mail client for Unix | |
168 | operating systems.") | |
169 | (license gpl2+))) | |
681a6588 MW |
170 | |
171 | (define-public gmime | |
172 | (package | |
173 | (name "gmime") | |
174 | (version "2.6.19") | |
175 | (source (origin | |
176 | (method url-fetch) | |
75630043 | 177 | (uri (string-append "mirror://gnome/sources/gmime/" |
681a6588 MW |
178 | (string-join (take (string-split version #\.) |
179 | 2) | |
180 | ".") | |
181 | "/gmime-" version ".tar.xz")) | |
182 | (sha256 | |
183 | (base32 | |
184 | "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg")))) | |
185 | (build-system gnu-build-system) | |
186 | (native-inputs | |
187 | `(("pkg-config" ,pkg-config) | |
188 | ("gnupg" ,gnupg))) ; for tests only | |
189 | (inputs `(("glib" ,glib) | |
190 | ("gpgme" ,gpgme) | |
191 | ("zlib" ,zlib))) | |
192 | (arguments | |
193 | `(#:phases | |
194 | (alist-cons-after | |
195 | 'unpack 'patch-paths-in-tests | |
196 | (lambda _ | |
197 | ;; The test programs run several programs using 'system' | |
198 | ;; with hard-coded paths. Here we patch them all. We also | |
199 | ;; change "gpg" to "gpg2". | |
200 | (substitute* (find-files "tests" "\\.c$") | |
201 | (("(system *\\(\")(/[^ ]*)" all pre prog-path) | |
202 | (let* ((base (basename prog-path)) | |
203 | (prog (which (if (string=? base "gpg") "gpg2" base)))) | |
204 | (string-append pre (or prog (error "not found: " base))))))) | |
205 | %standard-phases))) | |
206 | (home-page "http://spruce.sourceforge.net/gmime/") | |
207 | (synopsis "MIME message parser and creator library") | |
208 | (description | |
209 | "GMime provides a core library and set of utilities which may be used for | |
210 | the creation and parsing of messages using the Multipurpose Internet Mail | |
211 | Extension (MIME).") | |
212 | (license (list lgpl2.1+ gpl2+ gpl3+)))) | |
213 | ||
214 | ;;; mail.scm ends here |