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: # cgit) that are needed here should be included directly in Nixpkgs as
  # files.
  
  assert http2Support -> nghttp2 != null;
  assert idnSupport -> libidn2 != null;
  assert ldapSupport -> openldap != null;
  assert zlibSupport -> zlib != null;
  assert zstdSupport -> zstd != null;
  assert opensslSupport -> openssl != null;
  assert !(gnutlsSupport && opensslSupport);
  assert !(gnutlsSupport && wolfsslSupport);
  assert !(opensslSupport && wolfsslSupport);
  assert gnutlsSupport -> gnutls != null;
  assert wolfsslSupport -> wolfssl != null;
  assert scpSupport -> libssh2 != null;
  assert c-aresSupport -> c-ares != null;
  assert brotliSupport -> brotli != null;
  assert gsaslSupport -> gsasl != null;
  assert gssSupport -> libkrb5 != null;
  assert rtmpSupport -> rtmpdump !=null;
  assert pslSupport -> libpsl !=null;
  
  stdenv.mkDerivation rec {
    pname = "curl";
  
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 &&
  