Merge pull request #198469 from cpcloud/bump-google-cloud-cpp

google-cloud-cpp: 1.38.0 -> 2.4.0
This commit is contained in:
Dmitry Kalinkin 2022-12-08 15:09:57 -05:00 committed by GitHub
commit 388b494f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 36 deletions

View File

@ -205,7 +205,8 @@ stdenv.mkDerivation rec {
] ++ lib.optionals stdenv.isDarwin [
"-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"
++ lib.optional enableS3 "-DAWSSDK_CORE_HEADER_FILE=${aws-sdk-cpp}/include/aws/core/Aws.h";
++ lib.optional enableS3 "-DAWSSDK_CORE_HEADER_FILE=${aws-sdk-cpp}/include/aws/core/Aws.h"
++ lib.optionals enableGcs [ "-DCMAKE_CXX_STANDARD=17" ];
doInstallCheck = true;
ARROW_TEST_DATA = lib.optionalString doInstallCheck "${arrow-testing}/data";

View File

@ -18,37 +18,31 @@
, staticOnly ? stdenv.hostPlatform.isStatic
}:
let
googleapisRev = "d4f3468ef85278428005ed555b3a85db91551ee6";
googleapisRev = "13d5b3f3f9412f38427c8ad48068f04ad1ee9808";
googleapis = fetchFromGitHub {
name = "googleapis-src";
owner = "googleapis";
repo = "googleapis";
rev = googleapisRev;
hash = "sha256-sIQVFQhE3Ae6ia45apzdgtwzglMM4hFZ8efNAhMO5ZY=";
hash = "sha256-SiU7N1EQ/7LWhUwgf4c0CBfUzNGiLe4sSbbJmJF3sao=";
};
excludedTests = builtins.fromTOML (builtins.readFile ./skipped_tests.toml);
in
stdenv.mkDerivation rec {
pname = "google-cloud-cpp";
version = "1.38.0";
version = "2.4.0";
src = fetchFromGitHub {
owner = "googleapis";
repo = "google-cloud-cpp";
rev = "v${version}";
sha256 = "sha256-kobOkohWIDTQaaihhoh/25tZUNv+CjKFwj2xQqO52bA=";
sha256 = "sha256-o8aURM8fvxn0FZjuqJGclq9Brss8LOFZzD0FV2j/lUc=";
};
postPatch = ''
substituteInPlace external/googleapis/CMakeLists.txt \
--replace "https://github.com/googleapis/googleapis/archive/\''${GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" "file://${googleapis}"
# https://github.com/googleapis/google-cloud-cpp/issues/8992
for file in external/googleapis/config.pc.in google/cloud/{,*/}config.pc.in; do
substituteInPlace "$file" \
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_BINDIR@ @CMAKE_INSTALL_FULL_BINDIR@
done
--replace "https://github.com/googleapis/googleapis/archive/\''${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" "file://${googleapis}"
sed -i '/https:\/\/storage.googleapis.com\/cloud-cpp-community-archive\/com_google_googleapis/d' external/googleapis/CMakeLists.txt
'';
nativeBuildInputs = [
@ -123,6 +117,7 @@ stdenv.mkDerivation rec {
# this adds a good chunk of time to the build
"-DBUILD_TESTING:BOOL=ON"
"-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
"-DCMAKE_CXX_STANDARD=17"
] ++ lib.optionals (apis != [ "*" ]) [
"-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
];

View File

@ -13,6 +13,7 @@ whole = [
"bigtable_read_sync_vs_async_benchmark",
"bigtable_scan_throughput_benchmark",
"bigtable_table_sample_rows_integration_test",
"common_grpc_utils_internal_grpc_impersonate_service_account_integration_test",
"iam_iam_credentials_integration_test",
"iam_iam_integration_test",
"logging_quickstart",
@ -48,6 +49,7 @@ whole = [
"storage_curl_request_integration_test",
"storage_curl_resumable_upload_session_integration_test",
"storage_curl_sign_blob_integration_test",
"storage_decompressive_transcoding_integration_test",
"storage_grpc_integration_test",
"storage_key_file_integration_test",
"storage_minimal_iam_credentials_rest_integration_test",
@ -84,13 +86,13 @@ whole = [
"storage_throughput_experiment_test",
"storage_tracing_integration_test",
"storage_unified_credentials_integration_test",
"common_grpc_utils_internal_grpc_impersonate_service_account_integration_test"
]
cases = [
"BackupExtraIntegrationTest.CreateBackupWithExpiredVersionTime",
"BackupExtraIntegrationTest.BackupWithExpiredVersionTime",
"BackupExtraIntegrationTest.BackupWithFutureVersionTime",
"BackupExtraIntegrationTest.CreateBackupWithFutureVersionTime",
"BlockingPublisherIntegrationTest.Basic",
"DatabaseAdminClientTest.CreateWithEncryptionKey",
"DatabaseAdminClientTest.CreateWithNonexistentEncryptionKey",
"DatabaseAdminClientTest.DatabaseBasicCRUD",
@ -98,12 +100,16 @@ cases = [
"DatabaseAdminClientTest.VersionRetentionPeriodCreateFailure",
"DatabaseAdminClientTest.VersionRetentionPeriodUpdate",
"DatabaseAdminClientTest.VersionRetentionPeriodUpdateFailure",
"ErrorParsingIntegrationTest.FailureContainsErrorInfo",
"GrpcServiceAccountIntegrationTest.GetServiceAccount",
"GrpcBucketMetadataIntegrationTest.ObjectMetadataCRUD",
"InstanceAdminClientTest.InstanceConfig",
"InstanceAdminClientTest.InstanceIam",
"InstanceAdminClientTest.InstanceReadOperations",
"LoggingIntegrationTest.ListMonitoredResourceDescriptors",
"LoggingIntegrationTest.WriteLogEntries",
"ObjectFileMultiThreadedTest.Download",
"ObjectReadLargeIntegrationTest.LimitedMemoryGrowth",
"SubscriberIntegrationTest.FireAndForget",
"SubscriberIntegrationTest.PublishOrdered",
"SubscriberIntegrationTest.PublishPullAck",

View File

@ -54,7 +54,15 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl protobuf ]
++ lib.optionals stdenv.isLinux [ libnsl ];
cmakeFlags = [
cmakeFlags =
let
# Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is
# only an issue with the useLLVM stdenv, not the darwin stdenv…
# https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
useLLVMAndOldCC = (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0";
cxxStandard = if useLLVMAndOldCC then "11" else "17";
in
[
"-DgRPC_ZLIB_PROVIDER=package"
"-DgRPC_CARES_PROVIDER=package"
"-DgRPC_RE2_PROVIDER=package"
@ -62,13 +70,9 @@ stdenv.mkDerivation rec {
"-DgRPC_PROTOBUF_PROVIDER=package"
"-DgRPC_ABSL_PROVIDER=package"
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
] ++ lib.optionals ((stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0") [
# Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is
# only an issue with the useLLVM stdenv, not the darwin stdenv…
# https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
"-DCMAKE_CXX_STANDARD=11"
];
# CMake creates a build directory by default, this conflicts with the

View File

@ -7588,9 +7588,7 @@ with pkgs;
google-guest-oslogin = callPackage ../tools/virtualization/google-guest-oslogin { };
google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp {
openssl = openssl_1_1;
};
google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp { };
google-java-format = callPackage ../development/tools/google-java-format { };
@ -19477,9 +19475,9 @@ with pkgs;
grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
grpc = callPackage ../development/libraries/grpc {
# grpc builds with c++14 so abseil must also be built that way
# grpc builds with c++17 so abseil must also be built that way
abseil-cpp = abseil-cpp_202206.override {
cxxStandard = "14";
cxxStandard = "17";
};
};