anchor.diff:    in ''
       ln -s ${test-database} test/test-databases/database-v1.tar.xz
     '';
  -  doCheck = !stdenv.isDarwin && (versionAtLeast gmime.version "3.0");
  -  checkTarget = "test V=1";
  +  doCheck = !stdenv.hostPlatform.isDarwin && (versionAtLeast gmime.version "3.0");
  +  checkTarget = "test";
  +  checkInputs = [
  +    which dtach openssl bash
  +    gdb man
  +  ];
   
  -  postInstall = ''
  -    make install-man
  -  '';
  +  installTargets = "install install-man";
   
     dontGzipMan = true; # already compressed
   
  
positive.code:     bash-completion  # (optional) dependency to install bash completion
      emacs  # (optional) to byte compile emacs code, also needed for tests
      ruby  # (optional) ruby bindings
      which dtach openssl bash  # test dependencies
    ]
    ++ optional stdenv.isDarwin fixDarwinDylibNames
    ++ optionals (!stdenv.isDarwin) [ gdb man ]; # test dependencies
  
    postPatch = ''
      patchShebangs configure
  
      find test/ -type f -exec \
        sed -i \
          -e "1s|#!/usr/bin/env bash|#!${bash}/bin/bash|" \
          "{}" ";"
  
      for src in \
        util/crypto.c \
  
negative.code: { fetchurl, stdenv
  , pkgconfig, gnupg
  , xapian, gmime, talloc, zlib
  , doxygen, perl
  