···5656 "-DgRPC_PROTOBUF_PROVIDER=package"
5757 "-DgRPC_ABSL_PROVIDER=package"
5858 "-DBUILD_SHARED_LIBS=ON"
5959- "-DCMAKE_CXX_STANDARD=${passthru.cxxStandard}"
6059 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
6160 "-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
6262- ];
6161+ ]
6262+ # The build scaffold defaults to c++14 on darwin, even when the compiler uses
6363+ # a more recent c++ version by default [1]. However, downgrades are
6464+ # problematic, because the compatibility types in abseil will have different
6565+ # interface definitions than the ones used for building abseil itself.
6666+ # [1] https://github.com/grpc/grpc/blob/v1.57.0/CMakeLists.txt#L239-L243
6767+ ++ (let
6868+ defaultCxxIsOlderThan17 =
6969+ (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.cc.version "16.0")
7070+ || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.cc.version "11.0");
7171+ in lib.optionals (stdenv.hostPlatform.isDarwin && defaultCxxIsOlderThan17)
7272+ [
7373+ "-DCMAKE_CXX_STANDARD=17"
7474+ ]);
63756476 # CMake creates a build directory by default, this conflicts with the
6577 # basel BUILD file on case-insensitive filesystems.
···8092 + lib.optionalString stdenv.isAarch64 "-Wno-error=format-security";
81938294 enableParallelBuilds = true;
8383-8484- passthru.cxxStandard =
8585- let
8686- # Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is
8787- # only an issue with the useLLVM stdenv, not the darwin stdenv…
8888- # https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
8989- useLLVMAndOldCC = (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0";
9090- # With GCC 9 (current aarch64-linux) it fails with c++17 but OK with c++14.
9191- useOldGCC = !(stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "10";
9292- in
9393- (if useLLVMAndOldCC then "11" else if useOldGCC then "14" else "17");
94959596 passthru.tests = {
9697 inherit (python3.pkgs) grpcio-status grpcio-tools;
+1-6
pkgs/top-level/all-packages.nix
···21617216172161821618 grilo-plugins = callPackage ../development/libraries/grilo-plugins { };
21619216192162021620- grpc = callPackage ../development/libraries/grpc {
2162121621- # grpc builds with c++17 so abseil must also be built that way
2162221622- abseil-cpp = abseil-cpp_202206.override {
2162321623- cxxStandard = grpc.cxxStandard;
2162421624- };
2162521625- };
2162021620+ grpc = callPackage ../development/libraries/grpc { };
21626216212162721622 gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { };
2162821623