diff --git a/.gitignore b/.gitignore index 99f64da..2527486 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ * !/justfile !/.gitignore -!/clean.sh !/.envrc diff --git a/justfile b/justfile index ee4aa31..96dcb31 100644 --- a/justfile +++ b/justfile @@ -135,7 +135,7 @@ instantiate-packages +$attrpaths="": [no-cd] _build_packages $outdir +$attrpaths: - #!/usr/bin/env -S bash -euo pipefail + #!/usr/bin/env -S bash -euo pipefail -x # hint: supports _JUST_NIX_BUILD_ARGS # hint: supports _JUST_NIX_INSTANTIATE_ARGS test -z "${_JUST_NIX_BUILD_ARGS:-}" || echo >&2 "_JUST_NIX_BUILD_ARGS = $_JUST_NIX_BUILD_ARGS" @@ -151,6 +151,7 @@ _build_packages $outdir +$attrpaths: just instantiate-packages "$@" | tee >(command cat >&2) \ | eval xargs nom-build --keep-going --no-out-link ${_JUST_NIX_BUILD_ARGS:-} worker() { + set -x local attrpath="$1" local dst="$outdir/$attrpath" local drvpath=$( just instantiate-packages "$attrpath" ) @@ -160,13 +161,13 @@ _build_packages $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 $(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 ".#$attrpath" ${_JUST_NIX_INSTANTIATE_ARGS:-} > "$dst".log 2>/dev/null || true + nix log ".#$attrpath" ${_JUST_NIX_INSTANTIATE_ARGS:-} > "$dst".log 2>/dev/null ||: fi fi }