2024-05-28 16:43:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-04-09 21:13:08 +00:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 10:51:46 +00:00
|
|
|
TODO_NixOS
|
|
|
|
|
2021-04-09 21:13:08 +00:00
|
|
|
clearStore
|
|
|
|
clearCache
|
|
|
|
|
|
|
|
cacheURI="file://$cacheDir?compression=zstd"
|
|
|
|
|
|
|
|
outPath=$(nix-build dependencies.nix --no-out-link)
|
|
|
|
|
|
|
|
nix copy --to $cacheURI $outPath
|
|
|
|
|
|
|
|
HASH=$(nix hash path $outPath)
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
clearCacheCache
|
|
|
|
|
2024-10-08 14:35:53 +00:00
|
|
|
nix copy --from $cacheURI $outPath --no-check-sigs --profile $TEST_ROOT/profile --out-link $TEST_ROOT/result
|
2024-10-08 13:28:49 +00:00
|
|
|
|
|
|
|
[[ -e $TEST_ROOT/profile ]]
|
2024-10-08 14:35:53 +00:00
|
|
|
[[ -e $TEST_ROOT/result ]]
|
2021-04-09 21:13:08 +00:00
|
|
|
|
|
|
|
if ls $cacheDir/nar/*.zst &> /dev/null; then
|
|
|
|
echo "files do exist"
|
|
|
|
else
|
|
|
|
echo "nars do not exist"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
HASH2=$(nix hash path $outPath)
|
|
|
|
|
|
|
|
[[ $HASH = $HASH2 ]]
|