bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

How to avoid bazel installation?

Open adamjstewart opened this issue 1 year ago • 6 comments

This may come counter to everything this repo stands for, but here it goes anyway...

I'm a developer for the Spack package manager. I'm trying to build a package (tensorstore) which uses bazelisk. However, Spack has a couple constraints that make it difficult to use bazelisk:

  1. We need to be able to build on air-gapped networks, so we can't download things during build-time
  2. We need to use Spack's compiler wrappers, which require environment variables, which bazel purges

Spack has its own bazel recipe, which patches bazel to avoid unsetting these environment variables. However, tensorstore uses bazelisk which downloads and installs its own copy of bazel, so even if I add a dependency on bazel, it's skipped.

Is there a way to tell bazelisk not to do anything and just use a pre-installed bazel from the PATH? Or an env var I can set to tell it to do this? Or is it possible to tell bazel not to unset all env vars?

@tgamblin

adamjstewart avatar Mar 08 '24 15:03 adamjstewart