bazel_4: wraps bazel to add default runtime dependencies to PATH

Bazel requires basic runtime dependencies in the PATH for repository rules and genrules. When `which` is missing in particular, it can lead to misleading error messages.
This commit is contained in:
Yves-Stan Le Cornec 2022-06-13 11:35:18 +02:00
parent c01fa626c8
commit 14dcb2c929

View File

@ -591,6 +591,7 @@ stdenv.mkDerivation rec {
# The binary _must_ exist with this naming if your project contains a .bazelversion
# file.
cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel
wrapProgram $out/bin/bazel $wrapperfile --suffix PATH : ${defaultShellPath}
mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch}
mkdir $out/share