anchor.diff:    '';
   
     configureFlags = [
  +      # Build without manual
  +      "--disable-manual"
         # Disable default CA bundle, use NIX_SSL_CERT_FILE or fallback
         # to nss-cacert from the default profile.
         "--without-ca-bundle"
         "--without-ca-path"
  +      (lib.enableFeature c-aresSupport "ares")
  +      (lib.enableFeature ldapSupport "ldap")
  +      (lib.enableFeature ldapSupport "ldaps")
         # The build fails when using wolfssl with --with-ca-fallback
         (lib.withFeature (!wolfsslSupport) "ca-fallback")
  -      "--disable-manual"
  +      (lib.withFeature rtmpSupport "librtmp")
  +      (lib.withFeature zstdSupport "zstd")
  +      (lib.withFeatureAs brotliSupport "brotli" (lib.getDev brotli))
  +      (lib.withFeatureAs gnutlsSupport "gnutls" (lib.getDev gnutls))
  +      (lib.withFeatureAs idnSupport "libidn2" (lib.getDev libidn2))
         (lib.withFeatureAs opensslSupport "openssl" (lib.getDev openssl))
  -      (lib.withFeatureAs gnutlsSupport "gnutls" (lib.getDev gnutls))
         (lib.withFeatureAs scpSupport "libssh2" (lib.getDev libssh2))
  -      (lib.enableFeature ldapSupport "ldap")
  -      (lib.enableFeature ldapSupport "ldaps")
  -      (lib.withFeatureAs idnSupport "libidn2" (lib.getDev libidn2))
  -      (lib.withFeature zstdSupport "zstd")
  -      (lib.withFeature brotliSupport "brotli")
  -      (lib.withFeature rtmpSupport "librtmp")
  +      (lib.withFeatureAs wolfsslSupport "wolfssl" (lib.getDev wolfssl))
       ]
  -    ++ lib.optional wolfsslSupport "--with-wolfssl=${lib.getDev wolfssl}"
  -    ++ lib.optional c-aresSupport "--enable-ares=${c-ares}"
       ++ lib.optional gssSupport "--with-gssapi=${lib.getDev libkrb5}"
          # For the 'urandom', maybe it should be a cross-system option
       ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
  
positive.code:   # "-lz -lssl", which aren't necessary direct build inputs of
    # applications that use Curl.
    propagatedBuildInputs = with lib;
      optional http2Support nghttp2 ++
      optional idnSupport libidn2 ++
      optional ldapSupport openldap ++
      optional zlibSupport zlib ++
      optional zstdSupport zstd ++
      optional gsaslSupport gsasl ++
      optional gssSupport libkrb5 ++
      optional c-aresSupport c-ares ++
      optional opensslSupport openssl ++
      optional gnutlsSupport gnutls ++
      optional wolfsslSupport wolfssl ++
      optional scpSupport libssh2 ++
      optional brotliSupport brotli ++
      optional rtmpSupport rtmpdump ++
      optional pslSupport libpsl;
  
    # for the second line see https://curl.haxx.se/mail/tracker-2014-03/0087.html
    preConfigure = ''
  
negative.code: { lib, stdenv, fetchurl, pkg-config, perl
  , brotliSupport ? false, brotli ? null
  , c-aresSupport ? false, c-ares ? null
  , gnutlsSupport ? false, gnutls ? null
  , gsaslSupport ? false, gsasl ? null
  , gssSupport ? with stdenv.hostPlatform; (
      !isWindows &&
  