2023-10-15 23:07:14 +03:00
|
|
|
#!/usr/bin/env bash
|
2023-10-19 03:30:52 +03:00
|
|
|
set -euo pipefail
|
|
|
|
|
2023-10-15 23:07:14 +03:00
|
|
|
curSystem=$(nix eval --raw --impure --expr builtins.currentSystem)
|
|
|
|
|
2023-10-19 03:30:52 +03:00
|
|
|
flake='.'
|
|
|
|
if [[ $# -gt 0 && "${1:-}" != '--' ]]; then
|
|
|
|
flake="${1}"
|
|
|
|
shift 1
|
|
|
|
fi
|
|
|
|
|
2023-10-15 23:07:14 +03:00
|
|
|
nixEvalJobsArgs=()
|
2023-10-17 05:56:16 +03:00
|
|
|
while [[ $# -gt 0 ]]; do
|
2023-10-15 23:07:14 +03:00
|
|
|
arg="$1"
|
|
|
|
shift 1
|
|
|
|
|
|
|
|
if [[ "${arg}" == '--' ]]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
|
|
|
|
nixEvalJobsArgs+=("$arg")
|
|
|
|
done
|
|
|
|
|
|
|
|
nix-eval-jobs \
|
|
|
|
--gc-roots-dir gcroot \
|
|
|
|
--check-cache-status \
|
2023-10-19 03:30:52 +03:00
|
|
|
--flake "${flake}#checks.${curSystem}" \
|
2023-10-15 23:07:14 +03:00
|
|
|
"${nixEvalJobsArgs[@]}" \
|
|
|
|
| jq -r 'select(.isCached | not).drvPath as $drvPath | "\($drvPath)^*"' \
|
|
|
|
| xargs --no-run-if-empty nix build --no-link --print-build-logs "$@"
|