mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Merge pull request #4781 from NixOS/locally_cache_the_remote_realisations
Add a realisations disk cache
This commit is contained in:
commit
7f9759b18d
4 changed files with 148 additions and 3 deletions
|
@ -45,3 +45,16 @@ if [[ -z "$(ls "$REMOTE_STORE_DIR/realisations")" ]]; then
|
|||
echo "Realisations not rebuilt"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test the local realisation disk cache
|
||||
buildDrvs --post-build-hook ../push-to-store.sh
|
||||
clearStore
|
||||
# Add the realisations of rootCA to the cachecache
|
||||
clearCacheCache
|
||||
export _NIX_FORCE_HTTP=1
|
||||
buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0
|
||||
# Try rebuilding, but remove the realisations from the remote cache to force
|
||||
# using the cachecache
|
||||
clearStore
|
||||
rm $REMOTE_STORE_DIR/realisations/*
|
||||
buildDrvs --substitute --substituters $REMOTE_STORE --no-require-sigs -j0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue