anchor.diff:  , ruby
   , which, dtach, openssl, bash, gdb, man
   , withEmacs ? true
  +, withRuby ? true
   }:
   
   stdenv.mkDerivation rec {
  
positive.code: 
    postInstall = lib.optionalString withEmacs ''
      moveToOutput bin/notmuch-emacs-mua $emacs
    '';
  
    passthru = {
  
negative.code:     pythonPackages.sphinx     # (optional) documentation -> doc/INSTALL
      texinfo                   # (optional) documentation -> doc/INSTALL
      pythonPackages.cffi
    ] ++ lib.optional withEmacs emacs
      ++ lib.optional withRuby ruby;
  
    buildInputs = [
      gnupg                     # undefined dependencies
      xapian gmime talloc zlib  # dependencies described in INSTALL
      perl
      pythonPackages.python
    ] ++ lib.optional withRuby ruby;
  
    postPatch = ''
      patchShebangs configure test/
  