about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-11-08 15:26:14 -0500
committerGitHub <noreply@github.com>2019-11-08 15:26:14 -0500
commit5132cc822a768ce389ea7dc7d3a016647a356bd2 (patch)
tree19eda59dc41d4d7852660e7580cf0ce3898b7317 /pkgs/os-specific
parentd3cf60344bedc94b7f83528c8059cf19637c1a0a (diff)
parentf7fdc997bf0748a49dea2e0e5451a21da02ee4c1 (diff)
Merge pull request #72812 from NixOS/bash-no-undef-vars
cc-wrapper, bintools-wrapper: Remove now unneeded `set {+,-}u`
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh2
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh2
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
index 66e24fe587701..86c241cd0f568 100644
--- a/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
+++ b/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh
@@ -1,5 +1,5 @@
 linkSystemCoreFoundationFramework() {
-  NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks $NIX_CFLAGS_COMPILE"
+  NIX_CFLAGS_COMPILE="-F@out@/Library/Frameworks${NIX_CFLAGS_COMPILE:+ }${NIX_CFLAGS_COMPILE-}"
   # gross! many symbols (such as _OBJC_CLASS_$_NSArray) are defined in system CF, but not
   # in the opensource release
   # if the package needs private headers, we assume they also want to link with system CF
diff --git a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh
index fbd977f8552d0..a351c39de1307 100644
--- a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh
+++ b/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh
@@ -1,6 +1,6 @@
 addPrivateFrameworks() {
     flag="-F/System/Library/PrivateFrameworks"
-    if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then
+    if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then
         NIX_CFLAGS_COMPILE+=" $flag"
     fi
 }
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 ed9bdbd912db1..35cea773f98b5 100644
--- a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh
+++ b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh
@@ -2,7 +2,7 @@ noDeprecatedDeclarations() {
   # Security.framework has about 2000 deprecated constants, all of which the user will be
   # warned about at compilation time
   flag="-Wno-deprecated-declarations"
-  if [[ "$NIX_CFLAGS_COMPILE" != *$flag* ]]; then
+  if [[ "${NIX_CFLAGS_COMPILE-}" != *$flag* ]]; then
     NIX_CFLAGS_COMPILE+=" $flag"
   fi
 }