~motiejus/bazel-zig-cc

bazel-zig-cc/.envrc -rw-r--r-- 997 bytes
f77c2038 — Motiejus Jakštys Update release notes for 0.3.1 14 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
set -euo pipefail

export PATH="$(git rev-parse --show-toplevel)/bin:$PATH"
_u=https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-

#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

case "$(uname | tr A-Z a-z)-$(uname -m)" in
    linux-x86_64)
        bzl=$(direnv fetchurl "${_u}linux-amd64" sha256-TLU0xSzdR6YiPUWW1TDnyceFQ4qzsKSf80fpkcIQss0=);;
    linux-aarch64)
        bzl=$(direnv fetchurl "${_u}linux-arm64" sha256-wd5oYN1PjV4uwnAJe9RtaiEblxoLizhVl4S9BR6pUKE=);;
    darwin-x86_64)
        bzl=$(direnv fetchurl "${_u}darwin-amd64" sha256-5IW7+EUy0CpgsOsjxwJhC1QI3zoZkIek8rXgmVu/LVo=);;
    darwin-aarch64)
        bzl=$(direnv fetchurl "${_u}darwin-arm64" sha256-wi1IYBRm2dOwQ8zXQFHy9CMPm59FCfCXAXyXMDqojRM=);;
    *)
        >&2 echo "unsupported architecture tuple $(uname | tr A-Z a-z)-$(uname -m)"
        exit 1;;
esac

ln -sf "${bzl}" bin/bazel