Files
nixpkgs/pkgs/by-name/ha/haredo/setup-hook.sh
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

70 lines
1.9 KiB
Bash

haredoBuildPhase() {
runHook preBuild
local buildTargets jobs
read -ra buildTargets <<<"${haredoBuildTargets-}"
echoCmd "haredo build targets" "${buildTargets[@]}"
if [[ ! -v enableParallelBuilding || -n "${enableParallelBuilding-}" ]]; then
jobs="${NIX_BUILD_CORES}"
fi
haredo ${jobs:+"-j${jobs}"} "${buildTargets[@]}"
runHook postBuild
}
haredoCheckPhase() {
runHook preCheck
local checkTargets jobs
if [[ -n "${haredoCheckTargets:-}" ]]; then
read -ra checkTargets <<<"${haredoCheckTargets}"
else
for dofile in "check.do" "test.do"; do
[[ -r "${dofile}" ]] && {
checkTargets=("${dofile%".do"}")
break
}
done
fi
if [[ -z "${checkTargets:-}" ]]; then
printf -- 'haredoCheckPhase ERROR: no check targets were found' 1>&2
exit 1
else
echoCmd "haredo check targets" "${checkTargets[@]}"
if [[ ! -v enableParallelChecking || -n "${enableParallelChecking-}" ]]; then
jobs="${NIX_BUILD_CORES}"
fi
haredo ${jobs:+"-j${jobs}"} "${checkTargets[@]}"
fi
runHook postCheck
}
haredoInstallPhase() {
runHook preInstall
local installTargets jobs
read -ra installTargets <<<"${haredoInstallTargets:-"install"}"
echoCmd "haredo install targets" "${installTargets[@]}"
if [[ ! -v enableParallelInstalling || -n "${enableParallelInstalling-}" ]]; then
jobs="${NIX_BUILD_CORES}"
fi
haredo ${jobs:+"-j${jobs}"} "${installTargets[@]}"
runHook postInstall
}
if [[ -z "${dontUseHaredoBuild-}" && -z "${buildPhase-}" ]]; then
buildPhase="haredoBuildPhase"
fi
if [[ -z "${dontUseHaredoCheck-}" && -z "${checkPhase-}" ]]; then
checkPhase="haredoCheckPhase"
fi
if [[ -z "${dontUseHaredoInstall-}" && -z "${installPhase-}" ]]; then
installPhase="haredoInstallPhase"
fi