From 681a6588b20eeb665e5cc620a158726f68ea2fdd Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 18 Feb 2014 23:08:04 -0500 Subject: [PATCH] gnu: Add gmime. * gnu/packages/mail.scm (gmime): New variable. --- gnu/packages/mail.scm | 54 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index bdb3d52070..8d67629c6b 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 +;;; Copyright © 2014 Mark H Weaver ;;; ;;; 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 "http://download.gnome.org/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 -- 2.20.1