all-packages: pass cxxStandard to or-tools

main
Phillip Cloud 3 years ago
parent 1a590c529c
commit f506ecdca9
No known key found for this signature in database
GPG Key ID: D908212070FD785E
  1. 2
      pkgs/development/libraries/abseil-cpp/default.nix
  2. 3
      pkgs/development/libraries/grpc/default.nix
  3. 7
      pkgs/top-level/all-packages.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 ];

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

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

Loading…
Cancel
Save