anchor.diff:    nativeBuildInputs = [ cmake curl ];
   
     buildInputs = [
  +    aws-crt-cpp
       curl openssl zlib
     ] ++ lib.optionals (stdenv.isDarwin &&
                           ((builtins.elem "text-to-speech" apis) ||
  
positive.code: { lib, stdenv, fetchFromGitHub, cmake, curl, openssl, s2n-tls, zlib
  , aws-c-cal, aws-c-common, aws-c-event-stream, aws-c-io, aws-checksums
  , CoreAudio, AudioToolbox
  , # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
  
negative.code: 
  stdenv.mkDerivation rec {
    pname = "aws-sdk-cpp";
    version = "1.9.121";
  
    src = fetchFromGitHub {
      owner = "awslabs";
      repo = "aws-sdk-cpp";
      rev = version;
      sha256 = "sha256-VQpWauk0tdJ1QU0HmtdTwQdKbiAuTTXXsUo2cqpqmdU=";
    };
  
    postPatch = ''
      # Includes aws-c-auth private headers, so only works with submodule build
      rm aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp
    '' + lib.optionalString stdenv.hostPlatform.isMusl ''
      # TestRandomURLMultiThreaded fails
      rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
    '';
  
    # FIXME: might be nice to put different APIs in different outputs
    # (e.g. libaws-cpp-sdk-s3.so in output "s3").
  