about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix72
1 files changed, 27 insertions, 45 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix b/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
index 889c03676c10..68ea44122836 100644
--- a/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
+++ b/nixpkgs/pkgs/development/libraries/aws-sdk-cpp/default.nix
@@ -1,18 +1,11 @@
 { lib
 , stdenv
 , fetchFromGitHub
-, fetchpatch
 , cmake
 , curl
 , openssl
-, s2n-tls
 , zlib
 , aws-crt-cpp
-, 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"].
@@ -31,40 +24,36 @@ in
 
 stdenv.mkDerivation rec {
   pname = "aws-sdk-cpp";
-  version = if stdenv.system == "i686-linux" then "1.9.150"
-    else "1.9.238";
+  version = "1.11.37";
 
   src = fetchFromGitHub {
     owner = "aws";
     repo = "aws-sdk-cpp";
     rev = version;
-    sha256 = if version == "1.9.150" then "fgLdXWQKHaCwulrw9KV3vpQ71DjnQAL4heIRW7Rk7UY="
-      else "sha256-pEmsTfZXsvJMV79dGkjDNbUVajwyoYgzE5DCsC53pGY=";
+    sha256 = "sha256-C1PdLNagoIMk9/AAV2Pp7kWcspasJtN9Tx679FnEprc=";
   };
 
+  patches = [
+    ./cmake-dirs.patch
+  ];
+
   postPatch = ''
-    # Missing includes for GCC11
-    sed '5i#include <thread>' -i \
-      aws-cpp-sdk-cloudfront-integration-tests/CloudfrontOperationTest.cpp \
-      aws-cpp-sdk-cognitoidentity-integration-tests/IdentityPoolOperationTest.cpp \
-      aws-cpp-sdk-dynamodb-integration-tests/TableOperationTest.cpp \
-      aws-cpp-sdk-elasticfilesystem-integration-tests/ElasticFileSystemTest.cpp \
-      aws-cpp-sdk-lambda-integration-tests/FunctionTest.cpp \
-      aws-cpp-sdk-mediastore-data-integration-tests/MediaStoreDataTest.cpp \
-      aws-cpp-sdk-queues/source/sqs/SQSQueue.cpp \
-      aws-cpp-sdk-redshift-integration-tests/RedshiftClientTest.cpp \
-      aws-cpp-sdk-s3-crt-integration-tests/BucketAndObjectOperationTest.cpp \
-      aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp \
-      aws-cpp-sdk-s3control-integration-tests/S3ControlTest.cpp \
-      aws-cpp-sdk-sqs-integration-tests/QueueOperationTest.cpp \
-      aws-cpp-sdk-transfer-tests/TransferTests.cpp
+    # Avoid blanket -Werror to evade build failures on less
+    # tested compilers.
+    substituteInPlace cmake/compiler_settings.cmake \
+      --replace '"-Werror"' ' '
+
     # Flaky on Hydra
-    rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AWSClientTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AwsConfigTest.cpp
     # 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 ''
+    rm tests/aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp
     # TestRandomURLMultiThreaded fails
-    rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
+    rm tests/aws-cpp-sdk-core-tests/http/HttpClientTest.cpp
+  '' + lib.optionalString stdenv.isi686 ''
+    # EPSILON is exceeded
+    rm tests/aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp
   '';
 
   # FIXME: might be nice to put different APIs in different outputs
@@ -82,6 +71,8 @@ stdenv.mkDerivation rec {
 
   # propagation is needed for Security.framework to be available when linking
   propagatedBuildInputs = [ aws-crt-cpp ];
+  # Ensure the linker is using atomic when compiling for RISC-V, otherwise fails
+  LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
 
   cmakeFlags = [
     "-DBUILD_DEPS=OFF"
@@ -94,12 +85,10 @@ stdenv.mkDerivation rec {
   ] ++ lib.optional (apis != ["*"])
     "-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
 
-  # fix build with gcc9, can be removed after bumping to current version
-  NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
-
-  # aws-cpp-sdk-core-tests/aws/client/AWSClientTest.cpp
-  # seem to have a datarace
-  enableParallelChecking = false;
+  env.NIX_CFLAGS_COMPILE = toString [
+    # openssl 3 generates several deprecation warnings
+    "-Wno-error=deprecated-declarations"
+  ];
 
   postFixupHooks = [
     # This bodge is necessary so that the file that the generated -config.cmake file
@@ -109,15 +98,6 @@ stdenv.mkDerivation rec {
 
   __darwinAllowLocalNetworking = true;
 
-  patches = [
-    ./cmake-dirs.patch
-  ]
-    ++ lib.optional (lib.versionOlder version "1.9.163")
-      (fetchpatch {
-        url = "https://github.com/aws/aws-sdk-cpp/commit/b102aaf5693c4165c84b616ab9ffb9edfb705239.diff";
-        sha256 = "sha256-38QBo3MEFpyHPb8jZEURRPkoeu4DqWhVeErJayiHKF0=";
-      });
-
   # Builds in 2+h with 2 cores, and ~10m with a big-parallel builder.
   requiredSystemFeatures = [ "big-parallel" ];
 
@@ -127,5 +107,7 @@ stdenv.mkDerivation rec {
     license = licenses.asl20;
     platforms = platforms.unix;
     maintainers = with maintainers; [ eelco orivej ];
+    # building ec2 runs out of memory: cc1plus: out of memory allocating 33554372 bytes after a total of 74424320 bytes
+    broken = stdenv.buildPlatform.is32bit && ((builtins.elem "ec2" apis) || (builtins.elem "*" apis));
   };
 }