summary refs log tree commit diff
path: root/gnu/packages/mail.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-02-22 00:27:57 +0100
committerLudovic Courtès <ludo@gnu.org>2014-02-22 00:27:57 +0100
commitb2bfa32d253337a48f3bc0260982cbb945b345a3 (patch)
treea75ae018b5c7608414bf50bd6e55683eb0c44f7a /gnu/packages/mail.scm
parent99662b8dbf420d0112f83b7daddcecfb1bcb9bad (diff)
parent2096ef47aad57a9988c8fdfaa46a70770a0e0b12 (diff)
downloadguix-b2bfa32d253337a48f3bc0260982cbb945b345a3.tar.gz
Merge branch 'master' into core-updates
Conflicts:
	gnu-system.am
Diffstat (limited to 'gnu/packages/mail.scm')
-rw-r--r--gnu/packages/mail.scm54
1 files changed, 52 insertions, 2 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index bdb3d52070..703762eed3 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,11 +34,15 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages pkg-config)
   #:use-module ((guix licenses)
-                #:select (gpl2+ gpl3+ lgpl3+))
+                #:select (gpl2+ gpl3+ lgpl2.1+ lgpl3+))
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (srfi srfi-1))
 
 (define-public mailutils
   (package
@@ -162,3 +167,48 @@ aliasing facilities to work just as they would on normal mail.")
      "Mutt is a small but very powerful text-based mail client for Unix
 operating systems.")
     (license gpl2+)))
+
+(define-public gmime
+  (package
+    (name "gmime")
+    (version "2.6.19")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/gmime/"
+                                  (string-join (take (string-split version #\.)
+                                                     2)
+                                               ".")
+                                  "/gmime-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gnupg" ,gnupg)))               ; for tests only
+    (inputs `(("glib" ,glib)
+              ("gpgme" ,gpgme)
+              ("zlib" ,zlib)))
+    (arguments
+     `(#:phases
+       (alist-cons-after
+        'unpack 'patch-paths-in-tests
+        (lambda _
+          ;; The test programs run several programs using 'system'
+          ;; with hard-coded paths.  Here we patch them all.  We also
+          ;; change "gpg" to "gpg2".
+          (substitute* (find-files "tests" "\\.c$")
+            (("(system *\\(\")(/[^ ]*)" all pre prog-path)
+             (let* ((base (basename prog-path))
+                    (prog (which (if (string=? base "gpg") "gpg2" base))))
+              (string-append pre (or prog (error "not found: " base)))))))
+        %standard-phases)))
+    (home-page "http://spruce.sourceforge.net/gmime/")
+    (synopsis "MIME message parser and creator library")
+    (description
+     "GMime provides a core library and set of utilities which may be used for
+the creation and parsing of messages using the Multipurpose Internet Mail
+Extension (MIME).")
+    (license (list lgpl2.1+ gpl2+ gpl3+))))
+
+;;; mail.scm ends here