mirror of
https://github.com/izzy2lost/nix.git
synced 2026-03-10 12:35:57 -07:00
- This speeds up macOS builds from 30 minutes to 11 minutes (3x faster). - Also improve error reporting e.g. printing out what actually failed to build. - As a result we also no longer need swap.
7 lines
329 B
Bash
Executable File
7 lines
329 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
system=$(nix eval --raw --impure --expr builtins.currentSystem)
|
|
nix eval --json ".#checks.$system" --apply builtins.attrNames | \
|
|
jq -r '.[]' | \
|
|
xargs -P0 -I '{}' sh -c "nix build -L .#checks.$system.{} || { echo 'FAILED: \033[0;31mnix build -L .#checks.$system.{}\\033[0m'; kill 0; }"
|