diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh index 813e85cbf9..7a3dc04c93 100644 --- a/tests/binary-cache.sh +++ b/tests/binary-cache.sh @@ -37,3 +37,11 @@ nix-store --option binary-caches "file://$cacheDir" -r $outPath nix-store --check-validity $outPath nix-store -qR $outPath | grep input-2 + +# Test whether building works if the binary cache contains an +# incomplete closure. +clearStore + +rm $(grep -l "StorePath:.*dependencies-input-2" $cacheDir/*.narinfo) + +nix-build --option binary-caches "file://$cacheDir" dependencies.nix -o $TEST_ROOT/result