about summary refs log tree commit diff
path: root/nixpkgs/pkgs/stdenv/generic/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/stdenv/generic/default.nix')
-rw-r--r--nixpkgs/pkgs/stdenv/generic/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/stdenv/generic/default.nix b/nixpkgs/pkgs/stdenv/generic/default.nix
index 476fab3eed65..cb2b2bc51e9c 100644
--- a/nixpkgs/pkgs/stdenv/generic/default.nix
+++ b/nixpkgs/pkgs/stdenv/generic/default.nix
@@ -106,6 +106,8 @@ let
       '' + lib.optionalString (hostPlatform.isDarwin || (hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.elf && hostPlatform.parsed.kernel.execFormat != lib.systems.parse.execFormats.macho)) ''
         export NIX_DONT_SET_RPATH=1
         export NIX_NO_SELF_RPATH=1
+      '' + lib.optionalString (hostPlatform.isDarwin && hostPlatform.isMacOS) ''
+        export MACOSX_DEPLOYMENT_TARGET=${hostPlatform.darwinMinVersion}
       ''
       # TODO this should be uncommented, but it causes stupid mass rebuilds. I
       # think the best solution would just be to fixup linux RPATHs so we don't
@@ -137,7 +139,7 @@ let
 
       # Utility flags to test the type of platform.
       inherit (hostPlatform)
-        isDarwin isLinux isSunOS isCygwin isFreeBSD isOpenBSD
+        isDarwin isLinux isSunOS isCygwin isBSD isFreeBSD isOpenBSD
         isi686 isx86_32 isx86_64
         is32bit is64bit
         isAarch32 isAarch64 isMips isBigEndian;