1
hermetic_cc_toolchain/.envrc

28 lines
985 B
Plaintext
Raw Normal View History

2022-02-04 11:16:52 +02:00
set -eu
2021-09-07 10:54:33 +03:00
export PATH="$(git rev-parse --show-toplevel)/bin:$PATH"
2021-09-13 09:12:09 +03:00
_u=https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-
2021-09-13 09:12:09 +03:00
#for os in linux darwin; do
# for arch in amd64 arm64; do
# hash=$(direnv fetchurl "${_u}$os-$arch")
# echo -e "$os-$arch\t$hash"
# done
#done
2021-09-07 10:49:39 +03:00
case "$(uname | tr A-Z a-z)-$(uname -m)" in
linux-x86_64)
2021-09-13 09:12:09 +03:00
bzl=$(direnv fetchurl "${_u}linux-amd64" sha256-TLU0xSzdR6YiPUWW1TDnyceFQ4qzsKSf80fpkcIQss0=);;
2021-09-07 10:49:39 +03:00
linux-aarch64)
2021-09-13 09:12:09 +03:00
bzl=$(direnv fetchurl "${_u}linux-arm64" sha256-wd5oYN1PjV4uwnAJe9RtaiEblxoLizhVl4S9BR6pUKE=);;
2021-09-07 10:49:39 +03:00
darwin-x86_64)
2021-09-13 09:12:09 +03:00
bzl=$(direnv fetchurl "${_u}darwin-amd64" sha256-5IW7+EUy0CpgsOsjxwJhC1QI3zoZkIek8rXgmVu/LVo=);;
darwin-arm64)
2021-09-13 09:12:09 +03:00
bzl=$(direnv fetchurl "${_u}darwin-arm64" sha256-wi1IYBRm2dOwQ8zXQFHy9CMPm59FCfCXAXyXMDqojRM=);;
2021-09-06 17:11:11 +03:00
*)
2021-09-07 10:49:39 +03:00
>&2 echo "unsupported architecture tuple $(uname | tr A-Z a-z)-$(uname -m)"
2021-09-06 17:11:11 +03:00
exit 1;;
esac
2021-09-07 10:49:39 +03:00
ln -sf "${bzl}" bin/bazel