diff --git a/pkgs/development/libraries/abseil-cpp/default.nix b/pkgs/development/libraries/abseil-cpp/default.nix index 4836417aafa2..2ade512de310 100644 --- a/pkgs/development/libraries/abseil-cpp/default.nix +++ b/pkgs/development/libraries/abseil-cpp/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ] ++ lib.optionals (cxxStandard != null) [ - "-DCMAKE_CXX_STANDARD=${toString cxxStandard}" + "-DCMAKE_CXX_STANDARD=${cxxStandard}" ]; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index d155826042c8..8cd26ab31052 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -59,8 +59,7 @@ stdenv.mkDerivation rec { "-DCMAKE_SKIP_BUILD_RPATH=OFF" ] ++ 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") [ + ] ++ 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be13115ad159..171a4c865412 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31181,7 +31181,12 @@ with pkgs; or-tools = callPackage ../development/libraries/science/math/or-tools { python = python3; - abseil-cpp = abseil-cpp.override { static = true; }; + # or-tools builds with -std=c++17, so abseil-cpp must + # also be built that way + abseil-cpp = abseil-cpp.override { + static = true; + cxxStandard = "17"; + }; }; rubiks = callPackage ../development/libraries/science/math/rubiks { };