diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2020-01-13 17:56:02 +0100 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2020-01-31 21:52:11 +0100 |
commit | 6567823996e216e8bdfd4fbdb4ad3ed92572dbe7 (patch) | |
tree | 2ff90761411b478bc65296299486b61a2e8233bb /pkgs/stdenv | |
parent | a826b49c97bcc9d8365b5d18aeec8087116d195d (diff) |
stdenv: introduce appleSdkVersion and macosVersionMin
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 207502285b2ee..7a9c20fd6a7bb 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -1,6 +1,9 @@ { lib , localSystem, crossSystem, config, overlays, crossOverlays ? [] - +# The version of darwin.apple_sdk used for sources provided by apple. +, appleSdkVersion ? "10.12" +# 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> { @@ -35,8 +38,8 @@ in rec { export SDKROOT= # Ensure consistent LC_VERSION_MIN_MACOSX and remove LC_UUID. - export MACOSX_DEPLOYMENT_TARGET=10.12 - export NIX_LDFLAGS+=" -macosx_version_min 10.12 -sdk_version 10.12 -no_uuid" + export MACOSX_DEPLOYMENT_TARGET=${macosVersionMin} + export NIX_LDFLAGS+=" -macosx_version_min ${macosVersionMin} -sdk_version ${appleSdkVersion} -no_uuid" # Workaround for https://openradar.appspot.com/22671534 on 10.11. export gl_cv_func_getcwd_abort_bug=no @@ -135,8 +138,7 @@ in rec { __extraImpureHostDeps = commonImpureHostDeps; extraAttrs = { - inherit platform; - parent = last; + inherit macosVersionMin appleSdkVersion platform; }; overrides = self: super: (overrides self super) // { fetchurl = thisStdenv.fetchurlBoot; }; }; @@ -405,9 +407,9 @@ in rec { extraBuildInputs = [ pkgs.darwin.CF ]; extraAttrs = { - inherit platform bootstrapTools; - libc = pkgs.darwin.Libsystem; + libc = pkgs.darwin.Libsystem; shellPackage = pkgs.bash; + inherit macosVersionMin appleSdkVersion platform bootstrapTools; }; allowedRequisites = (with pkgs; [ |