hab: Update plan to include protobuf dependency
This is needed to ensure that we can build using the new
compile-time-generated protobufs from the `sup-protocol` and
`butterfly` crates.
@@ -15,7 +15,8 @@ pkg_build_deps=(core/musl
core/libsodium-musl
core/coreutils
core/rust/"$(cat "$SRC_PATH/../../rust-toolchain")"
- core/gcc)
+ core/gcc
+ core/protobuf)
pkg_bin_dirs=(bin)
bin=$_pkg_distname
@@ -80,6 +81,14 @@ do_prepare() {
# package proper--it won't find its way into the final binaries.
export LD_LIBRARY_PATH=$(pkg_path_for gcc)/lib
build_line "Setting LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
+
+ # Prost (our Rust protobuf library) embeds a `protoc` binary, but
+ # it's dynamically linked, which means it won't work in a
+ # Studio. Prost does allow us to override that, though, so we can
+ # just use our Habitat package by setting these two environment
+ # variables.
+ export PROTOC="$(pkg_path_for protobuf)/bin/protoc"
+ export PROTOC_INCLUDE="$(pkg_path_for protobuf)/include"
}
do_build() {
