From 132528b545cef078776e8b75559bb3dd50ccfed2 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Wed, 30 Jul 2025 09:56:56 -0700 Subject: [PATCH] improve variable names' clarity --- bin/nix-build-and-cache | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/nix-build-and-cache b/bin/nix-build-and-cache index c0969a24..ebfcf4f8 100755 --- a/bin/nix-build-and-cache +++ b/bin/nix-build-and-cache @@ -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