summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-07 17:17:41 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-08 13:28:59 -0500
commitf1481f2c9084d61cb5ebc55d4fa7edbc756128d3 (patch)
tree8bb951474ff5689d9c835b39df7f05086fcc3203 /pkgs
parent6fb526b32c86bb3e5fdf5694e23f2f53d7d892ce (diff)
downloadnixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar.gz
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar.bz2
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar.lz
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar.xz
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.tar.zst
nixpkgs-f1481f2c9084d61cb5ebc55d4fa7edbc756128d3.zip
apple-sdk setup hooks: NIX_CFLAGS_COMPILE may be undefined
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh2
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh2
2 files changed, 2 insertions, 2 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 66e24fe5877..86c241cd0f5 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/security-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh
index ed9bdbd912d..35cea773f98 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
 }