improve variable names' clarity

This commit is contained in:
Charles Hall 2025-07-30 09:56:56 -07:00
parent 47c210d5de
commit 132528b545

View file

@ -12,7 +12,7 @@ just() {
# Find all output paths of the installables and their build dependencies
readarray -t derivations < <(nix path-info --derivation "$@")
readarray -t cache < <(
readarray -t upload_paths < <(
xargs \
nix-store --query --requisites --include-outputs \
<<< "${derivations[*]}"
@ -32,13 +32,13 @@ just() {
IFS=$'\n'
nix run --inputs-from . attic#default -- \
push --stdin --no-closure "$ATTIC_SERVER:$ATTIC_CACHE" \
<<< "${cache[*]}"
<<< "${upload_paths[*]}"
)
}
# Build and cache things needed for CI
ci() {
cache=(
installables=(
--inputs-from .
# Keep sorted
@ -49,19 +49,19 @@ ci() {
nixpkgs#nix-direnv
)
just "${cache[@]}"
just "${installables[@]}"
}
# Build and cache all the package outputs
packages() {
readarray -t cache < <(
readarray -t installables < <(
nix flake show --json 2> /dev/null |
nix run --inputs-from . nixpkgs#jq -- \
-r \
'.packages."x86_64-linux" | keys | map(".#" + .) | .[]'
)
just "${cache[@]}"
just "${installables[@]}"
}
pushd "$(git rev-parse --show-toplevel)" > /dev/null