aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-02-02 12:41:23 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-02-02 12:41:23 +0100
commit94a94da07513a9290cd857844d28843e3895614b (patch)
treea2a16cd691b653ec1080ea0bad6c179e18cb6b64 /tests
parentfad9faf3545f115e33e522eb11802e2825c8c425 (diff)
Substitute flake inputs
This improves reproducibility and may be faster than fetching from the original source (especially for git/hg inputs, but probably also for github inputs - our binary cache is probably faster than GitHub's dynamically generated tarballs). Unfortunately this doesn't work for the top-level flake since even if we know the NAR hash of the tree, we don't know the other tree attributes such as revCount and lastModified. Fixes #3253.
Diffstat (limited to 'tests')
-rw-r--r--tests/flakes.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh
index 141bb9779..c6f9d78df 100644
--- a/tests/flakes.sh
+++ b/tests/flakes.sh
@@ -235,6 +235,7 @@ mv $registry.tmp $registry
# Test whether flakes are registered as GC roots for offline use.
# FIXME: use tarballs rather than git.
rm -rf $TEST_HOME/.cache
+nix-store --gc # get rid of copies in the store to ensure they get fetched to our git cache
_NIX_FORCE_HTTP=1 nix build -o $TEST_ROOT/result git+file://$flake2Dir#bar
mv $flake1Dir $flake1Dir.tmp
mv $flake2Dir $flake2Dir.tmp