Since new macOS versions get adopted quickly,
we only support the latest major macOS version except for the first weeks
after a release, when we also support the previous major version.
We currently support macOS 26.0 and later on ARM64 (Apple silicon).
Requirements
To build a Metal kernel, the following requirements must be met:
Xcode 26.x must be available on the build machine.
xcode-select -p must point to the Xcode 26 installation, typically
/Applications/Xcode.app/Contents/Developer. If this is not the case,
you can set the path with:
sudo xcode-select -s /path/to/Xcode.app/Contents/Developer
The Metal Toolchain must be installed. Starting with macOS 26, this is
a separate download from Xcode. You can install it with:
xcodebuild -downloadComponent MetalToolchain
The Nix sandbox should be set to relaxed, because the Nix derivation
that builds the kernel must have access to Xcode and the Metal Toolchain.
You can verify this by checking that /etc/nix/nix.custom.conf contains
the line:
sandbox = relaxed
If you had to add the line, make sure to restart the Nix daemon:
Build quickly. Here --max-jobs specifies the number of build variant that should be built concurrently and --cores the number of CPU cores that should be used per build variant.
error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it
Add the following line to your Nix configuration file, typically located at ~/.config/nix/nix.conf or /etc/nix/nix.conf
experimental-features = nix-command flakes
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
To fix these warnings, you need to add your username to the trusted-users list in your Nix configuration. This grants you permission to specify additional binary caches (substituters) and keys.
You should add the following line to
echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf
error: build.toml seems to be of an older version, update it with:
nix run github:huggingface/kernel-builder#build2cmake update-build build.toml
PreRequiste:
Xcode 26.x
Install XCode from App Store
xcodebuild failed to load a required plug-in. Ensure your system frameworks are up-to-date by running 'xcodebuild -runFirstLaunch'