mirror of
https://github.com/NixOS/nix
synced 2025-07-16 02:01:59 +02:00
Merge pull request #7721 from yorickvP/post-build-hook
Also pass unwanted outputs to post-build-hook
This commit is contained in:
commit
85ff212051
8 changed files with 53 additions and 30 deletions
|
@ -17,6 +17,10 @@ fi
|
|||
|
||||
# Build the dependencies and push them to the remote store.
|
||||
nix-build -o $TEST_ROOT/result dependencies.nix --post-build-hook "$pushToStore"
|
||||
# See if all outputs are passed to the post-build hook by only specifying one
|
||||
# We're not able to test CA tests this way
|
||||
export BUILD_HOOK_ONLY_OUT_PATHS=$([ ! $NIX_TESTS_CA_BY_DEFAULT ])
|
||||
nix-build -o $TEST_ROOT/result-mult multiple-outputs.nix -A a.first --post-build-hook "$pushToStore"
|
||||
|
||||
clearStore
|
||||
|
||||
|
@ -24,3 +28,4 @@ clearStore
|
|||
# closure of what we've just built.
|
||||
nix copy --from "$REMOTE_STORE" --no-require-sigs -f dependencies.nix
|
||||
nix copy --from "$REMOTE_STORE" --no-require-sigs -f dependencies.nix input1_drv
|
||||
nix copy --from "$REMOTE_STORE" --no-require-sigs -f multiple-outputs.nix a^second
|
||||
|
|
|
@ -7,4 +7,8 @@ set -e
|
|||
[ -n "$DRV_PATH" ]
|
||||
|
||||
echo Pushing "$OUT_PATHS" to "$REMOTE_STORE"
|
||||
printf "%s" "$DRV_PATH" | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
if [ -n "$BUILD_HOOK_ONLY_OUT_PATHS" ]; then
|
||||
printf "%s" "$OUT_PATHS" | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
else
|
||||
printf "%s" "$DRV_PATH" | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
fi
|
||||
|
|
|
@ -7,4 +7,8 @@ set -e
|
|||
[ -n "$DRV_PATH" ]
|
||||
|
||||
echo Pushing "$OUT_PATHS" to "$REMOTE_STORE"
|
||||
printf "%s" "$DRV_PATH"^'*' | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
if [ -n "$BUILD_HOOK_ONLY_OUT_PATHS" ]; then
|
||||
printf "%s" "$OUT_PATHS" | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
else
|
||||
printf "%s" "$DRV_PATH"^'*' | xargs nix copy --to "$REMOTE_STORE" --no-require-sigs
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue