Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple_sdks: init with 11.1, 11.3, 12.1, 12.3, 13.1, and 13.3 #229210

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/stdenv/platform-notes.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ Some common issues when packaging software for Darwin:
The package `xcbuild` can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible with Xcode and can occasionally cause issues.

- x86_64-darwin uses the 10.12 SDK by default, but some software is not compatible with that version of the SDK. In that case,
the 11.0 SDK used by aarch64-darwin is available for use on x86_64-darwin. To use it, reference `apple_sdk_11_0` instead of
`apple_sdk` in your derivation and use `pkgs.darwin.apple_sdk_11_0.callPackage` instead of `pkgs.callPackage`. On Linux, this will
have the same effect as `pkgs.callPackage`, so you can use `pkgs.darwin.apple_sdk_11_0.callPackage` regardless of platform.
the 11.1 SDK used by aarch64-darwin is available for use on x86_64-darwin. To use it, reference `apple_sdk_11_1` instead of
`apple_sdk` in your derivation and use `pkgs.darwin.apple_sdk_11_1.callPackage` instead of `pkgs.callPackage`. On Linux, this will
have the same effect as `pkgs.callPackage`, so you can use `pkgs.darwin.apple_sdk_11_1.callPackage` regardless of platform.
2 changes: 1 addition & 1 deletion lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ rec {
else null;
# The canonical name for this attribute is darwinSdkVersion, but some
# platforms define the old name "sdkVer".
darwinSdkVersion = final.sdkVer or (if final.isAarch64 then "11.0" else "10.12");
darwinSdkVersion = final.sdkVer or (if final.isAarch64 then "11.1" else "10.12");
darwinMinVersion = final.darwinSdkVersion;
darwinMinVersionVariable =
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/audio/audacity/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace libraries/lib-files/FileNames.cpp \
--replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11.0") ''
'' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinMinVersion "11.1") ''
sed -z -i "s/NSAppearanceName.*systemAppearance//" src/AudacityApp.mm
'';

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/blockchains/solana/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ let
sha256 = "sha256-pYbnEF8MgF7fCBf/MOPT//UCeOQj9tuIkDj8UIVFz3E=";
cargoSha256 = "sha256-n9nuBiKV3FCgq5fJ5BuqIIAp1yZ6IO+zHjrMaUBfgzs=";

inherit (darwin.apple_sdk_11_0) Libsystem;
inherit (darwin.apple_sdk_11_0.frameworks) System IOKit AppKit Security;
inherit (darwin.apple_sdk_11_1) Libsystem;
inherit (darwin.apple_sdk_11_1.frameworks) System IOKit AppKit Security;
in
rustPlatform.buildRustPackage rec {
pname = "solana-cli";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/emulators/bsnes/ares/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}:

let
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL;
inherit (darwin.apple_sdk_11_1.frameworks) Cocoa OpenAL;
in
stdenv.mkDerivation (finalAttrs: {
pname = "ares";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/emulators/bsnes/bsnes-hd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}:

let
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL;
inherit (darwin.apple_sdk_11_1.frameworks) Cocoa OpenAL;
in
stdenv.mkDerivation {
pname = "bsnes-hd";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/inlyne/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rustPlatform.buildRustPackage rec {
xorg.libxcb
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.AppKit
darwin.apple_sdk_11_1.frameworks.AppKit
];

postInstall = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/process-viewer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];

buildInputs = [ gtk4 ] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Foundation
darwin.apple_sdk_11_1.frameworks.Foundation
];

postInstall = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/xmrig/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}:

let
inherit (darwin.apple_sdk_11_0.frameworks) Carbon CoreServices OpenCL;
inherit (darwin.apple_sdk_11_1.frameworks) Carbon CoreServices OpenCL;
in
stdenv.mkDerivation rec {
pname = "xmrig";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/xmrig/proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}:

