summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders/notmuch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/mailreaders/notmuch/default.nix')
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix31
1 files changed, 19 insertions, 12 deletions
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index 2a95453f7ae..184804a8788 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/default.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -2,42 +2,40 @@
 , pkg-config, gnupg
 , xapian, gmime, talloc, zlib
 , doxygen, perl, texinfo
+, notmuch
 , pythonPackages
 , emacs
 , ruby
+, testVersion
 , which, dtach, openssl, bash, gdb, man
 , withEmacs ? true
+, withRuby ? true
 }:
 
 stdenv.mkDerivation rec {
   pname = "notmuch";
-  version = "0.34.3";
+  version = "0.35";
 
   src = fetchurl {
     url = "https://notmuchmail.org/releases/notmuch-${version}.tar.xz";
-    sha256 = "sha256-P+kQSDv9gVpcO5UOImp7yoFWBT/TLXrR6xoKijrK6Ig=";
+    sha256 = "0fdc81m24xrbhfrhw00g12ak4b8hap4961sq7ap6q2pjqhac8cd8";
   };
 
-  patches = [
-    # https://nmbug.notmuchmail.org/nmweb/show/87o84iza9r.fsf%40starbuck.i-did-not-set--mail-host-address--so-tickle-me
-    ./test-fix-support-for-gpgsm-in-gnupg-2.3.patch
-  ];
-
   nativeBuildInputs = [
     pkg-config
     doxygen                   # (optional) api docs
     pythonPackages.sphinx     # (optional) documentation -> doc/INSTALL
     texinfo                   # (optional) documentation -> doc/INSTALL
     pythonPackages.cffi
-  ] ++ lib.optional withEmacs emacs;
+  ] ++ lib.optional withEmacs emacs
+    ++ lib.optional withRuby ruby;
 
   buildInputs = [
     gnupg                     # undefined dependencies
     xapian gmime talloc zlib  # dependencies described in INSTALL
     perl
     pythonPackages.python
-    ruby
-  ];
+  ] ++ lib.optional withRuby ruby;
 
   postPatch = ''
     patchShebangs configure test/
@@ -56,7 +54,7 @@ stdenv.mkDerivation rec {
     "--infodir=${placeholder "info"}/share/info"
   ] ++ lib.optional (!withEmacs) "--without-emacs"
     ++ lib.optional withEmacs "--emacslispdir=${placeholder "emacs"}/share/emacs/site-lisp"
-    ++ lib.optional (isNull ruby) "--without-ruby";
+    ++ lib.optional (!withRuby) "--without-ruby";
 
   # Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
   # friends
@@ -64,7 +62,9 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
   makeFlags = [ "V=1" ];
 
-  outputs = [ "out" "man" "info" ] ++ lib.optional withEmacs "emacs";
+  outputs = [ "out" "man" "info" ]
+    ++ lib.optional withEmacs "emacs"
+    ++ lib.optional withRuby "ruby";
 
   preCheck = let
     test-database = fetchurl {
@@ -87,10 +87,17 @@ stdenv.mkDerivation rec {
 
   postInstall = lib.optionalString withEmacs ''
     moveToOutput bin/notmuch-emacs-mua $emacs
+  '' + lib.optionalString withRuby ''
+    make -C bindings/ruby install \
+      vendordir=$ruby/lib/ruby \
+      SHELL=$SHELL \
+      $makeFlags "''${makeFlagsArray[@]}" \
+      $installFlags "''${installFlagsArray[@]}"
   '';
 
   passthru = {
     pythonSourceRoot = "notmuch-${version}/bindings/python";
+    tests.version = testVersion { package = notmuch; };
     inherit version;
   };