all-packages: pass cxxStandard to or-tools

This commit is contained in:
Phillip Cloud 2021-10-31 06:06:06 -04:00
parent 1a590c529c
commit f506ecdca9
No known key found for this signature in database
GPG key ID: D908212070FD785E
3 changed files with 8 additions and 4 deletions

View file

@ -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 ];

View file

@ -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

View file

@ -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 { };