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