···5454 buildInputs = [ openssl protobuf ]5555 ++ lib.optionals stdenv.isLinux [ libnsl ];56565757- cmakeFlags =5858- let5959- # Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is6060- # only an issue with the useLLVM stdenv, not the darwin stdenv…6161- # https://github.com/grpc/grpc/issues/26473#issuecomment-8608854846262- useLLVMAndOldCC = (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0";6363- # With GCC 9 (current aarch64-linux) it fails with c++17 but OK with c++14.6464- useOldGCC = !(stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "10";6565- cxxStandard = if useLLVMAndOldCC then "11" else if useOldGCC then "14" else "17";6666- in6767- [6868- "-DgRPC_ZLIB_PROVIDER=package"6969- "-DgRPC_CARES_PROVIDER=package"7070- "-DgRPC_RE2_PROVIDER=package"7171- "-DgRPC_SSL_PROVIDER=package"7272- "-DgRPC_PROTOBUF_PROVIDER=package"7373- "-DgRPC_ABSL_PROVIDER=package"7474- "-DBUILD_SHARED_LIBS=ON"7575- "-DCMAKE_CXX_STANDARD=${cxxStandard}"7676- ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [7777- "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"7878- ];5757+ cmakeFlags = [5858+ "-DgRPC_ZLIB_PROVIDER=package"5959+ "-DgRPC_CARES_PROVIDER=package"6060+ "-DgRPC_RE2_PROVIDER=package"6161+ "-DgRPC_SSL_PROVIDER=package"6262+ "-DgRPC_PROTOBUF_PROVIDER=package"6363+ "-DgRPC_ABSL_PROVIDER=package"6464+ "-DBUILD_SHARED_LIBS=ON"6565+ "-DCMAKE_CXX_STANDARD=${passthru.cxxStandard}"6666+ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [6767+ "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"6868+ ];79698070 # CMake creates a build directory by default, this conflicts with the8171 # basel BUILD file on case-insensitive filesystems.···8696 + lib.optionalString stdenv.isAarch64 "-Wno-error=format-security";87978898 enableParallelBuilds = true;9999+100100+ passthru.cxxStandard =101101+ let102102+ # Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is103103+ # only an issue with the useLLVM stdenv, not the darwin stdenv…104104+ # https://github.com/grpc/grpc/issues/26473#issuecomment-860885484105105+ useLLVMAndOldCC = (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0";106106+ # With GCC 9 (current aarch64-linux) it fails with c++17 but OK with c++14.107107+ useOldGCC = !(stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "10";108108+ in109109+ (if useLLVMAndOldCC then "11" else if useOldGCC then "14" else "17");8911090111 passthru.tests = {91112 inherit (python3.pkgs) grpcio-status grpcio-tools;
+1-1
pkgs/top-level/all-packages.nix
···1952219522 grpc = callPackage ../development/libraries/grpc {1952319523 # grpc builds with c++17 so abseil must also be built that way1952419524 abseil-cpp = abseil-cpp_202206.override {1952519525- cxxStandard = "17";1952519525+ cxxStandard = grpc.cxxStandard;1952619526 };1952719527 };1952819528