From ce4f1098ca6e49ac335ce9481b794bacbce17947 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 29 Oct 2015 13:55:58 -0700 Subject: [PATCH] reduce security setup hook duplication --- pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 b6a129acb19..f31adaa0d74 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)