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
|
|
|
|
|
|
|
|
nix copy --from $cacheURI $outPath --no-check-sigs
|
|
|
|
|
|
|
|
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 ]]
|