fix(darwin): work around inetutils 2.7 build failure on macOS
gnulib's error.h macros cause compilation errors with newer Clang due to __VA_ARGS__ handling and -Wformat-security. Disable format hardening and suppress -Werror to allow inetutils to build on Darwin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
64ed5ca881
commit
e78750f8cf
1 changed files with 10 additions and 0 deletions
10
overlays/inetutils-darwin-fix/default.nix
Normal file
10
overlays/inetutils-darwin-fix/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
final: prev: {
|
||||||
|
inetutils = prev.inetutils.overrideAttrs (old: {
|
||||||
|
# Fix gnulib variadic macro error on Darwin with newer Clang
|
||||||
|
# The error.h macro __gl_error_call1 has issues with __VA_ARGS__
|
||||||
|
# and -Werror,-Wformat-security causes build failures
|
||||||
|
NIX_CFLAGS_COMPILE = (old.NIX_CFLAGS_COMPILE or "") + " -Wno-error";
|
||||||
|
hardeningDisable = (old.hardeningDisable or [ ]) ++ [ "format" ];
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue