about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix32
-rw-r--r--pkgs/development/libraries/gmime/2.nix (renamed from pkgs/development/libraries/gmime/default.nix)10
-rw-r--r--pkgs/development/libraries/gmime/3.nix27
-rw-r--r--pkgs/top-level/all-packages.nix8
4 files changed, 55 insertions, 22 deletions
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index d9af01bdad41..74e43a728d7f 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/default.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, fixDarwinDylibNames, gdb
+{ fetchurl, stdenv, fixDarwinDylibNames
 , pkgconfig, gnupg
 , xapian, gmime, talloc, zlib
 , doxygen, perl
@@ -6,9 +6,11 @@
 , bash-completion
 , emacs
 , ruby
-, which, dtach, openssl, bash
+, which, dtach, openssl, bash, gdb, man
 }:
 
+with stdenv.lib;
+
 stdenv.mkDerivation rec {
   version = "0.25";
   name = "notmuch-${version}";
@@ -32,19 +34,11 @@ stdenv.mkDerivation rec {
     emacs  # (optional) to byte compile emacs code
     ruby  # (optional) ruby bindings
     which dtach openssl bash  # test dependencies
-    ]
-    ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames
-    ++ stdenv.lib.optional (!stdenv.isDarwin) gdb;
-
-  doCheck = !stdenv.isDarwin;
-  checkTarget = "test";
-
-  patchPhase = ''
-    # XXX: disabling few tests since i have no idea how to make them pass for now
-    rm -f test/T010-help-test.sh \
-          test/T350-crypto.sh \
-          test/T355-smime.sh
+  ]
+  ++ optional stdenv.isDarwin fixDarwinDylibNames
+  ++ optionals (!stdenv.isDarwin) [ gdb man ]; # test dependencies
 
+  postPatch = ''
     find test -type f -exec \
       sed -i \
         -e "1s|#!/usr/bin/env bash|#!${bash}/bin/bash|" \
@@ -65,7 +59,9 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+  makeFlags = "V=1";
+
+  preFixup = optionalString stdenv.isDarwin ''
     set -e
 
     die() {
@@ -92,12 +88,16 @@ stdenv.mkDerivation rec {
     install_name_tool -change "$badname" "$goodname" "$prg"
   '';
 
+  doCheck = !stdenv.isDarwin && (versionAtLeast gmime.version "3.0");
+  checkTarget = "test V=1";
+
   postInstall = ''
     make install-man
   '';
+
   dontGzipMan = true; # already compressed
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "Mail indexer";
     homepage    = https://notmuchmail.org/;
     license     = licenses.gpl3;
diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/2.nix
index a01f3890453c..7d5eeb29997b 100644
--- a/pkgs/development/libraries/gmime/default.nix
+++ b/pkgs/development/libraries/gmime/2.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, pkgconfig, glib, zlib, libgpgerror, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
-  name = "gmime-2.6.23";
+  version = "2.6.23";
+  name = "gmime-${version}";
 
   src = fetchurl {
     url = "mirror://gnome/sources/gmime/2.6/${name}.tar.xz";
@@ -16,10 +17,11 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = https://github.com/jstedfast/gmime/;
     description = "A C/C++ library for creating, editing and parsing MIME messages and structures";
-    maintainers = [ stdenv.lib.maintainers.chaoflow ];
-    platforms = stdenv.lib.platforms.unix;
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ chaoflow ];
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/gmime/3.nix b/pkgs/development/libraries/gmime/3.nix
new file mode 100644
index 000000000000..548772ea6507
--- /dev/null
+++ b/pkgs/development/libraries/gmime/3.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, glib, zlib, gpgme, libidn, gobjectIntrospection }:
+
+stdenv.mkDerivation rec {
+  version = "3.0.1";
+  name = "gmime-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/gmime/3.0/${name}.tar.xz";
+    sha256 = "001y93b8mq9alzkvli6vfh3pzdcn5c5iy206ml23lzhhhvm5k162";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkgconfig gobjectIntrospection ];
+  propagatedBuildInputs = [ glib zlib gpgme libidn ];
+  configureFlags = [ "--enable-introspection=yes" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/jstedfast/gmime/;
+    description = "A C/C++ library for creating, editing and parsing MIME messages and structures";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ chaoflow ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3662baec6081..5bce9224b9dc 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8190,7 +8190,9 @@ with pkgs;
 
   glui = callPackage ../development/libraries/glui {};
 
-  gmime = callPackage ../development/libraries/gmime { };
+  gmime2 = callPackage ../development/libraries/gmime/2.nix { };
+  gmime3 = callPackage ../development/libraries/gmime/3.nix { };
+  gmime = gmime2;
 
   gmm = callPackage ../development/libraries/gmm { };
 
@@ -15585,7 +15587,9 @@ with pkgs;
 
   notepadqq = libsForQt56.callPackage ../applications/editors/notepadqq { };
 
-  notmuch = callPackage ../applications/networking/mailreaders/notmuch { };
+  notmuch = callPackage ../applications/networking/mailreaders/notmuch {
+    gmime = gmime3;
+  };
 
   notmuch-mutt = callPackage ../applications/networking/mailreaders/notmuch/mutt.nix { };