unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add gmime
@ 2014-02-19  4:09 Mark H Weaver
  2014-02-19  9:29 ` Andreas Enge
  0 siblings, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2014-02-19  4:09 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

This adds gmime, another step toward notmuch (mail).

    Mark


[-- Attachment #2: [PATCH] gnu: Add gmime --]
[-- Type: text/x-patch, Size: 3503 bytes --]

From c848b174fc5ab2268f72736fe574a2def50ed095 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
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 bdb3d52..9c6e0c8 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 "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-bin-rm-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
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: Add gmime
  2014-02-19  4:09 [PATCH] gnu: Add gmime Mark H Weaver
@ 2014-02-19  9:29 ` Andreas Enge
  2014-02-19 10:17   ` Mark H Weaver
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Enge @ 2014-02-19  9:29 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Tue, Feb 18, 2014 at 11:09:16PM -0500, Mark H Weaver wrote:
> This adds gmime, another step toward notmuch (mail).
> +  #:use-module (srfi srfi-1))

Is this module needed in the sense that the solution is preferable to what
is done, for instance, to determine the file name of qt?

Andreas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: Add gmime
  2014-02-19  9:29 ` Andreas Enge
@ 2014-02-19 10:17   ` Mark H Weaver
  2014-02-19 10:24     ` Andreas Enge
  2014-02-19 13:41     ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-02-19 10:17 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

> On Tue, Feb 18, 2014 at 11:09:16PM -0500, Mark H Weaver wrote:
>> This adds gmime, another step toward notmuch (mail).
>> +  #:use-module (srfi srfi-1))
>
> Is this module needed in the sense that the solution is preferable to what
> is done, for instance, to determine the file name of qt?

The code in the qt recipe removes everything after (and including) the
last period.  I think that's not as robust, because it fails to properly
handle a version number with more (or less) than 3 components.

srfi-1 is very widely used.  It is certainly already loaded already, so
importing it is a cheap operation.

What do you think?

      Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: Add gmime
  2014-02-19 10:17   ` Mark H Weaver
@ 2014-02-19 10:24     ` Andreas Enge
  2014-02-19 13:41     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Enge @ 2014-02-19 10:24 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Wed, Feb 19, 2014 at 05:17:44AM -0500, Mark H Weaver wrote:
> srfi-1 is very widely used.  It is certainly already loaded already, so
> importing it is a cheap operation.
> 
> What do you think?

I was just asking and am definitely fine with it, if you want to push.

Andreas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gnu: Add gmime
  2014-02-19 10:17   ` Mark H Weaver
  2014-02-19 10:24     ` Andreas Enge
@ 2014-02-19 13:41     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-02-19 13:41 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> Andreas Enge <andreas@enge.fr> writes:
>
>> On Tue, Feb 18, 2014 at 11:09:16PM -0500, Mark H Weaver wrote:
>>> This adds gmime, another step toward notmuch (mail).
>>> +  #:use-module (srfi srfi-1))
>>
>> Is this module needed in the sense that the solution is preferable to what
>> is done, for instance, to determine the file name of qt?
>
> The code in the qt recipe removes everything after (and including) the
> last period.  I think that's not as robust, because it fails to properly
> handle a version number with more (or less) than 3 components.
>
> srfi-1 is very widely used.  It is certainly already loaded already, so
> importing it is a cheap operation.
>
> What do you think?

Fine with me.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-19 13:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19  4:09 [PATCH] gnu: Add gmime Mark H Weaver
2014-02-19  9:29 ` Andreas Enge
2014-02-19 10:17   ` Mark H Weaver
2014-02-19 10:24     ` Andreas Enge
2014-02-19 13:41     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).