summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2021-04-12 11:40:16 -0400
committerGitHub <noreply@github.com>2021-04-12 11:40:16 -0400
commit82ca81cd62c785b81bf530837c05babcb9cde8a5 (patch)
tree380ceee9ab77bf9c290bc6dba3e797bb65c2d65b /lib
parentfc04b284f765ce658fcfa887dcba0d2eec515ccc (diff)
parent6ee72dd5abf4eab49d6827ad19889c981c9a9eb0 (diff)
downloadnixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar.gz
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar.bz2
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar.lz
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar.xz
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.tar.zst
nixpkgs-82ca81cd62c785b81bf530837c05babcb9cde8a5.zip
Merge pull request #111988 from thefloweringash/darwin-platform-versions
Darwin platform versions
Diffstat (limited to 'lib')
-rw-r--r--lib/systems/default.nix13
-rw-r--r--lib/systems/examples.nix2
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 1e38dbf531b..21b00374da4 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -112,6 +112,19 @@ rec {
         aarch64 = "arm64";
       }.${final.parsed.cpu.name} or final.parsed.cpu.name;
 
+      darwinPlatform =
+        if final.isMacOS then "macos"
+        else if final.isiOS then "ios"
+        else null;
+      # The canonical name for this attribute is darwinSdkVersion, but some
+      # platforms define the old name "sdkVer".
+      darwinSdkVersion = final.sdkVer or "10.12";
+      darwinMinVersion = final.darwinSdkVersion;
+      darwinMinVersionVariable =
+        if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
+        else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
+        else null;
+
       emulator = pkgs: let
         qemu-user = pkgs.qemu.override {
           smartcardSupport = false;
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 8a43b86db70..082be8902bb 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -219,6 +219,7 @@ rec {
     sdkVer = "14.3";
     xcodeVer = "12.3";
     xcodePlatform = "iPhoneSimulator";
+    darwinPlatform = "ios-simulator";
     useiOSPrebuilt = true;
   };
 
@@ -228,6 +229,7 @@ rec {
     sdkVer = "14.3";
     xcodeVer = "12.3";
     xcodePlatform = "iPhoneSimulator";
+    darwinPlatform = "ios-simulator";
     useiOSPrebuilt = true;
   };