Getting started
This page sets up a Linux workstation to build any SVRBC project. You need two things: Nix, which supplies the pinned tools a build runs, and Bazelisk, which runs the version of Bazel that each repository asks for.
Pilot
This setup is being piloted on doreancon.org’s asset pipeline. The open questions are listed under Builds and CI. Remote cache access isn’t available yet.
1. Install Nix
Use the official multi-user (daemon) installer. It needs sudo and asks a few questions, so run it in a real terminal:
sh <(curl -L https://nixos.org/nix/install) --daemonOpen a new terminal afterwards so your shell picks up the Nix profile, then check it:
nix --versionBazel uses Nix only to fetch tools from nixpkgs at the versions a repository pins. You don’t need to learn Nix to build a project.
2. Install Bazelisk as bazel
Bazelisk is a single binary. It reads .bazelversion in the repository you’re in, then downloads and runs that Bazel release. Install it on your PATH under the name bazel:
version=v1.29.0
url=https://github.com/bazelbuild/bazelisk/releases/download/$version/bazelisk-linux-amd64
mkdir -p ~/.local/bin
curl -fsSL -o ~/.local/bin/bazelisk "$url"
echo "$(curl -fsSL "$url.sha256") $HOME/.local/bin/bazelisk" | sha256sum -c -
chmod +x ~/.local/bin/bazelisk
ln -sf bazelisk ~/.local/bin/bazelCheck it. Outside a repository this prints the latest Bazel release. Inside one, it prints the version pinned in .bazelversion:
bazel --version3. Build a project
From the root of any converted repository:
bazel build //... # build everything
bazel test //... # run every testBuild only what you need by naming a target, for example bazel build //hymns:2026/psalm-119-he. Bazel works out what that target depends on and builds only that.
On Ubuntu, Bazel reports processwrapper-sandbox instead of linux-sandbox, because AppArmor restricts the user namespaces the Linux sandbox needs. That’s expected.
Nothing else needs to be installed. If a build seems to need a program from your machine’s PATH, that’s a bug in the build. Report it rather than installing the program.
Next
- Builds and CI: why the setup looks like this, and the rules every repository follows.