This commit is contained in:
2025-06-09 02:57:52 +02:00
parent 0298eadb9e
commit 86d01dec19

View File

@@ -254,7 +254,7 @@ _instantiate_packages $system +$attrpaths:
if [[ -s "$_JUST_NIX_INSTANTIATE_CACHE/paths/$attrpath.drv" ]]; then
cat "$_JUST_NIX_INSTANTIATE_CACHE/paths/$attrpath.drv"
else
NIXPKGS_ALLOW_UNFREE=1 nix-instantiate . -A "$attrpath" \
NIXPKGS_ALLOW_UNFREE=1 nice -n5 nix-instantiate . -A "$attrpath" \
--system "$system" \
${_JUST_NIX_INSTANTIATE_ARGS:-} \
--add-root "$_JUST_NIX_INSTANTIATE_CACHE/roots/$attrpath.drv" \
@@ -336,7 +336,7 @@ __build_packages $system $outdir +$attrpaths:
# NIXPKGS_ALLOW_UNFREE=1 nix-build "$drvpath" -j0 --option builders "" --option substitute false --out-link "$dst" >&/dev/null
# NIXPKGS_ALLOW_UNFREE=1 nix-build "$drvpath" -j0 --option builders "" --option substitute false --out-link "$gcroot" >&/dev/null
#nix-build "$drvpath" -j0 --option builders "" --option substitute false --out-link "$gcroot" >&/dev/null ||:
nix-build "$inStoreDrvPath" -j0 --option builders "" --option substitute false --out-link "$gcroot" >&/dev/null ||:
nice -n5 nix-build "$inStoreDrvPath" -j0 --option builders "" --option substitute false --out-link "$gcroot" >&/dev/null ||:
if [[ "$drvpath" =~ '!' ]]; then
# :(
gcroot="$gcroot-$(cut -d! -f2 <<<"$drvpath")"
@@ -347,14 +347,14 @@ __build_packages $system $outdir +$attrpaths:
fi
# local outpaths=$( nix-store -q --outputs "$drvpath" ) # doesn't gcroot, some outputs may not be pulled from builders
if [[ -L "$dst" ]]; then
nix log $(readlink "$dst") > "$dst".log 2>/dev/null ||:
# nix log --option substituters "" $(readlink "$dst") > "$dst".log 2>/dev/null ||:
nice -n5 nix log $(readlink "$dst") > "$dst".log 2>/dev/null ||:
# nice -n5 nix log --option substituters "" $(readlink "$dst") > "$dst".log 2>/dev/null ||:
else
if [[ -z "$drvpath" ]]; then
ln -s "$NOTFOUNDDIR"/no-eval "$dst"
else
ln -s /build-failure-"$attrpath" "$dst"
nix log --option substituters "" ".#$attrpath" --system "$system" ${_JUST_NIX_INSTANTIATE_ARGS:-} > "$dst".log 2>/dev/null ||:
nice -n5 nix log --option substituters "" ".#$attrpath" --system "$system" ${_JUST_NIX_INSTANTIATE_ARGS:-} > "$dst".log 2>/dev/null ||:
fi
fi
}