anchor.diff:  
       substituteInPlace lib/Makefile.local \
         --replace '-install_name $(libdir)' "-install_name $out/lib"
  -
  +  '' + optionalString withEmacs ''
       substituteInPlace emacs/notmuch-emacs-mua \
         --replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \
         --replace 'EMACSCLIENT:-emacsclient' 'EMACSCLIENT:-${emacs}/bin/emacsclient'
     '';
   
  -  configureFlags = [ "--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions" ];
  +  configureFlags = [
  +    "--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions"
  +    "--infodir=${placeholder "info"}"
  +  ] ++ optional (!withEmacs) "--without-emacs"
  +    ++ optional (isNull ruby) "--without-ruby";
   
     # Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
     # friends
     setOutputFlags = false;
     enableParallelBuilding = true;
     makeFlags = [ "V=1" ];
  +
  +
  +  outputs = [ "out" "man" "info" ];
   
     preCheck = let
       test-database = fetchurl {
  
positive.code: { fetchurl, stdenv
  , pkgconfig, gnupg
  , xapian, gmime, talloc, zlib
  , doxygen, perl
  , pythonPackages
  , bash-completion
  , emacs
  , ruby
  , which, dtach, openssl, bash, gdb, man
  }:
  
  with stdenv.lib;
  
negative.code:   checkTarget = "test";
    checkInputs = [
      which dtach openssl bash
      gdb man emacs
    ];
  
    installTargets = [ "install" "install-man" "install-info" ];
  
    dontGzipMan = true; # already compressed
  
  