anchor.diff:  
     patches = [ ./CVE-2017-7186.patch ];
   
  -  doCheck = with stdenv; !(isCygwin || isFreeBSD);
  +  buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads;
  +
  +  doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform;
       # XXX: test failure on Cygwin
       # we are running out of stack on both freeBSDs on Hydra
   
  
positive.code:     + optionalString (variant != null) ''
      ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib}
    '';
  
    crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") {
      buildInputs = [ windows.mingw_w64_pthreads.crossDrv ];
    };
  
    meta = {
      homepage = "http://www.pcre.org/";
  
negative.code: { stdenv, fetchurl
  , pcre, windows ? null
  , buildPlatform, hostPlatform
  , variant ? null
  }:
  
  with stdenv.lib;
  