about summary refs log tree commit diff
path: root/pkgs/development/compilers/zig/hook.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/zig/hook.nix')
-rw-r--r--pkgs/development/compilers/zig/hook.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/compilers/zig/hook.nix b/pkgs/development/compilers/zig/hook.nix
index 788c432591ee7..0c099a4c0d11c 100644
--- a/pkgs/development/compilers/zig/hook.nix
+++ b/pkgs/development/compilers/zig/hook.nix
@@ -9,6 +9,26 @@ makeSetupHook {
   propagatedBuildInputs = [ zig ];
 
   substitutions = {
+    # This zig_default_flags below is meant to avoid CPU feature impurity in
+    # Nixpkgs. However, this flagset is "unstable": it is specifically meant to
+    # be controlled by the upstream development team - being up to that team
+    # exposing or not that flags to the outside (especially the package manager
+    # teams).
+
+    # Because of this hurdle, @andrewrk from Zig Software Foundation proposed
+    # some solutions for this issue. Hopefully they will be implemented in
+    # future releases of Zig. When this happens, this flagset should be
+    # revisited accordingly.
+
+    # Below are some useful links describing the discovery process of this 'bug'
+    # in Nixpkgs:
+
+    # https://github.com/NixOS/nixpkgs/issues/169461
+    # https://github.com/NixOS/nixpkgs/issues/185644
+    # https://github.com/NixOS/nixpkgs/pull/197046
+    # https://github.com/NixOS/nixpkgs/pull/241741#issuecomment-1624227485
+    # https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653
+
     zig_default_flags =
       let
         releaseType =