|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#!/bin/sh |
|
|
|
|
PATH="@binPath@:$PATH" |
|
|
|
|
exec >&2 |
|
|
|
|
[ "${S+x}" = x ] || { printf "Set S to the root location of your source tree\n"; exit 127; } |
|
|
|
|
[ "${NIXREDO_ROOT-x}" != x ] || { printf "Set NIXREDO_ROOT. Set empty to use global nix store\n"; exit 127; } |
|
|
|
@ -28,7 +29,7 @@ out=$(nix -vL --show-trace build ${NIXREDO_ROOT:+--store "$NIXREDO_ROOT"} \
|
|
|
|
|
--option keep-failed true --option keep-outputs true \ |
|
|
|
|
--impure --json --no-link \ |
|
|
|
|
--expr " import @buildernix@ { lib = import @libnix@ {}; root =\"$S\"; filter = [ \"$filter\" \"$f\" ]; } \"$f\"" | |
|
|
|
|
@jq@ -r '.[0].outputs.out') |
|
|
|
|
jq -r '.[0].outputs.out') |
|
|
|
|
[ -n "$out" ] || exit 127 |
|
|
|
|
ln -s "${NIXREDO_ROOT+$NIXREDO_ROOT}$out" "$3" |
|
|
|
|
mv "$3" "$1" |
|
|
|
|