anchor.diff:        ++ optional (versionOlder version "1.1.0")
             (if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
         ++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch
  -      ++ optional
  -           (versionOlder version "1.0.2" && (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")))
  +      ++ optional (versionOlder version "1.0.2" && hostPlatform.isDarwin)
              ./darwin-arch.patch;
   
       outputs = [ "bin" "dev" "out" "man" ];
  
positive.code:       preConfigure=''
          # It's configure does not like --build or --host
          export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}"
          # WINDRES and RANLIB need to be prefixed when cross compiling;
          # the openssl configure script doesn't do that for us
          export WINDRES=${stdenv.cross.config}-windres
          export RANLIB=${stdenv.cross.config}-ranlib
        '';
        configureScript = "./Configure";
      };
  
negative.code: { stdenv, fetchurl, buildPackages, perl
  , hostPlatform
  , withCryptodev ? false, cryptodevHeaders
  , enableSSL2 ? false
  }:
  
  with stdenv.lib;
  
  let
  
    opensslCrossSystem = hostPlatform.openssl.system or
      (throw "openssl needs its platform name cross building");
  
    common = args@{ version, sha256, patches ? [] }: stdenv.mkDerivation rec {
  