diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-04 19:22:04 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 01:23:06 +0300 |
| commit | 41dd733ca7123c9ac4bfc6c781697a660e95b052 (patch) | |
| tree | 3fc91815ca139ef2e0b281bba0abda4ef15175f4 /vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh | |
| parent | 55c138263e190a1e79d4b997bfb9397306c0ec1f (diff) | |
feat: finish ghostty pane backend integration
Diffstat (limited to 'vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh')
| -rwxr-xr-x | vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh b/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh new file mode 100755 index 00000000..9cc3dce2 --- /dev/null +++ b/vendor/libghostty-vt/nix/build-support/fetch-zig-cache.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# NOTE THIS IS A TEMPORARY SCRIPT TO SUPPORT PACKAGE MAINTAINERS. +# +# A future Zig version will hopefully fix the issue where +# `zig build --fetch` doesn't fetch transitive dependencies[1]. When that +# is resolved, we won't need any special machinery for the general use case +# at all and packagers can just use `zig build --fetch`. +# +# [1]: https://github.com/ziglang/zig/issues/20976 + +if [ -z ${ZIG_GLOBAL_CACHE_DIR+x} ] +then + echo "must set ZIG_GLOBAL_CACHE_DIR!" + exit 1 +fi + +# Go through each line of our build.zig.zon.txt and fetch it. +SCRIPT_PATH="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)" +ZON_TXT_FILE="$SCRIPT_PATH/../../build.zig.zon.txt" +while IFS= read -r url; do + echo "Fetching: $url" + zig fetch "$url" >/dev/null 2>&1 || { + echo "Failed to fetch: $url" >&2 + exit 1 + } +done < "$ZON_TXT_FILE" |
