Commit Graph

9 Commits

Author SHA1 Message Date
Jared Baur
e20232eab6 zig: move ZIG_GLOBAL_CACHE_DIR setup to configurePhase
This allows users to put zig in their `mkShell` without ending up with a
ZIG_GLOBAL_CACHE_DIR value set that points back to a location that only
would exist in the sandbox.
2026-02-07 17:32:18 -08:00
Jared Baur
1dfa285940 zig: use setupHook attribute on zig derivation
By moving the zig setup hook to the zig derivation itself, we allow for
zig to splice correctly with `callPackage`, meaning that the correct zig
can be pulled in during builds when zig is in `nativeBuildInputs` (for
example).

This change retains the `zig.hook` attribute for backward compatibility
by just pointing to the zig derivation. This also removes
`zig_default_flags`, since now the setup hook is not a derivation that
can be overridden. Overriding the build flags can now be done by setting
`dontSetZigDefaultFlags = true`.
2026-01-09 14:07:46 -08:00
Tristan Ross
9909b59a10 zig.hook: respect parallelism from nix 2025-09-25 08:27:19 -07:00
Alexandru Tocar
8b64942df0 zig.hook: do not print empty lines in build output 2025-04-21 12:29:06 +02:00
Wolfgang Walther
e3191276d9 zig: improve shellcheck disable comments 2024-08-24 12:23:36 +02:00
Wolfgang Walther
5564042031 zig: support structuredAttrs in setup hook
Tested waylock with and without __structuredAttrs.
2024-08-24 12:23:36 +02:00
Anderson Torres
a49eb940a2 zig: reword setup hook
- Move the huge comment from setup-hook.sh to hook.nix
- Prefix zig in the echoCmd calls
2023-09-09 15:27:11 +00:00
figsoda
6acf0bf645 zigHook: support zig 0.11 2023-08-07 10:25:02 +00:00
Anderson Torres
a85a699e40 zigHook: init
A setup hook for using the Zig compiler in Nixpkgs.

*Warning*: the setup-hook shell script was linted with shellcheck!
2023-08-01 10:08:55 +00:00