|
| 1 | +# Metal kernels 🤘 |
| 2 | + |
| 3 | +Instructions on this page assume that you installed Nix with the |
| 4 | +[Determinate Nix installer](https://docs.determinate.systems/determinate-nix/). |
| 5 | + |
| 6 | +## Targeted macOS versions |
| 7 | + |
| 8 | +Since new macOS versions get [adopted quickly](https://telemetrydeck.com/survey/apple/macOS/versions/), |
| 9 | +we only support the latest major macOS version except for the first weeks |
| 10 | +after a release, when we also support the previous major version. |
| 11 | + |
| 12 | +We currently support macOS 26.0 and later on ARM64 (Apple silicon). |
| 13 | + |
| 14 | +## Requirements |
| 15 | + |
| 16 | +To build a Metal kernel, the following requirements must be met: |
| 17 | + |
| 18 | +- Xcode 26.x must be available on the build machine. |
| 19 | +- `xcode-select -p` must point to the Xcode 26 installation, typically |
| 20 | + `/Applications/Xcode.app/Contents/Developer`. If this is not the case, |
| 21 | + you can set the path with: |
| 22 | + `sudo xcode-select -s /path/to/Xcode.app/Contents/Developer` |
| 23 | +- The Metal Toolchain must be installed. Starting with macOS 26, this is |
| 24 | + a separate download from Xcode. You can install it with: |
| 25 | + `xcodebuild -downloadComponent MetalToolchain` |
| 26 | +- The Nix sandbox should be set to `relaxed`, because the Nix derivation |
| 27 | + that builds the kernel must have access to Xcode and the Metal Toolchain. |
| 28 | + You can verify this by checking that `/etc/nix/nix.custom.conf` contains |
| 29 | + the line: |
| 30 | + |
| 31 | + ``` |
| 32 | + sandbox = relaxed |
| 33 | + ``` |
| 34 | + |
| 35 | + If you had to add the line, make sure to restart the Nix daemon: |
| 36 | + |
| 37 | + ``` |
| 38 | + sudo launchctl kickstart -k system/systems.determinate.nix-daemon |
| 39 | + ``` |
| 40 | + |
| 41 | +You can check these requirements as follows. First, you can check the Xcode |
| 42 | +version as follows: |
| 43 | + |
| 44 | +```bash |
| 45 | +$ xcodebuild -version |
| 46 | +Xcode 26.1 |
| 47 | +Build version 17B55 |
| 48 | +``` |
| 49 | + |
| 50 | +The reported version must be 26.0 or newer. Then you can validate that the |
| 51 | +Metal Toolchain is installed with: |
| 52 | + |
| 53 | +```bash |
| 54 | +$ xcodebuild -showComponent metalToolchain |
| 55 | +Asset Path: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/68d8db6212b48d387d071ff7b905df796658e713.asset/AssetData |
| 56 | +Build Version: 17B54 |
| 57 | +Status: installed |
| 58 | +Toolchain Identifier: com.apple.dt.toolchain.Metal.32023 |
| 59 | +Toolchain Search Path: /private/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.2.54.0.mDxgz0 |
| 60 | +``` |
0 commit comments