anchor.diff:    ];
   
     postPatch = ''
  -    patchShebangs configure
  -    patchShebangs test/
  +    patchShebangs configure test/
   
       substituteInPlace lib/Makefile.local \
         --replace '-install_name $(libdir)' "-install_name $out/lib"
  -  '' + optionalString withEmacs ''
  +  '' + lib.optionalString withEmacs ''
       substituteInPlace emacs/notmuch-emacs-mua \
         --replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \
         --replace 'EMACSCLIENT:-emacsclient' 'EMACSCLIENT:-${emacs}/bin/emacsclient'
  
positive.code: 
    dontGzipMan = true; # already compressed
  
    meta = {
      description = "Mail indexer";
      homepage    = "https://notmuchmail.org/";
      license     = licenses.gpl3Plus;
  
negative.code:     mkdir -p test/test-databases
      ln -s ${test-database} test/test-databases/database-v1.tar.xz
    '';
  
    doCheck = !stdenv.hostPlatform.isDarwin && (lib.versionAtLeast gmime.version "3.0.3");
    checkTarget = "test";
    checkInputs = [
      which dtach openssl bash
  