fix attic array
Some checks failed
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Has been cancelled
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 8s
Check Nix formatting / Perform Nix format checks (pull_request) Has been cancelled

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2025-01-26 12:19:08 -05:00
parent c7411635f7
commit 9263ddff59
No known key found for this signature in database
GPG Key ID: 47940175096C1330

View File

@ -8,7 +8,7 @@ set -e
# retrieve all paths under 100M # retrieve all paths under 100M
nix_paths=$(nix path-info --json --all --closure-size \ nix_paths=$(nix path-info --json --all --closure-size \
| jq 'map_values(.closureSize | select(. < 1e8)) | to_entries | sort_by(.value)' \ | jq 'map_values(.closureSize | select(. < 1e8)) | to_entries | sort_by(.value)' \
| jq 'map(.key) | join("\n")' | sed 's/\\n/\n/g') | jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
readarray -t nix_path_array < <(echo "$nix_paths") readarray -t nix_path_array < <(echo "$nix_paths")
@ -18,5 +18,5 @@ for((i=0; i < ${#nix_path_array[@]}; i+=batchsize))
do do
part=( "${nix_path_array[@]:i:batchsize}" ) part=( "${nix_path_array[@]:i:batchsize}" )
attic push "${part[@]}" attic push nix-cache "${part[@]}"
done done