mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
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.
This commit is contained in:
parent
fad9faf354
commit
94a94da075
2 changed files with 85 additions and 56 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue