From a9b04037b4adbddf33d41292aab4d9b7122d7e2f Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Fri, 27 Sep 2024 19:19:51 -0500 Subject: [PATCH] nix: don't require the ZIG_LOCAL_CACHE_DIR to be set NixOS does not set this during Nix package builds. Probably Nix's caching got in the way of detecting this on my system. --- fetch-zig-cache.sh | 6 ------ nix/build-support/check-zig-cache-hash.sh | 2 -- 2 files changed, 8 deletions(-) diff --git a/fetch-zig-cache.sh b/fetch-zig-cache.sh index 01b1e2569..56b94e35d 100644 --- a/fetch-zig-cache.sh +++ b/fetch-zig-cache.sh @@ -34,12 +34,6 @@ then exit 1 fi -if [ -z ${ZIG_LOCAL_CACHE_DIR+x} ] -then - echo "must set ZIG_LOCAL_CACHE_DIR!" - exit 1 -fi - zig build --fetch zig fetch git+https://github.com/zigimg/zigimg#3a667bdb3d7f0955a5a51c8468eac83210c1439e zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b diff --git a/nix/build-support/check-zig-cache-hash.sh b/nix/build-support/check-zig-cache-hash.sh index 4ff88e800..ad51af2e4 100755 --- a/nix/build-support/check-zig-cache-hash.sh +++ b/nix/build-support/check-zig-cache-hash.sh @@ -26,9 +26,7 @@ elif [ "$1" != "--update" ]; then fi ZIG_GLOBAL_CACHE_DIR="$(mktemp --directory --suffix nix-zig-cache)" -ZIG_LOCAL_CACHE_DIR="${ZIG_GLOBAL_CACHE_DIR}" export ZIG_GLOBAL_CACHE_DIR -export ZIG_LOCAL_CACHE_DIR # This is not 100% necessary in CI but is helpful when running locally to keep # a local workstation clean.