gettext: fix stdenv-darwin; remove Bison dependency (#59553)
Commit 1279016787f72d004c09b1fb562a0f6946bfdc4b broke building
nixpkgs.clangStdenv (stdenv-darwin) on macOS:
nix-build -A clangStdenv .
these derivations will be built:
/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv
building '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv'...
output '/nix/store/3agkxvkbhfpimnx5imr09q4rq9pxmjda-stdenv-darwin' is not allowed to refer to the following paths:
/nix/store/jnzhx3hni0ds1wf49z8wfnxi3qdnkk6q-gnum4-1.4.18
/nix/store/smdncnz5pkl5q39k4ldk8bh84p2hmj19-bison-3.3.2
error: build of '/nix/store/b3vyrfzarzyh51n7fj9wrpw12sq3765l-stdenv-darwin.drv' failed
Remove gettext's build dependency on Bison to avoid this error, fixing
Nixpkgs on macOS.
To avoid rebuilding everything unnecessarily on Linux, only apply these
changes to macOS and keep the Bison dependency for Linux.
(cherry picked from commit 6ccf2201f914929111f5d577534f87ac3439ef80)
cc #59553 #59525