diff options
author | Andrew Childs <lorne@cons.org.nz> | 2021-02-05 16:24:43 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2021-03-26 15:10:22 +0900 |
commit | 44f09ccabf645d1f079f71b541d7f1ac0a6b8848 (patch) | |
tree | c8be3933ef5fb02a56f31ce5de7705cc33b50a83 /pkgs/stdenv | |
parent | 15151dabaf11bcf4a8b5cc7219f6d3e2435ca13f (diff) | |
download | nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar.gz nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar.bz2 nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar.lz nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar.xz nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.tar.zst nixpkgs-44f09ccabf645d1f079f71b541d7f1ac0a6b8848.zip |
darwin: move deployment target and sdk version to platform config
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 9 | ||||
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index a7b91a82a9d..e8b3ef6c10f 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -1,7 +1,5 @@ { lib , localSystem, crossSystem, config, overlays, crossOverlays ? [] -# Minimum required macOS version, used both for compatibility as well as reproducability. -, macosVersionMin ? "10.12" # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools , bootstrapFiles ? let fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> { @@ -36,8 +34,6 @@ in rec { export NIX_IGNORE_LD_THROUGH_GCC=1 unset SDKROOT - export MACOSX_DEPLOYMENT_TARGET=${macosVersionMin} - # Workaround for https://openradar.appspot.com/22671534 on 10.11. export gl_cv_func_getcwd_abort_bug=no @@ -147,9 +143,6 @@ in rec { __stdenvImpureHostDeps = commonImpureHostDeps; __extraImpureHostDeps = commonImpureHostDeps; - extraAttrs = { - inherit macosVersionMin; - }; overrides = self: super: (overrides self super) // { inherit ccNoLibcxx; fetchurl = thisStdenv.fetchurlBoot; @@ -523,7 +516,7 @@ in rec { extraAttrs = { libc = pkgs.darwin.Libsystem; shellPackage = pkgs.bash; - inherit macosVersionMin bootstrapTools; + inherit bootstrapTools; }; allowedRequisites = (with pkgs; [ diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 476fab3eed6..8ab9d734461 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/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 |