mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-11 10:17:25 +00:00
Merge pull request #198469 from cpcloud/bump-google-cloud-cpp
google-cloud-cpp: 1.38.0 -> 2.4.0
This commit is contained in:
commit
388b494f6b
@ -205,7 +205,8 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
"-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
|
"-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
|
||||||
] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"
|
] ++ 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;
|
doInstallCheck = true;
|
||||||
ARROW_TEST_DATA = lib.optionalString doInstallCheck "${arrow-testing}/data";
|
ARROW_TEST_DATA = lib.optionalString doInstallCheck "${arrow-testing}/data";
|
||||||
|
@ -18,37 +18,31 @@
|
|||||||
, staticOnly ? stdenv.hostPlatform.isStatic
|
, staticOnly ? stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
googleapisRev = "d4f3468ef85278428005ed555b3a85db91551ee6";
|
googleapisRev = "13d5b3f3f9412f38427c8ad48068f04ad1ee9808";
|
||||||
googleapis = fetchFromGitHub {
|
googleapis = fetchFromGitHub {
|
||||||
|
name = "googleapis-src";
|
||||||
owner = "googleapis";
|
owner = "googleapis";
|
||||||
repo = "googleapis";
|
repo = "googleapis";
|
||||||
rev = googleapisRev;
|
rev = googleapisRev;
|
||||||
hash = "sha256-sIQVFQhE3Ae6ia45apzdgtwzglMM4hFZ8efNAhMO5ZY=";
|
hash = "sha256-SiU7N1EQ/7LWhUwgf4c0CBfUzNGiLe4sSbbJmJF3sao=";
|
||||||
};
|
};
|
||||||
excludedTests = builtins.fromTOML (builtins.readFile ./skipped_tests.toml);
|
excludedTests = builtins.fromTOML (builtins.readFile ./skipped_tests.toml);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "google-cloud-cpp";
|
pname = "google-cloud-cpp";
|
||||||
version = "1.38.0";
|
version = "2.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "googleapis";
|
owner = "googleapis";
|
||||||
repo = "google-cloud-cpp";
|
repo = "google-cloud-cpp";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-kobOkohWIDTQaaihhoh/25tZUNv+CjKFwj2xQqO52bA=";
|
sha256 = "sha256-o8aURM8fvxn0FZjuqJGclq9Brss8LOFZzD0FV2j/lUc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace external/googleapis/CMakeLists.txt \
|
substituteInPlace external/googleapis/CMakeLists.txt \
|
||||||
--replace "https://github.com/googleapis/googleapis/archive/\''${GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}.tar.gz" "file://${googleapis}"
|
--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
|
||||||
# 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
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -123,6 +117,7 @@ stdenv.mkDerivation rec {
|
|||||||
# this adds a good chunk of time to the build
|
# this adds a good chunk of time to the build
|
||||||
"-DBUILD_TESTING:BOOL=ON"
|
"-DBUILD_TESTING:BOOL=ON"
|
||||||
"-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
|
"-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
|
||||||
|
"-DCMAKE_CXX_STANDARD=17"
|
||||||
] ++ lib.optionals (apis != [ "*" ]) [
|
] ++ lib.optionals (apis != [ "*" ]) [
|
||||||
"-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
|
"-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
|
||||||
];
|
];
|
||||||
|
@ -13,6 +13,7 @@ whole = [
|
|||||||
"bigtable_read_sync_vs_async_benchmark",
|
"bigtable_read_sync_vs_async_benchmark",
|
||||||
"bigtable_scan_throughput_benchmark",
|
"bigtable_scan_throughput_benchmark",
|
||||||
"bigtable_table_sample_rows_integration_test",
|
"bigtable_table_sample_rows_integration_test",
|
||||||
|
"common_grpc_utils_internal_grpc_impersonate_service_account_integration_test",
|
||||||
"iam_iam_credentials_integration_test",
|
"iam_iam_credentials_integration_test",
|
||||||
"iam_iam_integration_test",
|
"iam_iam_integration_test",
|
||||||
"logging_quickstart",
|
"logging_quickstart",
|
||||||
@ -48,6 +49,7 @@ whole = [
|
|||||||
"storage_curl_request_integration_test",
|
"storage_curl_request_integration_test",
|
||||||
"storage_curl_resumable_upload_session_integration_test",
|
"storage_curl_resumable_upload_session_integration_test",
|
||||||
"storage_curl_sign_blob_integration_test",
|
"storage_curl_sign_blob_integration_test",
|
||||||
|
"storage_decompressive_transcoding_integration_test",
|
||||||
"storage_grpc_integration_test",
|
"storage_grpc_integration_test",
|
||||||
"storage_key_file_integration_test",
|
"storage_key_file_integration_test",
|
||||||
"storage_minimal_iam_credentials_rest_integration_test",
|
"storage_minimal_iam_credentials_rest_integration_test",
|
||||||
@ -84,13 +86,13 @@ whole = [
|
|||||||
"storage_throughput_experiment_test",
|
"storage_throughput_experiment_test",
|
||||||
"storage_tracing_integration_test",
|
"storage_tracing_integration_test",
|
||||||
"storage_unified_credentials_integration_test",
|
"storage_unified_credentials_integration_test",
|
||||||
"common_grpc_utils_internal_grpc_impersonate_service_account_integration_test"
|
|
||||||
]
|
]
|
||||||
cases = [
|
cases = [
|
||||||
"BackupExtraIntegrationTest.CreateBackupWithExpiredVersionTime",
|
"BackupExtraIntegrationTest.CreateBackupWithExpiredVersionTime",
|
||||||
"BackupExtraIntegrationTest.BackupWithExpiredVersionTime",
|
"BackupExtraIntegrationTest.BackupWithExpiredVersionTime",
|
||||||
"BackupExtraIntegrationTest.BackupWithFutureVersionTime",
|
"BackupExtraIntegrationTest.BackupWithFutureVersionTime",
|
||||||
"BackupExtraIntegrationTest.CreateBackupWithFutureVersionTime",
|
"BackupExtraIntegrationTest.CreateBackupWithFutureVersionTime",
|
||||||
|
"BlockingPublisherIntegrationTest.Basic",
|
||||||
"DatabaseAdminClientTest.CreateWithEncryptionKey",
|
"DatabaseAdminClientTest.CreateWithEncryptionKey",
|
||||||
"DatabaseAdminClientTest.CreateWithNonexistentEncryptionKey",
|
"DatabaseAdminClientTest.CreateWithNonexistentEncryptionKey",
|
||||||
"DatabaseAdminClientTest.DatabaseBasicCRUD",
|
"DatabaseAdminClientTest.DatabaseBasicCRUD",
|
||||||
@ -98,12 +100,16 @@ cases = [
|
|||||||
"DatabaseAdminClientTest.VersionRetentionPeriodCreateFailure",
|
"DatabaseAdminClientTest.VersionRetentionPeriodCreateFailure",
|
||||||
"DatabaseAdminClientTest.VersionRetentionPeriodUpdate",
|
"DatabaseAdminClientTest.VersionRetentionPeriodUpdate",
|
||||||
"DatabaseAdminClientTest.VersionRetentionPeriodUpdateFailure",
|
"DatabaseAdminClientTest.VersionRetentionPeriodUpdateFailure",
|
||||||
|
"ErrorParsingIntegrationTest.FailureContainsErrorInfo",
|
||||||
|
"GrpcServiceAccountIntegrationTest.GetServiceAccount",
|
||||||
|
"GrpcBucketMetadataIntegrationTest.ObjectMetadataCRUD",
|
||||||
"InstanceAdminClientTest.InstanceConfig",
|
"InstanceAdminClientTest.InstanceConfig",
|
||||||
"InstanceAdminClientTest.InstanceIam",
|
"InstanceAdminClientTest.InstanceIam",
|
||||||
"InstanceAdminClientTest.InstanceReadOperations",
|
"InstanceAdminClientTest.InstanceReadOperations",
|
||||||
"LoggingIntegrationTest.ListMonitoredResourceDescriptors",
|
"LoggingIntegrationTest.ListMonitoredResourceDescriptors",
|
||||||
"LoggingIntegrationTest.WriteLogEntries",
|
"LoggingIntegrationTest.WriteLogEntries",
|
||||||
"ObjectFileMultiThreadedTest.Download",
|
"ObjectFileMultiThreadedTest.Download",
|
||||||
|
"ObjectReadLargeIntegrationTest.LimitedMemoryGrowth",
|
||||||
"SubscriberIntegrationTest.FireAndForget",
|
"SubscriberIntegrationTest.FireAndForget",
|
||||||
"SubscriberIntegrationTest.PublishOrdered",
|
"SubscriberIntegrationTest.PublishOrdered",
|
||||||
"SubscriberIntegrationTest.PublishPullAck",
|
"SubscriberIntegrationTest.PublishPullAck",
|
||||||
|
@ -54,7 +54,15 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ openssl protobuf ]
|
buildInputs = [ openssl protobuf ]
|
||||||
++ lib.optionals stdenv.isLinux [ libnsl ];
|
++ 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_ZLIB_PROVIDER=package"
|
||||||
"-DgRPC_CARES_PROVIDER=package"
|
"-DgRPC_CARES_PROVIDER=package"
|
||||||
"-DgRPC_RE2_PROVIDER=package"
|
"-DgRPC_RE2_PROVIDER=package"
|
||||||
@ -62,13 +70,9 @@ stdenv.mkDerivation rec {
|
|||||||
"-DgRPC_PROTOBUF_PROVIDER=package"
|
"-DgRPC_PROTOBUF_PROVIDER=package"
|
||||||
"-DgRPC_ABSL_PROVIDER=package"
|
"-DgRPC_ABSL_PROVIDER=package"
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
|
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
|
"-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
|
# CMake creates a build directory by default, this conflicts with the
|
||||||
|
@ -7588,9 +7588,7 @@ with pkgs;
|
|||||||
|
|
||||||
google-guest-oslogin = callPackage ../tools/virtualization/google-guest-oslogin { };
|
google-guest-oslogin = callPackage ../tools/virtualization/google-guest-oslogin { };
|
||||||
|
|
||||||
google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp {
|
google-cloud-cpp = callPackage ../development/libraries/google-cloud-cpp { };
|
||||||
openssl = openssl_1_1;
|
|
||||||
};
|
|
||||||
|
|
||||||
google-java-format = callPackage ../development/tools/google-java-format { };
|
google-java-format = callPackage ../development/tools/google-java-format { };
|
||||||
|
|
||||||
@ -19477,9 +19475,9 @@ with pkgs;
|
|||||||
grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
|
grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
|
||||||
|
|
||||||
grpc = callPackage ../development/libraries/grpc {
|
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 {
|
abseil-cpp = abseil-cpp_202206.override {
|
||||||
cxxStandard = "14";
|
cxxStandard = "17";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user