aboutsummaryrefslogtreecommitdiff
path: root/scripts/wipedisk
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-18 16:45:07 -0500
committerCraig Jennings <c@cjennings.net>2026-06-18 16:45:07 -0500
commita9a79223b976192ecb6128e7d61bbe4598eb185f (patch)
treeb05645808ad76405e9b13e426aeea2439cccca42 /scripts/wipedisk
parentafcb6f6b55b08633d37c1ec9cca4826bd15be0c2 (diff)
downloadarchsetup-a9a79223b976192ecb6128e7d61bbe4598eb185f.tar.gz
archsetup-a9a79223b976192ecb6128e7d61bbe4598eb185f.zip
feat: pin zig 0.15.2 under /opt for the Emacs ghostel terminal
Arch's rolling repo ships zig 0.16+, but ghostel's native-module compile fallback needs exactly 0.15.2: ghostel pins ghostty 1.3.2-dev, whose build does requireZig(0.15.2), and 0.16's build-API changes break the dependency build scripts. So a plain pacman -S zig produces a zig that can't build ghostel. install_zig_pin downloads zig-x86_64-linux-0.15.2.tar.xz from ziglang.org, verifies the sha256, extracts to /opt/zig-0.15.2, and symlinks /usr/local/bin/zig ahead of /usr/bin on PATH, where pacman -Syu can't bump it. I split the verify-and-install core (zig_install_from_tarball) out so it stays network-free and unit-testable: it refuses on a sha256 mismatch, a missing tarball, or a tree with no zig binary, and short-circuits when a correct install already exists. ghostel's default path downloads a prebuilt module and needs no zig, so this only matters for the offline compile fallback. The pin needs a one-line bump (ZIG_VERSION + ZIG_SHA256) whenever ghostel moves to a newer ghostty. Tests live in tests/zig-pin/: 7 cases covering extract+symlink, idempotency, sha256-mismatch refusal, missing tarball, and no-binary cleanup, run against the real function extracted from the script.
Diffstat (limited to 'scripts/wipedisk')
0 files changed, 0 insertions, 0 deletions