2024-05-28 16:43:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-12-29 20:42:14 +00:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 10:51:46 +00:00
|
|
|
TODO_NixOS
|
|
|
|
|
2017-12-29 20:42:14 +00:00
|
|
|
clearStore
|
|
|
|
clearCache
|
|
|
|
|
|
|
|
cacheURI="file://$cacheDir?compression=br"
|
|
|
|
|
|
|
|
outPath=$(nix-build dependencies.nix --no-out-link)
|
|
|
|
|
2024-06-03 20:47:35 +00:00
|
|
|
nix copy --to "$cacheURI" "$outPath"
|
2017-12-29 20:42:14 +00:00
|
|
|
|
2024-06-03 20:47:35 +00:00
|
|
|
HASH=$(nix hash path "$outPath")
|
2017-12-29 20:42:14 +00:00
|
|
|
|
|
|
|
clearStore
|
|
|
|
clearCacheCache
|
|
|
|
|
2024-06-03 20:47:35 +00:00
|
|
|
nix copy --from "$cacheURI" "$outPath" --no-check-sigs
|
2017-12-29 20:42:14 +00:00
|
|
|
|
2024-06-03 20:47:35 +00:00
|
|
|
HASH2=$(nix hash path "$outPath")
|
2017-12-29 20:42:14 +00:00
|
|
|
|
2024-06-03 20:47:35 +00:00
|
|
|
[[ $HASH == "$HASH2" ]]
|