1
hermetic_cc_toolchain/.envrc
Motiejus Jakštys f053dcc774 update .envrc
2021-09-07 10:49:39 +03:00

23 lines
807 B
Plaintext

export PATH="$(git rev-parse --show-toplevel)/bin:$PATH"
fetch() {
direnv fetchurl "https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-$1-$2" "$3"
}
case "$(uname | tr A-Z a-z)-$(uname -m)" in
linux-x86_64)
bzl=$(fetch linux amd64 sha256-TLU0xSzdR6YiPUWW1TDnyceFQ4qzsKSf80fpkcIQss0=);;
linux-aarch64)
bzl=$(fetch linux arm64 sha256-wd5oYN1PjV4uwnAJe9RtaiEblxoLizhVl4S9BR6pUKE=);;
darwin-x86_64)
bzl=$(fetch darwin arm64 sha256-wi1IYBRm2dOwQ8zXQFHy9CMPm59FCfCXAXyXMDqojRM=);;
darwin-aarch64)
bzl=$(fetch darwin arm64 sha256-5IW7+EUy0CpgsOsjxwJhC1QI3zoZkIek8rXgmVu/LVo=);;
*)
>&2 echo "unsupported architecture tuple $(uname | tr A-Z a-z)-$(uname -m)"
exit 1;;
esac
chmod a+x "${bzl}"
ln -sf "${bzl}" bin/bazel