diff options
-rw-r--r-- | pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh index b6a129acb19f..f31adaa0d744 100644 --- a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh +++ b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh @@ -1,7 +1,10 @@ noDeprecatedDeclarations() { # Security.framework has about 2000 deprecated constants, all of which the user will be # warned about at compilation time - NIX_CFLAGS_COMPILE+=" -Wno-deprecated-declarations" + flag="-Wno-deprecated-declarations" + if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then + NIX_CFLAGS_COMPILE+=" $flag" + fi } envHooks+=(noDeprecatedDeclarations) |