anchor.diff:  assert zlibSupport -> zlib != null;
   assert zstdSupport -> zstd != null;
   
  -stdenv.mkDerivation rec {
  +stdenv.mkDerivation (finalAttrs: {
     pname = "curl";
     version = "7.83.1";
   
     src = fetchurl {
       urls = [
  -      "https://curl.haxx.se/download/${pname}-${version}.tar.bz2"
  -      "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2"
  +      "https://curl.haxx.se/download/curl-${finalAttrs.version}.tar.bz2"
  +      "https://github.com/curl/curl/releases/download/curl-${finalAttrs.version}/curl-${finalAttrs.version}.tar.bz2"
       ];
       sha256 = "sha256-9Tmjb7RKgmDsXZd+Tg290u7intkPztqpvDyfeKETv/A=";
     };
  
positive.code:     # Fails to link against static brotli or gss
      broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport);
    };
  }
  
negative.code:     ln $out/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libcurl-gnutls${stdenv.hostPlatform.extensions.sharedLibrary}.4.4.0
    '';
  
    passthru = let
      useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; };
    in {
      inherit opensslSupport openssl;
      tests = {
        curlpp = useThisCurl curlpp;
        coeurl = useThisCurl coeurl;
        haskell-curl = useThisCurl haskellPackages.curl;
        ocaml-curly = useThisCurl ocamlPackages.curly;
        pycurl = useThisCurl python3.pkgs.pycurl;
        php-curl = useThisCurl phpExtensions.curl;
        # error: attribute 'override' missing
        # Additional checking with support http3 protocol.
        # nginx-http3 = useThisCurl nixosTests.nginx-http3;
        nginx-http3 = nixosTests.nginx-http3;
      };
    };
  
  