1 { makeSetupHook, zig }:
6 propagatedBuildInputs = [ zig ];
9 # This zig_default_flags below is meant to avoid CPU feature impurity in
10 # Nixpkgs. However, this flagset is "unstable": it is specifically meant to
11 # be controlled by the upstream development team - being up to that team
12 # exposing or not that flags to the outside (especially the package manager
15 # Because of this hurdle, @andrewrk from Zig Software Foundation proposed
16 # some solutions for this issue. Hopefully they will be implemented in
17 # future releases of Zig. When this happens, this flagset should be
18 # revisited accordingly.
20 # Below are some useful links describing the discovery process of this 'bug'
23 # https://github.com/NixOS/nixpkgs/issues/169461
24 # https://github.com/NixOS/nixpkgs/issues/185644
25 # https://github.com/NixOS/nixpkgs/pull/197046
26 # https://github.com/NixOS/nixpkgs/pull/241741#issuecomment-1624227485
27 # https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653
31 "-Doptimize=ReleaseSafe"
40 description = "Setup hook for using the Zig compiler in Nixpkgs";
41 inherit (zig.meta) maintainers platforms broken;