grpc: explicitly use the build platform for grpc_cpp_plugin

when cross building grpc use the build platform `grpc_cpp_plugin` to generate the internal protos
This commit is contained in:
Timothy Gallion 2023-11-05 11:31:03 -05:00
parent 4f66b50eb3
commit 465706255f
No known key found for this signature in database
GPG key ID: 5A2DAA31F5457F29

View file

@ -64,6 +64,7 @@ stdenv.mkDerivation rec {
"-DBUILD_SHARED_LIBS=ON"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
"-D_gRPC_CPP_PLUGIN=${buildPackages.grpc}/bin/grpc_cpp_plugin"
]
# The build scaffold defaults to c++14 on darwin, even when the compiler uses
# a more recent c++ version by default [1]. However, downgrades are