Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 85 lines 3.3 kB view raw
1regular@{ 2 lib, 3 boehmgc, 4 aws-sdk-cpp, 5 fetchFromGitHub, 6 pkgs, 7}: 8 9{ 10 scopeFunction = scope: { 11 boehmgc = regular.boehmgc.override { enableLargeConfig = true; }; 12 13 # old nix fails to build with newer aws-sdk-cpp and the patch doesn't apply 14 aws-sdk-cpp-old = 15 (regular.aws-sdk-cpp.override { 16 apis = [ 17 "s3" 18 "transfer" 19 ]; 20 customMemoryManagement = false; 21 }).overrideAttrs 22 (args: rec { 23 # intentionally overriding postPatch 24 version = "1.9.294"; 25 26 src = fetchFromGitHub { 27 owner = "aws"; 28 repo = "aws-sdk-cpp"; 29 rev = version; 30 hash = "sha256-Z1eRKW+8nVD53GkNyYlZjCcT74MqFqqRMeMc33eIQ9g="; 31 }; 32 postPatch = '' 33 # Avoid blanket -Werror to evade build failures on less 34 # tested compilers. 35 substituteInPlace cmake/compiler_settings.cmake \ 36 --replace '"-Werror"' ' ' 37 38 # Missing includes for GCC11 39 sed '5i#include <thread>' -i \ 40 aws-cpp-sdk-cloudfront-integration-tests/CloudfrontOperationTest.cpp \ 41 aws-cpp-sdk-cognitoidentity-integration-tests/IdentityPoolOperationTest.cpp \ 42 aws-cpp-sdk-dynamodb-integration-tests/TableOperationTest.cpp \ 43 aws-cpp-sdk-elasticfilesystem-integration-tests/ElasticFileSystemTest.cpp \ 44 aws-cpp-sdk-lambda-integration-tests/FunctionTest.cpp \ 45 aws-cpp-sdk-mediastore-data-integration-tests/MediaStoreDataTest.cpp \ 46 aws-cpp-sdk-queues/source/sqs/SQSQueue.cpp \ 47 aws-cpp-sdk-redshift-integration-tests/RedshiftClientTest.cpp \ 48 aws-cpp-sdk-s3-crt-integration-tests/BucketAndObjectOperationTest.cpp \ 49 aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp \ 50 aws-cpp-sdk-s3control-integration-tests/S3ControlTest.cpp \ 51 aws-cpp-sdk-sqs-integration-tests/QueueOperationTest.cpp \ 52 aws-cpp-sdk-transfer-tests/TransferTests.cpp 53 # Flaky on Hydra 54 rm aws-cpp-sdk-core-tests/aws/auth/AWSCredentialsProviderTest.cpp 55 # Includes aws-c-auth private headers, so only works with submodule build 56 rm aws-cpp-sdk-core-tests/aws/auth/AWSAuthSignerTest.cpp 57 # TestRandomURLMultiThreaded fails 58 rm aws-cpp-sdk-core-tests/http/HttpClientTest.cpp 59 '' 60 + lib.optionalString aws-sdk-cpp.stdenv.hostPlatform.isi686 '' 61 # EPSILON is exceeded 62 rm aws-cpp-sdk-core-tests/aws/client/AdaptiveRetryStrategyTest.cpp 63 ''; 64 65 patches = (args.patches or [ ]) ++ [ ./patches/aws-sdk-cpp-TransferManager-ContentEncoding.patch ]; 66 67 # only a stripped down version is build which takes a lot less resources to build 68 requiredSystemFeatures = [ ]; 69 }); 70 71 aws-sdk-cpp = 72 (regular.aws-sdk-cpp.override { 73 apis = [ 74 "identity-management" 75 "s3" 76 "transfer" 77 ]; 78 customMemoryManagement = false; 79 }).overrideAttrs 80 { 81 # only a stripped down version is build which takes a lot less resources to build 82 requiredSystemFeatures = [ ]; 83 }; 84 }; 85}