let
inherit (darwin.apple_sdk_11_0.frameworks) CoreServices IOKit;
inherit (darwin.apple_sdk_11_1.frameworks) CoreServices IOKit;
in
stdenv.mkDerivation rec {
pname = "xmrig-proxy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, darwin, fetchFromGitHub, openssl, sqlite }:

(if stdenv.isDarwin then darwin.apple_sdk_11_0.clang14Stdenv else stdenv).mkDerivation rec {
(if stdenv.isDarwin then darwin.apple_sdk_11_1.clang14Stdenv else stdenv).mkDerivation rec {
pname = "signalbackup-tools";
version = "20230523";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/video/mpv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}:

let
inherit (darwin.apple_sdk_11_0.frameworks)
inherit (darwin.apple_sdk_11_1.frameworks)
AVFoundation CoreFoundation CoreMedia Cocoa CoreAudio MediaPlayer Accelerate;
luaEnv = lua.withPackages (ps: with ps; [ luasocket ]);
in stdenv.mkDerivation (finalAttrs: {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/hvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec {
];

buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.IOKit
darwin.apple_sdk_11_1.frameworks.IOKit
];

# tests are broken
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/kind2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-KzoEh/kMKsHx9K3t1/uQZ7fdsZEM+v8UOft8JjEB1Zw=";

buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Security
darwin.apple_sdk_11_1.frameworks.Security
];

postPatch =
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/compilers/lobster/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ lib, stdenv
, fetchFromGitHub
, unstableGitUpdater
, cmake
, callPackage

Expand All @@ -8,7 +9,7 @@
, xorg

# Darwin deps
, CoreFoundation
, cf-private
, Cocoa
, AudioToolbox
, OpenGL
Expand All @@ -30,7 +31,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = if stdenv.isDarwin
then [
CoreFoundation
cf-private
Cocoa
AudioToolbox
OpenGL
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/swift/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let

# Current versions of Swift on Darwin require macOS SDK 10.15 at least.
# Re-export this so we can rely on the minimum Swift SDK elsewhere.
apple_sdk = pkgs.darwin.apple_sdk_11_0;
apple_sdk = pkgs.darwin.apple_sdk_11_1;

# Swift builds its own Clang for internal use. We wrap that clang with a
# cc-wrapper derived from the clang configured below. Because cc-wrapper
Expand All @@ -33,7 +33,7 @@ let

# Overrides that create a useful environment for swift packages, allowing
# packaging with `swiftPackages.callPackage`. These are similar to
# `apple_sdk_11_0.callPackage`, with our clang on top.
# `apple_sdk_11_1.callPackage`, with our clang on top.
inherit (clang) bintools;
stdenv = overrideCC pkgs.stdenv clang;
darwin = pkgs.darwin.overrideScope (_: prev: {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/swift/xctest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ in stdenv.mkDerivation {
'';

preConfigure = ''
# On aarch64-darwin, our minimum target is 11.0, but we can target lower,
# On aarch64-darwin, our minimum target is 11.1, but we can target lower,
# and some dependants require a lower target. Harmless on non-Darwin.
export MACOSX_DEPLOYMENT_TARGET=10.12
'';
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/interpreters/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ in {
inherit passthruFun;
};

rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
rustpython = darwin.apple_sdk_11_1.callPackage ./rustpython/default.nix {
inherit (darwin.apple_sdk_11_1.frameworks) SystemConfiguration;
};

})
2 changes: 1 addition & 1 deletion pkgs/development/libraries/arrayfire/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
] ++ lib.optionals buildDocs [
doxygen
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Accelerate
darwin.apple_sdk_11_1.frameworks.Accelerate
];

meta = with lib; {
Expand Down
22 changes: 11 additions & 11 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -233,22 +233,22 @@ let
inherit bison cups harfbuzz libGL;
withGtk3 = !stdenv.isDarwin; inherit dconf gtk3;
inherit developerBuild decryptSslTraffic;
inherit (darwin.apple_sdk_11_0.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
inherit (darwin.apple_sdk_11_1.frameworks) AGL AppKit ApplicationServices AVFoundation Carbon Cocoa CoreAudio CoreBluetooth
CoreLocation CoreServices DiskArbitration Foundation OpenGL MetalKit IOKit;
libobjc = darwin.apple_sdk_11_0.objc4;
xcbuild = darwin.apple_sdk_11_0.xcodebuild;
libobjc = darwin.apple_sdk_11_1.objc4;
xcbuild = darwin.apple_sdk_11_1.xcodebuild;
};

qt3d = callPackage ../modules/qt3d.nix {};
qtcharts = callPackage ../modules/qtcharts.nix {};
qtconnectivity = callPackage ../modules/qtconnectivity.nix {
inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth;
inherit (darwin.apple_sdk_11_1.frameworks) IOBluetooth;
};
qtdatavis3d = callPackage ../modules/qtdatavis3d.nix {};
qtdeclarative = callPackage ../modules/qtdeclarative.nix {};
qtdoc = callPackage ../modules/qtdoc.nix {};
qtgamepad = callPackage ../modules/qtgamepad.nix {
inherit (darwin.apple_sdk_11_0.frameworks) GameController;
inherit (darwin.apple_sdk_11_1.frameworks) GameController;
};
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
qtimageformats = callPackage ../modules/qtimageformats.nix {};
Expand Down Expand Up @@ -286,21 +286,21 @@ let
cp -r ${srcs.catapult} src/3rdparty/chromium/third_party/catapult
'';
inherit (darwin) cctools xnu;
inherit (darwin.apple_sdk_11_0) libpm libunwind;
inherit (darwin.apple_sdk_11_0.libs) sandbox;
inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit
inherit (darwin.apple_sdk_11_1) libpm libunwind;
inherit (darwin.apple_sdk_11_1.libs) sandbox;
inherit (darwin.apple_sdk_11_1.frameworks) ApplicationServices AVFoundation Foundation ForceFeedback GameController AppKit
ImageCaptureCore CoreBluetooth IOBluetooth CoreWLAN Quartz Cocoa LocalAuthentication
MediaPlayer MediaAccessibility SecurityInterface Vision CoreML OpenDirectory Accelerate;
libobjc = darwin.apple_sdk_11_0.objc4;
libobjc = darwin.apple_sdk_11_1.objc4;
};
qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {};
qtwebkit = callPackage ../modules/qtwebkit.nix {
inherit (darwin) ICU;
inherit (darwin.apple_sdk_11_0.frameworks) OpenGL;
inherit (darwin.apple_sdk_11_1.frameworks) OpenGL;
};
qtwebsockets = callPackage ../modules/qtwebsockets.nix {};
qtwebview = callPackage ../modules/qtwebview.nix {
inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation WebKit;
inherit (darwin.apple_sdk_11_1.frameworks) CoreFoundation WebKit;
};
qtx11extras = callPackage ../modules/qtx11extras.nix {};
qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {};
Expand Down
18 changes: 9 additions & 9 deletions pkgs/development/libraries/qt-6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let
let
callPackage = self.newScope ({
inherit qtModule srcs;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_1.stdenv else stdenv;
});
in
{
Expand All @@ -38,7 +38,7 @@ let
withGtk3 = true;
inherit (srcs.qtbase) src version;
inherit developerBuild;
inherit (darwin.apple_sdk_11_0.frameworks)
inherit (darwin.apple_sdk_11_1.frameworks)
AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit;
patches = [
./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch
Expand Down Expand Up @@ -94,7 +94,7 @@ let
qt5compat = callPackage ./modules/qt5compat.nix { };
qtcharts = callPackage ./modules/qtcharts.nix { };
qtconnectivity = callPackage ./modules/qtconnectivity.nix {
inherit (darwin.apple_sdk_11_0.frameworks) IOBluetooth PCSC;
inherit (darwin.apple_sdk_11_1.frameworks) IOBluetooth PCSC;
};
qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { };
qtdeclarative = callPackage ./modules/qtdeclarative.nix { };
Expand All @@ -107,7 +107,7 @@ let
qtlottie = callPackage ./modules/qtlottie.nix { };
qtmultimedia = callPackage ./modules/qtmultimedia.nix {
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-libav gst-vaapi;
inherit (darwin.apple_sdk_11_0.frameworks) VideoToolbox;
inherit (darwin.apple_sdk_11_1.frameworks) VideoToolbox;
};
qtmqtt = callPackage ./modules/qtmqtt.nix { };
qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { };
Expand All @@ -117,7 +117,7 @@ let
qtserialport = callPackage ./modules/qtserialport.nix { };
qtshadertools = callPackage ./modules/qtshadertools.nix { };
qtspeech = callPackage ./modules/qtspeech.nix {
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa;
inherit (darwin.apple_sdk_11_1.frameworks) Cocoa;
};
qtquick3d = callPackage ./modules/qtquick3d.nix { };
qtquick3dphysics = callPackage ./modules/qtquick3dphysics.nix { };
Expand All @@ -133,9 +133,9 @@ let
qtwebchannel = callPackage ./modules/qtwebchannel.nix { };
qtwebengine = callPackage ./modules/qtwebengine.nix {
inherit (darwin) bootstrap_cmds cctools xnu;
inherit (darwin.apple_sdk_11_0) libpm libunwind;
inherit (darwin.apple_sdk_11_0.libs) sandbox;
inherit (darwin.apple_sdk_11_0.frameworks)
inherit (darwin.apple_sdk_11_1) libpm libunwind;
inherit (darwin.apple_sdk_11_1.libs) sandbox;
inherit (darwin.apple_sdk_11_1.frameworks)
AGL AVFoundation Accelerate Cocoa CoreLocation CoreML ForceFeedback
GameController ImageCaptureCore LocalAuthentication
MediaAccessibility MediaPlayer MetalKit Network OpenDirectory Quartz
Expand All @@ -146,7 +146,7 @@ let
};
qtwebsockets = callPackage ./modules/qtwebsockets.nix { };
qtwebview = callPackage ./modules/qtwebview.nix {
inherit (darwin.apple_sdk_11_0.frameworks) WebKit;
inherit (darwin.apple_sdk_11_1.frameworks) WebKit;
};

wrapQtAppsHook = makeSetupHook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let
TARGET = setTarget "VORTEX";
DYNAMIC_ARCH = setDynamicArch true;
USE_OPENMP = false;
MACOSX_DEPLOYMENT_TARGET = "11.0";
MACOSX_DEPLOYMENT_TARGET = "11.1";
};

aarch64-linux = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt/5.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ buildPythonPackage rec {
[tool.sip.project]
verbose = true
''
# Due to bug in SIP .whl name generation we have to bump minimal macos sdk upto 11.0 for
# Due to bug in SIP .whl name generation we have to bump minimal macos sdk upto 11.1 for
# aarch64-darwin. This patch can be removed once SIP will fix it in upstream,
# see https://github.com/NixOS/nixpkgs/pull/186612#issuecomment-1214635456.
+ lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
minimum-macos-version = "11.0"
minimum-macos-version = "11.1"
'' + ''
EOF
'';
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/torch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ in buildPythonPackage rec {
''
# error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc'
# This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header.
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0") ''
+ lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.1") ''
substituteInPlace third_party/pocketfft/pocketfft_hdronly.h --replace '#if __cplusplus >= 201703L
inline void *aligned_alloc(size_t align, size_t size)' '#if __cplusplus >= 201703L && 0
inline void *aligned_alloc(size_t align, size_t size)'
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/tools/rcodesign/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-cpQBdxTw/ge4VtzjdL2a2xgSeCT22fMIjuKu5UEedhI=";

buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk_11_0.frameworks.Security
darwin.apple_sdk_11_1.frameworks.Security
];

cargoBuildFlags = [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/tools/rust/cargo-tally/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {

cargoSha256 = "sha256-aYZsMyMz5IpkOontFQ2g09F+UjTmluOAlrbD+4etxKw=";

buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_1.frameworks; [
DiskArbitration
Foundation
IOKit
Expand Down
Loading