summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorEelco Dolstra2014-07-02 19:52:25 +0200
committerEelco Dolstra2014-07-02 19:52:25 +0200
commitfd1a5d8531dd76097e493db20c6e123ff2cf257c (patch)
tree6f9abc93e0d563a0042cb2c67e81f8c09985e1c1 /pkgs/stdenv
parent289895fe2ceae2ade5aad635018eaeeaeaa669c6 (diff)
Set MACOSX_DEPLOYMENT_TARGET
This variable sets the minimal Mac OS X version required for
running binaries produced by the Darwin toolchain. Since it
defaults to the version of the user's SDK, setting it explicitly
should make our builds more deterministic. It's now set to 10.6
because that's what hydra.nixos.org runs.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/nix/default.nix16
1 files changed, 7 insertions, 9 deletions
diff --git a/pkgs/stdenv/nix/default.nix b/pkgs/stdenv/nix/default.nix
index ba693443b056..cb4c0fd0a61b 100644
--- a/pkgs/stdenv/nix/default.nix
+++ b/pkgs/stdenv/nix/default.nix
@@ -7,16 +7,14 @@ import ../generic rec {
     ''
       export NIX_ENFORCE_PURITY=1
       export NIX_IGNORE_LD_THROUGH_GCC=1
-
-      if [ "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = "x86_64-darwin" ]; then
-        export NIX_ENFORCE_PURITY=
-        export NIX_DONT_SET_RPATH=1
-        export NIX_NO_SELF_RPATH=1
-        dontFixLibtool=1
-        stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
-        xargsFlags=" "
-      fi
     '' + (if stdenv.isDarwin then ''
+      export NIX_ENFORCE_PURITY=
+      export NIX_DONT_SET_RPATH=1
+      export NIX_NO_SELF_RPATH=1
+      dontFixLibtool=1
+      stripAllFlags=" " # the Darwin "strip" command doesn't know "-s"
+      xargsFlags=" "
+      export MACOSX_DEPLOYMENT_TARGET=10.6
       export NIX_CFLAGS_COMPILE+=" --sysroot=/var/empty"
       xcodePath=$(/usr/bin/xcrun --show-sdk-path 2> /dev/null || true)
       export NIX_CFLAGS_COMPILE+=" -idirafter $xcodePath/usr/include -F$xcodePath/System/Library/Frameworks"