From 177b17abb0afa84781e95954096d1d856c2d00ae Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Sun, 30 Apr 2023 17:48:08 -0400 Subject: [PATCH] apple_sdk: refactor 11+ --- doc/stdenv/platform-notes.chapter.md | 6 +- lib/systems/default.nix | 2 +- pkgs/applications/audio/audacity/default.nix | 2 +- .../blockchains/solana/default.nix | 4 +- .../emulators/bsnes/ares/default.nix | 2 +- .../emulators/bsnes/bsnes-hd/default.nix | 2 +- pkgs/applications/misc/inlyne/default.nix | 2 +- .../misc/process-viewer/default.nix | 2 +- pkgs/applications/misc/xmrig/default.nix | 2 +- pkgs/applications/misc/xmrig/proxy.nix | 2 +- .../signalbackup-tools/default.nix | 2 +- pkgs/applications/video/mpv/default.nix | 2 +- pkgs/development/compilers/hvm/default.nix | 2 +- pkgs/development/compilers/kind2/default.nix | 2 +- .../development/compilers/lobster/default.nix | 5 +- pkgs/development/compilers/swift/default.nix | 4 +- .../compilers/swift/xctest/default.nix | 2 +- .../interpreters/python/default.nix | 4 +- .../libraries/arrayfire/default.nix | 2 +- .../libraries/qt-5/5.15/default.nix | 22 +- pkgs/development/libraries/qt-6/default.nix | 18 +- .../science/math/openblas/default.nix | 2 +- pkgs/development/python-modules/pyqt/5.x.nix | 4 +- .../python-modules/torch/default.nix | 2 +- pkgs/development/tools/rcodesign/default.nix | 2 +- .../tools/rust/cargo-tally/default.nix | 2 +- .../cf-setup-hook.sh | 0 .../default.nix | 0 .../framework-setup-hook.sh | 0 .../frameworks.nix | 0 .../impure-deps.nix | 0 .../private-frameworks-setup-hook.sh | 0 .../security-setup-hook.sh | 0 .../darwin/apple-sdk-11.0/apple_sdk.nix | 268 ----------- .../darwin/apple-sdk-11.0/default.nix | 136 ------ .../darwin/apple-sdk-11.0/libSystem.nix | 87 ---- .../darwin/apple-sdk-11.0/libnetwork.nix | 20 - .../darwin/apple-sdk-11.0/libobjc.nix | 24 - .../darwin/apple-sdk-11.0/libpm.nix | 23 - .../darwin/apple-sdks/CLTools_Executables.nix | 23 + .../apple-sdks/CLTools_macOSNMOS_SDK.nix | 25 + pkgs/os-specific/darwin/apple-sdks/README.md | 47 ++ .../darwin/apple-sdks/apple-sdk-releases.json | 110 +++++ .../os-specific/darwin/apple-sdks/default.nix | 21 + .../apple-sdks/frameworks/11.1.0/fixups.nix | 102 ++++ .../frameworks/11.1.0/private.nix} | 7 +- .../frameworks/11.1.0/public.nix} | 0 .../apple-sdks/frameworks/11.3.0/fixups.nix | 102 ++++ .../apple-sdks/frameworks/11.3.0/private.nix | 31 ++ .../apple-sdks/frameworks/11.3.0/public.nix | 197 ++++++++ .../apple-sdks/frameworks/12.1.0/fixups.nix | 102 ++++ .../apple-sdks/frameworks/12.1.0/private.nix | 31 ++ .../apple-sdks/frameworks/12.1.0/public.nix | 209 +++++++++ .../apple-sdks/frameworks/12.3.0/fixups.nix | 102 ++++ .../apple-sdks/frameworks/12.3.0/private.nix | 31 ++ .../apple-sdks/frameworks/12.3.0/public.nix | 209 +++++++++ .../apple-sdks/frameworks/13.1.0/fixups.nix | 72 +++ .../apple-sdks/frameworks/13.1.0/private.nix | 17 + .../apple-sdks/frameworks/13.1.0/public.nix | 227 +++++++++ .../apple-sdks/frameworks/13.3.0/fixups.nix | 71 +++ .../apple-sdks/frameworks/13.3.0/private.nix | 16 + .../apple-sdks/frameworks/13.3.0/public.nix | 228 +++++++++ .../darwin/apple-sdks/frameworks/default.nix | 127 +++++ .../apple-sdks/frameworks/gen-frameworks.py | 289 ++++++++++++ .../forceLinkCoreFoundationFramework.sh} | 0 .../apple-sdks/gen-apple-sdk-releases.py | 174 +++++++ .../os-specific/darwin/apple-sdks/generic.nix | 133 ++++++ .../darwin/apple-sdks/libSystem.nix | 98 ++++ .../libcharset.nix | 11 +- .../darwin/apple-sdks/libnetwork.nix | 21 + .../os-specific/darwin/apple-sdks/libobjc.nix | 27 ++ pkgs/os-specific/darwin/apple-sdks/libpm.nix | 24 + .../darwin/apple-sdks/libs/Xplugin.nix | 25 + .../darwin/apple-sdks/libs/default.nix | 8 + .../darwin/apple-sdks/libs/libDER.nix | 13 + .../darwin/apple-sdks/libs/sandbox.nix | 16 + .../darwin/apple-sdks/libs/simd.nix | 13 + .../darwin/apple-sdks/libs/utmp.nix | 16 + .../darwin/apple-sdks/libs/xpc.nix | 16 + .../libunwind.nix | 11 +- .../apple-source-releases/xnu/default.nix | 4 +- pkgs/os-specific/darwin/cctools/apple.nix | 252 +++++----- pkgs/os-specific/darwin/gen-frameworks.py | 147 ------ pkgs/os-specific/darwin/moltenvk/default.nix | 75 ++- pkgs/os-specific/darwin/xcode/default.nix | 103 +--- pkgs/os-specific/darwin/xcode/releases.nix | 413 ++++++++++++++++ .../darwin/xcode/require-xcode.nix | 49 ++ pkgs/tools/misc/fclones/default.nix | 2 +- pkgs/tools/misc/toastify/default.nix | 2 +- pkgs/tools/system/bottom/default.nix | 2 +- pkgs/top-level/all-packages.nix | 333 ++++++------- pkgs/top-level/darwin-packages.nix | 439 +++++++++--------- pkgs/top-level/python-packages.nix | 2 +- pkgs/top-level/qt5-packages.nix | 2 +- pkgs/top-level/release.nix | 1 + 95 files changed, 4106 insertions(+), 1383 deletions(-) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/cf-setup-hook.sh (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/default.nix (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/framework-setup-hook.sh (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/frameworks.nix (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/impure-deps.nix (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/private-frameworks-setup-hook.sh (100%) rename pkgs/os-specific/darwin/{apple-sdk => apple-sdk-10-12}/security-setup-hook.sh (100%) delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix delete mode 100644 pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/CLTools_Executables.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/CLTools_macOSNMOS_SDK.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/README.md create mode 100644 pkgs/os-specific/darwin/apple-sdks/apple-sdk-releases.json create mode 100644 pkgs/os-specific/darwin/apple-sdks/default.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/fixups.nix rename pkgs/os-specific/darwin/{apple-sdk-11.0/private-frameworks.nix => apple-sdks/frameworks/11.1.0/private.nix} (81%) rename pkgs/os-specific/darwin/{apple-sdk-11.0/frameworks.nix => apple-sdks/frameworks/11.1.0/public.nix} (100%) create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/fixups.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/private.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/public.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/fixups.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/private.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/public.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/fixups.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/private.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/public.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/fixups.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/private.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/public.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/fixups.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/private.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/public.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/frameworks/default.nix create mode 100755 pkgs/os-specific/darwin/apple-sdks/frameworks/gen-frameworks.py rename pkgs/os-specific/darwin/{apple-sdk-11.0/cf-setup-hook.sh => apple-sdks/frameworks/scripts/forceLinkCoreFoundationFramework.sh} (100%) create mode 100755 pkgs/os-specific/darwin/apple-sdks/gen-apple-sdk-releases.py create mode 100644 pkgs/os-specific/darwin/apple-sdks/generic.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libSystem.nix rename pkgs/os-specific/darwin/{apple-sdk-11.0 => apple-sdks}/libcharset.nix (58%) create mode 100644 pkgs/os-specific/darwin/apple-sdks/libnetwork.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libobjc.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libpm.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/Xplugin.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/default.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/libDER.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/sandbox.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/simd.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/utmp.nix create mode 100644 pkgs/os-specific/darwin/apple-sdks/libs/xpc.nix rename pkgs/os-specific/darwin/{apple-sdk-11.0 => apple-sdks}/libunwind.nix (72%) delete mode 100755 pkgs/os-specific/darwin/gen-frameworks.py create mode 100644 pkgs/os-specific/darwin/xcode/releases.nix create mode 100644 pkgs/os-specific/darwin/xcode/require-xcode.nix diff --git a/doc/stdenv/platform-notes.chapter.md b/doc/stdenv/platform-notes.chapter.md index b47f5af349b8d..962aaa24a2e52 100644 --- a/doc/stdenv/platform-notes.chapter.md +++ b/doc/stdenv/platform-notes.chapter.md @@ -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. diff --git a/lib/systems/default.nix b/lib/systems/default.nix index f4784c61c6752..c13ee0f290aec 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -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" diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 1eb5171ede22f..3dcd0de16cb10 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -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 ''; diff --git a/pkgs/applications/blockchains/solana/default.nix b/pkgs/applications/blockchains/solana/default.nix index b21e945b1aedf..b281a23afe1fd 100644 --- a/pkgs/applications/blockchains/solana/default.nix +++ b/pkgs/applications/blockchains/solana/default.nix @@ -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"; diff --git a/pkgs/applications/emulators/bsnes/ares/default.nix b/pkgs/applications/emulators/bsnes/ares/default.nix index 9914e6e691c3d..653a08800fe8e 100644 --- a/pkgs/applications/emulators/bsnes/ares/default.nix +++ b/pkgs/applications/emulators/bsnes/ares/default.nix @@ -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"; diff --git a/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix b/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix index b6d158a7a7c83..d756e89037262 100644 --- a/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix +++ b/pkgs/applications/emulators/bsnes/bsnes-hd/default.nix @@ -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"; diff --git a/pkgs/applications/misc/inlyne/default.nix b/pkgs/applications/misc/inlyne/default.nix index 5cecae9db664d..510fe25990aff 100644 --- a/pkgs/applications/misc/inlyne/default.nix +++ b/pkgs/applications/misc/inlyne/default.nix @@ -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 = '' diff --git a/pkgs/applications/misc/process-viewer/default.nix b/pkgs/applications/misc/process-viewer/default.nix index f453009e0c811..069aa72206dd5 100644 --- a/pkgs/applications/misc/process-viewer/default.nix +++ b/pkgs/applications/misc/process-viewer/default.nix @@ -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 = '' diff --git a/pkgs/applications/misc/xmrig/default.nix b/pkgs/applications/misc/xmrig/default.nix index d48c7bd663e76..56de29c623570 100644 --- a/pkgs/applications/misc/xmrig/default.nix +++ b/pkgs/applications/misc/xmrig/default.nix @@ -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"; diff --git a/pkgs/applications/misc/xmrig/proxy.nix b/pkgs/applications/misc/xmrig/proxy.nix index 0be5dd4cae2eb..c2aa4f6ec3cb4 100644 --- a/pkgs/applications/misc/xmrig/proxy.nix +++ b/pkgs/applications/misc/xmrig/proxy.nix @@ -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"; diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix index 0a667379d4c9d..717d618fa54d9 100644 --- a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix @@ -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"; diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 68a8624c5eed3..895ba2a33a70e 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -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: { diff --git a/pkgs/development/compilers/hvm/default.nix b/pkgs/development/compilers/hvm/default.nix index dc933572514fd..ffbed13d97caf 100644 --- a/pkgs/development/compilers/hvm/default.nix +++ b/pkgs/development/compilers/hvm/default.nix @@ -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 diff --git a/pkgs/development/compilers/kind2/default.nix b/pkgs/development/compilers/kind2/default.nix index d307f6eac8b78..f607d1f036319 100644 --- a/pkgs/development/compilers/kind2/default.nix +++ b/pkgs/development/compilers/kind2/default.nix @@ -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 = diff --git a/pkgs/development/compilers/lobster/default.nix b/pkgs/development/compilers/lobster/default.nix index b1dac5a67f1a5..50ede13df9164 100644 --- a/pkgs/development/compilers/lobster/default.nix +++ b/pkgs/development/compilers/lobster/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, unstableGitUpdater , cmake , callPackage @@ -8,7 +9,7 @@ , xorg # Darwin deps -, CoreFoundation +, cf-private , Cocoa , AudioToolbox , OpenGL @@ -30,7 +31,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = if stdenv.isDarwin then [ - CoreFoundation + cf-private Cocoa AudioToolbox OpenGL diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index 2df883095cf15..cdcbbb5cace77 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -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 @@ -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: { diff --git a/pkgs/development/compilers/swift/xctest/default.nix b/pkgs/development/compilers/swift/xctest/default.nix index c8003d8486f10..f4ff6faf27720 100644 --- a/pkgs/development/compilers/swift/xctest/default.nix +++ b/pkgs/development/compilers/swift/xctest/default.nix @@ -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 ''; diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 510aacbdc33a8..42d1092283569 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -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; }; }) diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index 8692aa3017f77..8f3c8812f1848 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -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; { diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 5f82900903835..8074779727709 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -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 {}; @@ -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 {}; diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 0f164fb3ce022..f0169e451585f 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -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 { @@ -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 @@ -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 { }; @@ -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 { }; @@ -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 { }; @@ -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 @@ -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 diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 950402315a9b5..9735adeba174f 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -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 = { diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index f43038fac2969..9aae28fabe4db 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -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 ''; diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index c61601808273a..7ba8c492e6878 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -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)' diff --git a/pkgs/development/tools/rcodesign/default.nix b/pkgs/development/tools/rcodesign/default.nix index 34227dfa705e5..553f4c1a5800b 100644 --- a/pkgs/development/tools/rcodesign/default.nix +++ b/pkgs/development/tools/rcodesign/default.nix @@ -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 = [ diff --git a/pkgs/development/tools/rust/cargo-tally/default.nix b/pkgs/development/tools/rust/cargo-tally/default.nix index 190cf29a640fa..f1f73e56ddc15 100644 --- a/pkgs/development/tools/rust/cargo-tally/default.nix +++ b/pkgs/development/tools/rust/cargo-tally/default.nix @@ -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 diff --git a/pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-10-12/cf-setup-hook.sh similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/cf-setup-hook.sh rename to pkgs/os-specific/darwin/apple-sdk-10-12/cf-setup-hook.sh diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk-10-12/default.nix similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/default.nix rename to pkgs/os-specific/darwin/apple-sdk-10-12/default.nix diff --git a/pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-10-12/framework-setup-hook.sh similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh rename to pkgs/os-specific/darwin/apple-sdk-10-12/framework-setup-hook.sh diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-10-12/frameworks.nix similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/frameworks.nix rename to pkgs/os-specific/darwin/apple-sdk-10-12/frameworks.nix diff --git a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix b/pkgs/os-specific/darwin/apple-sdk-10-12/impure-deps.nix similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/impure-deps.nix rename to pkgs/os-specific/darwin/apple-sdk-10-12/impure-deps.nix diff --git a/pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-10-12/private-frameworks-setup-hook.sh similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/private-frameworks-setup-hook.sh rename to pkgs/os-specific/darwin/apple-sdk-10-12/private-frameworks-setup-hook.sh diff --git a/pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdk-10-12/security-setup-hook.sh similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh rename to pkgs/os-specific/darwin/apple-sdk-10-12/security-setup-hook.sh diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix deleted file mode 100644 index ca23af43229ca..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix +++ /dev/null @@ -1,268 +0,0 @@ -{ lib, stdenvNoCC, buildPackages, fetchurl, xar, cpio, pkgs, python3, pbzx, MacOSX-SDK }: - -# TODO: reorganize to make this just frameworks, and move libs to default.nix - -let - stdenv = stdenvNoCC; - - standardFrameworkPath = name: private: - "/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework"; - - mkDepsRewrites = deps: - let - mergeRewrites = x: y: { - prefix = lib.mergeAttrs (x.prefix or {}) (y.prefix or {}); - const = lib.mergeAttrs (x.const or {}) (y.const or {}); - }; - - rewriteArgs = { prefix ? {}, const ? {} }: lib.concatLists ( - (lib.mapAttrsToList (from: to: [ "-p" "${from}:${to}" ]) prefix) ++ - (lib.mapAttrsToList (from: to: [ "-c" "${from}:${to}" ]) const) - ); - - rewrites = depList: lib.fold mergeRewrites {} - (map (dep: dep.tbdRewrites) - (lib.filter (dep: dep ? tbdRewrites) depList)); - in - lib.escapeShellArgs (rewriteArgs (rewrites (builtins.attrValues deps))); - - mkFramework = { name, deps, private ? false }: - let self = stdenv.mkDerivation { - pname = "apple-${lib.optionalString private "private-"}framework-${name}"; - version = MacOSX-SDK.version; - - dontUnpack = true; - - # because we copy files from the system - preferLocalBuild = true; - - disallowedRequisites = [ MacOSX-SDK ]; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - installPhase = '' - mkdir -p $out/Library/Frameworks - - cp -r ${MacOSX-SDK}${standardFrameworkPath name private} $out/Library/Frameworks - - if [[ -d ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule ]]; then - mkdir -p $out/lib/swift - cp -r -t $out/lib/swift \ - ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule \ - ${MacOSX-SDK}/usr/lib/swift/libswift${name}.tbd - fi - - # Fix and check tbd re-export references - chmod u+w -R $out - find $out -name '*.tbd' -type f | while read tbd; do - echo "Fixing re-exports in $tbd" - rewrite-tbd \ - -p ${standardFrameworkPath name private}/:$out/Library/Frameworks/${name}.framework/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - ${mkDepsRewrites deps} \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; - - propagatedBuildInputs = builtins.attrValues deps; - - passthru = { - tbdRewrites = { - prefix."${standardFrameworkPath name private}/" = "${self}/Library/Frameworks/${name}.framework/"; - }; - }; - - meta = with lib; { - description = "Apple SDK framework ${name}"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - }; - }; - in self; - - framework = name: deps: mkFramework { inherit name deps; private = false; }; - privateFramework = name: deps: mkFramework { inherit name deps; private = true; }; -in rec { - libs = { - xpc = stdenv.mkDerivation { - name = "apple-lib-xpc"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - cp -r "${MacOSX-SDK}/usr/include/xpc" $out/include/xpc - cp "${MacOSX-SDK}/usr/include/launch.h" $out/include/launch.h - popd >/dev/null - ''; - }; - - Xplugin = stdenv.mkDerivation { - name = "apple-lib-Xplugin"; - dontUnpack = true; - - propagatedBuildInputs = with frameworks; [ - OpenGL ApplicationServices Carbon IOKit CoreGraphics CoreServices CoreText - ]; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${MacOSX-SDK}/include/Xplugin.h" $out/include/Xplugin.h - cp ${MacOSX-SDK}/usr/lib/libXplugin.1.tbd $out/lib - ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd - ''; - }; - - utmp = stdenv.mkDerivation { - name = "apple-lib-utmp"; - dontUnpack = true; - - installPhase = '' - mkdir -p $out/include - pushd $out/include >/dev/null - ln -s "${MacOSX-SDK}/include/utmp.h" - ln -s "${MacOSX-SDK}/include/utmpx.h" - popd >/dev/null - ''; - }; - - sandbox = stdenv.mkDerivation { - name = "apple-lib-sandbox"; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/include $out/lib - ln -s "${MacOSX-SDK}/usr/include/sandbox.h" $out/include/sandbox.h - cp "${MacOSX-SDK}/usr/lib/libsandbox.1.tbd" $out/lib - ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd - ''; - }; - - libDER = stdenv.mkDerivation { - name = "apple-lib-libDER"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/include - cp -r ${MacOSX-SDK}/usr/include/libDER $out/include - ''; - }; - - simd = stdenv.mkDerivation { - name = "apple-lib-simd"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/include - cp -r ${MacOSX-SDK}/usr/include/simd $out/include - ''; - }; - }; - - frameworks = let - # Dependency map created by gen-frameworks.py. - generatedDeps = import ./frameworks.nix { - inherit frameworks libs; - }; - - # Additional dependencies that are not picked up by gen-frameworks.py. - # Some of these are simply private frameworks the generator does not see. - extraDeps = with libs; with frameworks; let - inherit (pkgs.darwin.apple_sdk_11_0) libnetwork; - libobjc = pkgs.darwin.apple_sdk_11_0.objc4; - in { - # Below this comment are entries migrated from before the generator was - # added. If, for a given framework, you are able to reverify the extra - # deps are really necessary on top of the generator deps, move it above - # this comment (and maybe document your findings). - AVFoundation = { inherit ApplicationServices AVFCapture AVFCore; }; - Accelerate = { inherit CoreWLAN IOBluetooth; }; - AddressBook = { inherit AddressBookCore ContactsPersistence libobjc; }; - AppKit = { inherit AudioToolbox AudioUnit UIFoundation; }; - AudioToolbox = { inherit AudioToolboxCore; }; - AudioUnit = { inherit Carbon CoreAudio; }; - Carbon = { inherit IOKit QuartzCore libobjc; }; - CoreAudio = { inherit IOKit; }; - CoreFoundation = { inherit libobjc; }; - CoreGraphics = { inherit SystemConfiguration; }; - CoreMIDIServer = { inherit CoreMIDI; }; - CoreMedia = { inherit ApplicationServices AudioToolbox AudioUnit; }; - CoreServices = { inherit CoreAudio NetFS ServiceManagement; }; - CoreWLAN = { inherit SecurityFoundation; }; - DiscRecording = { inherit IOKit libobjc; }; - Foundation = { inherit SystemConfiguration libobjc; }; - GameKit = { inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit; }; - ICADevices = { inherit Carbon libobjc; }; - IOBluetooth = { inherit CoreBluetooth; }; - JavaScriptCore = { inherit libobjc; }; - Kernel = { inherit IOKit; }; - LinkPresentation = { inherit URLFormatting; }; - MediaToolbox = { inherit AudioUnit; }; - MetricKit = { inherit SignpostMetrics; }; - Network = { inherit libnetwork; }; - PCSC = { inherit CoreData; }; - PassKit = { inherit PassKitCore; }; - QTKit = { inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox; }; - Quartz = { inherit QTKit; }; - QuartzCore = { inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc; }; - Security = { inherit IOKit libDER; }; - TWAIN = { inherit Carbon; }; - VideoDecodeAcceleration = { inherit CoreVideo; }; - WebKit = { inherit ApplicationServices Carbon libobjc; }; - }; - - # Overrides for framework derivations. - overrides = super: { - CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { - setupHook = ./cf-setup-hook.sh; - }); - - # This framework doesn't exist in newer SDKs (somewhere around 10.13), but - # there are references to it in nixpkgs. - QuickTime = throw "QuickTime framework not available"; - - # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 - JavaVM = super.JavaNativeFoundation; - - CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { - installPhase = drv.installPhase + '' - # When used as a module, complains about a missing import for - # Darwin.C.stdint. Apparently fixed in later SDKs. - awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ - $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h - ''; - }); - - System = lib.overrideDerivation super.System (drv: { - installPhase = drv.installPhase + '' - # Contrarily to the other frameworks, System framework's TBD file - # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. - # This produces an error when installing the framework as: - # 1. The original file is not copied into the output directory - # 2. Even if it was copied, the relative path wouldn't match - # Thus, it is easier to replace the file than to fix the symlink. - cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ - $out/Library/Frameworks/System.framework/Versions/B/System.tbd - ''; - }); - }; - - # Merge extraDeps into generatedDeps. - deps = generatedDeps // ( - lib.mapAttrs - (name: deps: generatedDeps.${name} // deps) - extraDeps - ); - - # Create derivations, and add private frameworks. - bareFrameworks = (lib.mapAttrs framework deps) // ( - lib.mapAttrs privateFramework (import ./private-frameworks.nix { - inherit frameworks; - libobjc = pkgs.darwin.apple_sdk_11_0.objc4; - }) - ); - in - # Apply derivation overrides. - bareFrameworks // overrides bareFrameworks; -} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix deleted file mode 100644 index 2576d8bcafb7f..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ stdenvNoCC, fetchurl, newScope, lib, pkgs -, stdenv, overrideCC -, xar, cpio, python3, pbzx }: - -let - mkSusDerivation = args: stdenvNoCC.mkDerivation (args // { - dontBuild = true; - darwinDontCodeSign = true; - - nativeBuildInputs = [ cpio pbzx ]; - - outputs = [ "out" ]; - - unpackPhase = '' - pbzx $src | cpio -idm - ''; - - passthru = { - inherit (args) version; - }; - }); - - MacOSX-SDK = mkSusDerivation { - pname = "MacOSX-SDK"; - version = "11.0.0"; - - # https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog - src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOSNMOS_SDK.pkg"; - sha256 = "0n425smj4q1vxbza8fzwnk323fyzbbq866q32w288c44hl5yhwsf"; - }; - - installPhase = '' - mv Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk $out - ''; - }; - - CLTools_Executables = mkSusDerivation { - pname = "CLTools_Executables"; - version = "11.0.0"; - - # https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog - src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_Executables.pkg"; - sha256 = "0nvb1qx7l81l2wcl8wvgbpsg5rcn51ylhivqmlfr2hrrv3zrrpl0"; - }; - - installPhase = '' - mv Library/Developer/CommandLineTools $out - ''; - }; - - mkCc = cc: - if stdenv.isAarch64 then cc - else - cc.override { - bintools = stdenv.cc.bintools.override { libc = packages.Libsystem; }; - libc = packages.Libsystem; - }; - - mkStdenv = stdenv: - if stdenv.isAarch64 then stdenv - else - (overrideCC stdenv (mkCc stdenv.cc)).override { - targetPlatform = stdenv.targetPlatform // { - darwinMinVersion = "10.12"; - darwinSdkVersion = "11.0"; - }; - }; - - stdenvs = { - stdenv = mkStdenv stdenv; - } // builtins.listToAttrs (map - (v: { name = "clang${v}Stdenv"; value = mkStdenv pkgs."llvmPackages_${v}".stdenv; }) - [ "12" "13" "14" "15" "16" ] - ); - - callPackage = newScope (packages // pkgs.darwin // { inherit MacOSX-SDK; }); - - packages = stdenvs // { - inherit (callPackage ./apple_sdk.nix { }) frameworks libs; - - # TODO: this is nice to be private. is it worth the callPackage above? - # Probably, I don't think that callPackage costs much at all. - inherit MacOSX-SDK CLTools_Executables; - - Libsystem = callPackage ./libSystem.nix { }; - LibsystemCross = pkgs.darwin.Libsystem; - libcharset = callPackage ./libcharset.nix { }; - libunwind = callPackage ./libunwind.nix { }; - libnetwork = callPackage ./libnetwork.nix { }; - libpm = callPackage ./libpm.nix { }; - # Avoid introducing a new objc4 if stdenv already has one, to prevent - # conflicting LLVM modules. - objc4 = stdenv.objc4 or (callPackage ./libobjc.nix { }); - - # questionable aliases - configd = pkgs.darwin.apple_sdk.frameworks.SystemConfiguration; - inherit (pkgs.darwin.apple_sdk.frameworks) IOKit; - - xcodebuild = pkgs.xcbuild.override { - inherit (pkgs.darwin.apple_sdk_11_0) stdenv; - inherit (pkgs.darwin.apple_sdk_11_0.frameworks) CoreServices CoreGraphics ImageIO; - }; - - rustPlatform = pkgs.makeRustPlatform { - inherit (pkgs.darwin.apple_sdk_11_0) stdenv; - inherit (pkgs) rustc cargo; - } // { - inherit (pkgs.callPackage ../../../build-support/rust/hooks { - inherit (pkgs.darwin.apple_sdk_11_0) stdenv; - inherit (pkgs) cargo rustc; - clang = mkCc pkgs.clang; - }) bindgenHook; - }; - - callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs // rec { - inherit (pkgs.darwin.apple_sdk_11_0) xcodebuild rustPlatform; - darwin = pkgs.darwin.overrideScope (_: prev: { - inherit (prev.darwin.apple_sdk_11_0) - IOKit - Libsystem - LibsystemCross - Security - configd - libcharset - libunwind - objc4 - ; - apple_sdk = prev.darwin.apple_sdk_11_0; - CF = prev.darwin.apple_sdk_11_0.CoreFoundation; - }); - xcbuild = xcodebuild; - })); - }; -in packages diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix deleted file mode 100644 index 7be670425d7af..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libSystem.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -stdenvNoCC.mkDerivation { - pname = "libSystem"; - version = MacOSX-SDK.version; - - dontBuild = true; - dontUnpack = true; - - nativeBuildInputs = [ buildPackages.darwin.rewrite-tbd ]; - - includeDirs = [ - "CommonCrypto" "_types" "architecture" "arpa" "atm" "bank" "bsd" "bsm" - "corecrypto" "corpses" "default_pager" "device" "dispatch" "hfs" "i386" - "iokit" "kern" "libkern" "mach" "mach-o" "mach_debug" "machine" "malloc" - "miscfs" "net" "netinet" "netinet6" "netkey" "nfs" "os" "osfmk" "pexpert" - "platform" "protocols" "pthread" "rpc" "rpcsvc" "secure" "security" - "servers" "sys" "uuid" "vfs" "voucher" "xlocale" - ] ++ [ - "arm" "xpc" "arm64" - ]; - - csu = [ - "bundle1.o" "crt0.o" "crt1.10.5.o" "crt1.10.6.o" "crt1.o" "dylib1.10.5.o" - "dylib1.o" "gcrt1.o" "lazydylib1.o" - ]; - - installPhase = '' - mkdir -p $out/{include,lib/swift} - - for dir in $includeDirs; do - from=${MacOSX-SDK}/usr/include/$dir - if [ -e "$from" ]; then - cp -dr $from $out/include - else - echo "Header directory '$from' doesn't exist: skipping" - fi - done - - cp -d \ - ${MacOSX-SDK}/usr/include/*.h \ - ${MacOSX-SDK}/usr/include/*.modulemap \ - $out/include - - rm $out/include/tk*.h $out/include/tcl*.h - - cp -dr \ - ${MacOSX-SDK}/usr/lib/libSystem.* \ - ${MacOSX-SDK}/usr/lib/system \ - $out/lib - - # Extra libraries - for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.1 resolv; do - cp -d \ - ${MacOSX-SDK}/usr/lib/lib$name.tbd \ - ${MacOSX-SDK}/usr/lib/lib$name.*.tbd \ - $out/lib - done - - for name in os Dispatch; do - cp -dr \ - ${MacOSX-SDK}/usr/lib/swift/$name.swiftmodule \ - ${MacOSX-SDK}/usr/lib/swift/libswift$name.tbd \ - $out/lib/swift - done - - for f in $csu; do - from=${MacOSX-SDK}/usr/lib/$f - if [ -e "$from" ]; then - cp -d $from $out/lib - else - echo "Csu file '$from' doesn't exist: skipping" - fi - done - - chmod u+w -R $out/lib - find $out -name '*.tbd' -type f | while read tbd; do - rewrite-tbd \ - -c /usr/lib/libsystem.dylib:$out/lib/libsystem.dylib \ - -p /usr/lib/system/:$out/lib/system/ \ - -p /usr/lib/swift/:$out/lib/swift/ \ - -r ${builtins.storeDir} \ - "$tbd" - done - ''; -} - diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix deleted file mode 100644 index 2e5c0593bf406..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libnetwork.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - -let self = stdenvNoCC.mkDerivation { - pname = "libnetwork"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/lib - cp ${MacOSX-SDK}/usr/lib/libnetwork* $out/lib - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libnetwork.dylib" = "${self}/lib/libnetwork.dylib"; - }; - }; -}; in self diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix deleted file mode 100644 index 9288097ef3699..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libobjc.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenvNoCC, MacOSX-SDK, libcharset }: - -let self = stdenvNoCC.mkDerivation { - pname = "libobjc"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - installPhase = '' - mkdir -p $out/{include,lib/swift} - cp -r ${MacOSX-SDK}/usr/include/objc $out/include - cp ${MacOSX-SDK}/usr/lib/libobjc* $out/lib - cp -r ${MacOSX-SDK}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift - cp ${MacOSX-SDK}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib"; - const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib"; - }; - }; -}; in self diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix deleted file mode 100644 index 995f2b20ce706..0000000000000 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libpm.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenvNoCC, MacOSX-SDK, checkReexportsHook }: - -stdenvNoCC.mkDerivation { - pname = "libpm"; - version = MacOSX-SDK.version; - - dontUnpack = true; - dontBuild = true; - - nativeBuildInputs = [ checkReexportsHook ]; - - installPhase = '' - mkdir -p $out/lib - cp ${MacOSX-SDK}/usr/lib/libpm* $out/lib - ''; - - passthru = { - tbdRewrites = { - const."/usr/lib/libpmenergy.dylib" = "${placeholder "out"}/lib/libpmenergy.dylib"; - const."/usr/lib/libpmsample.dylib" = "${placeholder "out"}/lib/libpmsample.dylib"; - }; - }; -} diff --git a/pkgs/os-specific/darwin/apple-sdks/CLTools_Executables.nix b/pkgs/os-specific/darwin/apple-sdks/CLTools_Executables.nix new file mode 100644 index 0000000000000..980f36c417880 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/CLTools_Executables.nix @@ -0,0 +1,23 @@ +{ + cpio, + fetchurl, + pbzx, + stdenvNoCC, + version, +}: let + releases = builtins.fromJSON (builtins.readFile ./apple-sdk-releases.json); +in + stdenvNoCC.mkDerivation (finalAttrs: { + inherit version; + pname = "CLTools_Executables"; + src = fetchurl releases.${version}.${finalAttrs.pname}; + dontBuild = true; + darwinDontCodeSign = true; + nativeBuildInputs = [cpio pbzx]; + unpackPhase = '' + pbzx $src | cpio -idm + ''; + installPhase = '' + mv Library/Developer/CommandLineTools $out + ''; + }) diff --git a/pkgs/os-specific/darwin/apple-sdks/CLTools_macOSNMOS_SDK.nix b/pkgs/os-specific/darwin/apple-sdks/CLTools_macOSNMOS_SDK.nix new file mode 100644 index 0000000000000..db675044bc8e0 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/CLTools_macOSNMOS_SDK.nix @@ -0,0 +1,25 @@ +{ + cpio, + fetchurl, + lib, + pbzx, + stdenvNoCC, + version, +}: +let + releases = builtins.fromJSON (builtins.readFile ./apple-sdk-releases.json); +in +stdenvNoCC.mkDerivation (finalAttrs: { + inherit version; + pname = "CLTools_macOSNMOS_SDK"; + src = fetchurl releases.${version}.${finalAttrs.pname}; + dontBuild = true; + darwinDontCodeSign = true; + nativeBuildInputs = [cpio pbzx]; + unpackPhase = '' + pbzx $src | cpio -idm + ''; + installPhase = '' + mv Library/Developer/CommandLineTools/SDKs/MacOSX${lib.versions.majorMinor version}.sdk $out + ''; +}) diff --git a/pkgs/os-specific/darwin/apple-sdks/README.md b/pkgs/os-specific/darwin/apple-sdks/README.md new file mode 100644 index 0000000000000..74bc6f6b627de --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/README.md @@ -0,0 +1,47 @@ +# apple-sdks + +This document describes the different components which go into producing the Apple SDKs (versions later than 11.0) in Nixpkgs. + +## Frameworks and Libraries + +Generally, Each release of the SDK has a number of libraries and frameworks associated with it. + +### Libraries + +**TODO(@connorbaker):** further documentation. + +### Frameworks + +We store the logic and data for each SDK's frameworks `frameworks/sdk-version`, where `sdk-version` is something like `13.3.0`. The `frameworks/default.nix` file contains a function which produces our final framework derivations, combining the information in the files `public.nix`, `private.nix`, and `fixups.nix` in `frameworks/sdk-version`. The `frameworks/default.nix` expression infers the SDK version to build by looking at the `version` attribute of the `MacOSX-SDK` derivation it takes as an argument. + +#### Public frameworks + +Currently, we use `gen-frameworks.py` to create the `frameworks/sdk-version/public.nix` files we need. Unfortunately, the script doesn't always get all available frameworks, nor capture all necessary dependencies. In particular, private frameworks aren't captured by the script. + +The easiest way to run the script is by using its `--from-apple-sdk-releases` option which will cause it to generate a `public.nix` file for each SDK version in `apple-sdk-releases.json`. An example invocation is: + +```sh +./gen-frameworks.py --from-apple-sdk-releases ../apple-sdk-releases.json +``` + +Currently, there is no way to specify the directory to place the generated directories and files in, so be sure to run the script from the `frameworks` directory! + +#### Private frameworks + +Finding out which private frameworks are exposed in the SDK or used in Nixpkgs is a pain. The best @connorbaker has been able to figure out so far is adding entries to `frameworks/sdk-version/private.nix` as they are encountered. This is tedious and error-prone. + +#### Framework fixups + +Beyond exposing frameworks, there's typically some amount of "fixing up" needed for them to work properly. For example, because private frameworks aren't picked up by `gen-frameworks.py`, we have to manually add dependencies on private frameworks to the public frameworks. To separate the manual from automatically-generated Nix files, we use `frameworks/sdk-version/fixups.nix` as a place to store this information. + +The `frameworks/sdk-version/fixups.nix` file contains three attributes: + +- `addToFrameworks` +- `removeFromFrameworks` +- `overrideFrameworks` + +The `addToFrameworks` attribute is an attribute set where each key is the name of a framework and each value is an attribute set of dependencies to add to the named framework. + +The `removeFromFrameworks` attribute is an attribute set where each key is the name of a framework and each value is an attribute set of dependencies to remove from the named framework. + +The `overrideFrameworks` attribute is function which accepts an attribute set of framework derivations and returns an attribute set of framework derivations. This is useful for doing things like modifying the `buildPhase` or `installPhase` of a framework. diff --git a/pkgs/os-specific/darwin/apple-sdks/apple-sdk-releases.json b/pkgs/os-specific/darwin/apple-sdks/apple-sdk-releases.json new file mode 100644 index 0000000000000..c315c78f71842 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/apple-sdk-releases.json @@ -0,0 +1,110 @@ +{ + "11.1.0": { + "CLTools_Executables": { + "hash": "sha256-gN6c/9g5Q5EdrXhHSH0oluXy9F1vc0QZFzQgejoOa1s=", + "url": "https://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-7bTIxlSR37Saz/fb2ArGy93MtJCFZ81c6flRPlSb5/o=", + "url": "https://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-TnPoC4WEMIQEFwMbg/Ba37shxrT8O6T+6jtgIqsuglg=", + "url": "https://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-3UebaqiC1Zms/cDkABAOAnJSh7gLEhrK5gVudCS76ms=", + "url": "https://swcdn.apple.com/content/downloads/46/21/001-89745-A_56FM390IW5/v1um2qppgfdnam2e9cdqcqu2r6k8aa3lis/CLTools_macOS_SDK.pkg" + } + }, + "11.3.0": { + "CLTools_Executables": { + "hash": "sha256-e1c0aeLBjc2R3iI0jMA9fdUxu7bmqcWd7J23qcnOwiw=", + "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-1FmuhJjet38pD3863Jmpj7SIRBgYqQBCCR7nu3jIF8M=", + "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-7A5w3jWsjAmGju4KiLUsHGmS+z7YJd5eMFTIDqW7NIE=", + "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-COFyeNKFXeSKhWJ5RoXtxUWYU0uR7HpsCHhZSZ2rt2Q=", + "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_macOS_SDK.pkg" + } + }, + "12.1.0": { + "CLTools_Executables": { + "hash": "sha256-O6+Cy5aCz7RDadgVuGmqmyIPbrnsf7EzxCqmGZ2gp4o=", + "url": "https://swcdn.apple.com/content/downloads/52/17/002-41708-A_E8MFK7B2PK/6p55tbmh0qttgbt4cy94uuvnacy6tkw435/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-sHXT0vOwZmByCaW7989yekC5j+ZWKcW2q8F/FWiXr0o=", + "url": "https://swcdn.apple.com/content/downloads/52/17/002-41708-A_E8MFK7B2PK/6p55tbmh0qttgbt4cy94uuvnacy6tkw435/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-mRKXvWd6v1+tIsUsMNS8C8XS/Zvpb6y675VW0KPW9S8=", + "url": "https://swcdn.apple.com/content/downloads/52/17/002-41708-A_E8MFK7B2PK/6p55tbmh0qttgbt4cy94uuvnacy6tkw435/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-+ziqXrQKUNWyTypSx5r8g5ZDAbW2xkn565mL5HH2p3w=", + "url": "https://swcdn.apple.com/content/downloads/52/17/002-41708-A_E8MFK7B2PK/6p55tbmh0qttgbt4cy94uuvnacy6tkw435/CLTools_macOS_SDK.pkg" + } + }, + "12.3.0": { + "CLTools_Executables": { + "hash": "sha256-XlxHwCq+rtBF3Yyfdob3UEHN7YKzb7JF84lRmZbB/50=", + "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-mY9YTlyTujV6R89WaNmkJrfOQatXnoSW8gKxnawQz5Q=", + "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-Tr9VCeCP5udmh09U/zPQG2c4ky1LXscBwPfgpRy8uds=", + "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-2xwYLfiYuEdck7/8NY3iqiPKvoG9HAjXt8Ewyp9c0Es=", + "url": "https://swcdn.apple.com/content/downloads/24/42/002-83793-A_74JRE8GVAT/rlnkct919wgc5c0pjq986z5bb9h62uvni2/CLTools_macOS_SDK.pkg" + } + }, + "13.1.0": { + "CLTools_Executables": { + "hash": "sha256-gcTtNayaLczhBsnSZpZlPOuTN7lJIGgCiG4l0T+bPxo=", + "url": "https://swcdn.apple.com/content/downloads/03/28/012-92431-A_FKICGWU4EK/eflw1v4c64sgmvux4ljc083cfjj663wu9g/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-ageXj/3mW/NHLBpSYakWbebPuMYxEfZBTGspTLzOgYM=", + "url": "https://swcdn.apple.com/content/downloads/03/28/012-92431-A_FKICGWU4EK/eflw1v4c64sgmvux4ljc083cfjj663wu9g/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-86zr69+g5b3t8wR6Kb3LdsAf9EnQQUBrdlveo9w+yGY=", + "url": "https://swcdn.apple.com/content/downloads/03/28/012-92431-A_FKICGWU4EK/eflw1v4c64sgmvux4ljc083cfjj663wu9g/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-92t/8/7KuvGr+5cjwCK3XaaF//+nFyArEksmTNy5Nqs=", + "url": "https://swcdn.apple.com/content/downloads/03/28/012-92431-A_FKICGWU4EK/eflw1v4c64sgmvux4ljc083cfjj663wu9g/CLTools_macOS_SDK.pkg" + } + }, + "13.3.0": { + "CLTools_Executables": { + "hash": "sha256-XkP7RpegWmo3uHG35/imevV+06EU/VE6cNrBEaQThSk=", + "url": "https://swcdn.apple.com/content/downloads/38/61/032-64167-A_F8LL7XSTW6/k3kg0uip4kxd3qupgy6y8fzp27mnxdpt6y/CLTools_Executables.pkg" + }, + "CLTools_macOSLMOS_SDK": { + "hash": "sha256-LwXeA9K8yfSPul5kOayvGlyerJ//q6oB8nbO9LSg+Og=", + "url": "https://swcdn.apple.com/content/downloads/38/61/032-64167-A_F8LL7XSTW6/k3kg0uip4kxd3qupgy6y8fzp27mnxdpt6y/CLTools_macOSLMOS_SDK.pkg" + }, + "CLTools_macOSNMOS_SDK": { + "hash": "sha256-/Wb2uVOutiz5Y19LQjzu6YWi0lQFxTBjBuSRArJrtJs=", + "url": "https://swcdn.apple.com/content/downloads/38/61/032-64167-A_F8LL7XSTW6/k3kg0uip4kxd3qupgy6y8fzp27mnxdpt6y/CLTools_macOSNMOS_SDK.pkg" + }, + "CLTools_macOS_SDK": { + "hash": "sha256-BLq657B+T7FFv0/xl6dAIvxPdJPBTW6quBwO8K4P9ws=", + "url": "https://swcdn.apple.com/content/downloads/38/61/032-64167-A_F8LL7XSTW6/k3kg0uip4kxd3qupgy6y8fzp27mnxdpt6y/CLTools_macOS_SDK.pkg" + } + } +} diff --git a/pkgs/os-specific/darwin/apple-sdks/default.nix b/pkgs/os-specific/darwin/apple-sdks/default.nix new file mode 100644 index 0000000000000..e7d04d2c3b7d1 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/default.nix @@ -0,0 +1,21 @@ +{ + callPackage, + lib, +}: let + builder = version: callPackage ./generic.nix {inherit version;}; + flatVersion = version: "${lib.versions.major version}_${lib.versions.minor version}"; + toAttrset = version: lib.nameValuePair "apple_sdk_${flatVersion version}" (builder version); + versions = [ + "11.1.0" + "11.3.0" + "12.1.0" + "12.3.0" + "13.1.0" + "13.3.0" + ]; + appleSDKs = lib.pipe versions [ + (builtins.map toAttrset) + builtins.listToAttrs + ]; +in + appleSDKs diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/fixups.nix new file mode 100644 index 0000000000000..7815a7d5f1960 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/fixups.nix @@ -0,0 +1,102 @@ +# TODO(@connorbaker): Revisit this +{ + lib, + # macOS things + frameworks, + libnetwork, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + inherit (libs) libDER; + libobjc = objc4; + in + with frameworks; { + # Below this comment are entries migrated from before the generator was + # added. If, for a given framework, you are able to reverify the extra + # deps are really necessary on top of the generator deps, move it above + # this comment (and maybe document your findings). + AVFoundation = {inherit ApplicationServices AVFCapture AVFCore;}; + Accelerate = {inherit CoreWLAN IOBluetooth;}; + AddressBook = {inherit AddressBookCore ContactsPersistence libobjc;}; + AppKit = {inherit AudioToolbox AudioUnit UIFoundation;}; + AudioToolbox = {inherit AudioToolboxCore;}; + AudioUnit = {inherit Carbon CoreAudio;}; + Carbon = {inherit IOKit QuartzCore libobjc;}; + CoreAudio = {inherit IOKit;}; + CoreFoundation = {inherit libobjc;}; + CoreGraphics = {inherit SystemConfiguration;}; + CoreMIDIServer = {inherit CoreMIDI;}; + CoreMedia = {inherit ApplicationServices AudioToolbox AudioUnit;}; + CoreServices = {inherit CoreAudio NetFS ServiceManagement;}; + CoreWLAN = {inherit SecurityFoundation;}; + DiscRecording = {inherit IOKit libobjc;}; + Foundation = {inherit SystemConfiguration libobjc;}; + GameKit = {inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit;}; + ICADevices = {inherit Carbon libobjc;}; + IOBluetooth = {inherit CoreBluetooth;}; + JavaScriptCore = {inherit libobjc;}; + Kernel = {inherit IOKit;}; + LinkPresentation = {inherit URLFormatting;}; + MediaToolbox = {inherit AudioUnit;}; + MetricKit = {inherit SignpostMetrics;}; + Network = {inherit libnetwork;}; + PCSC = {inherit CoreData;}; + PassKit = {inherit PassKitCore;}; + QTKit = {inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox;}; + Quartz = {inherit QTKit;}; + QuartzCore = {inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc;}; + Security = {inherit IOKit libDER;}; + TWAIN = {inherit Carbon;}; + VideoDecodeAcceleration = {inherit CoreVideo;}; + WebKit = {inherit ApplicationServices Carbon libobjc;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = {}; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/private.nix similarity index 81% rename from pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix rename to pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/private.nix index 27749dde100a0..dcc957a7f7fa6 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/private.nix @@ -1,10 +1,11 @@ -{ frameworks, libobjc }: with frameworks; +# TODO(@connorbaker): Revisit this +{ objc4, frameworks }: # generated by hand to avoid exposing all private frameworks # frameworks here are only the necessary ones used by public frameworks. { AVFCapture = {}; AVFCore = {}; - AddressBookCore = { inherit ContactsPersistence; }; + AddressBookCore = { inherit (frameworks) ContactsPersistence; }; AudioToolboxCore = {}; ContactsPersistence = {}; UIFoundation = {}; @@ -23,7 +24,7 @@ DebugSymbols = {}; # Also expose DisplayServices; used by `sketchybar` package. - DisplayServices = { inherit libobjc; }; + DisplayServices = { libobjc = objc4; }; # Also expose MultitouchSupport; used by `chuck` package. MultitouchSupport = {}; diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/public.nix similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk-11.0/frameworks.nix rename to pkgs/os-specific/darwin/apple-sdks/frameworks/11.1.0/public.nix diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/fixups.nix new file mode 100644 index 0000000000000..c0b8593edb323 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/fixups.nix @@ -0,0 +1,102 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ + lib, + # macOS things + frameworks, + libnetwork, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + inherit (libs) libDER; + libobjc = objc4; + in + with frameworks; { + # Below this comment are entries migrated from before the generator was + # added. If, for a given framework, you are able to reverify the extra + # deps are really necessary on top of the generator deps, move it above + # this comment (and maybe document your findings). + AVFoundation = {inherit ApplicationServices AVFCapture AVFCore;}; + Accelerate = {inherit CoreWLAN IOBluetooth;}; + AddressBook = {inherit AddressBookCore ContactsPersistence libobjc;}; + AppKit = {inherit AudioToolbox AudioUnit UIFoundation;}; + AudioToolbox = {inherit AudioToolboxCore;}; + AudioUnit = {inherit Carbon CoreAudio;}; + Carbon = {inherit IOKit QuartzCore libobjc;}; + CoreAudio = {inherit IOKit;}; + CoreFoundation = {inherit libobjc;}; + CoreGraphics = {inherit SystemConfiguration;}; + CoreMIDIServer = {inherit CoreMIDI;}; + CoreMedia = {inherit ApplicationServices AudioToolbox AudioUnit;}; + CoreServices = {inherit CoreAudio NetFS ServiceManagement;}; + CoreWLAN = {inherit SecurityFoundation;}; + DiscRecording = {inherit IOKit libobjc;}; + Foundation = {inherit SystemConfiguration libobjc;}; + GameKit = {inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit;}; + ICADevices = {inherit Carbon libobjc;}; + IOBluetooth = {inherit CoreBluetooth;}; + JavaScriptCore = {inherit libobjc;}; + Kernel = {inherit IOKit;}; + LinkPresentation = {inherit URLFormatting;}; + MediaToolbox = {inherit AudioUnit;}; + MetricKit = {inherit SignpostMetrics;}; + Network = {inherit libnetwork;}; + PCSC = {inherit CoreData;}; + PassKit = {inherit PassKitCore;}; + QTKit = {inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox;}; + Quartz = {inherit QTKit;}; + QuartzCore = {inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc;}; + Security = {inherit IOKit libDER;}; + TWAIN = {inherit Carbon;}; + VideoDecodeAcceleration = {inherit CoreVideo;}; + WebKit = {inherit ApplicationServices Carbon libobjc;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = {}; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/private.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/private.nix new file mode 100644 index 0000000000000..128b5add51400 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/private.nix @@ -0,0 +1,31 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ objc4, frameworks }: +# generated by hand to avoid exposing all private frameworks +# frameworks here are only the necessary ones used by public frameworks. +{ + AVFCapture = {}; + AVFCore = {}; + AddressBookCore = { inherit (frameworks) ContactsPersistence; }; + AudioToolboxCore = {}; + ContactsPersistence = {}; + UIFoundation = {}; + GameCenterFoundation = {}; + GameCenterUI = {}; + GameCenterUICore = {}; + URLFormatting = {}; + SignpostMetrics = {}; + PassKitCore = {}; + SkyLight = {}; + + # Also expose CoreSymbolication; used by `root` package. + CoreSymbolication = {}; + + # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. + DebugSymbols = {}; + + # Also expose DisplayServices; used by `sketchybar` package. + DisplayServices = { libobjc = objc4; }; + + # Also expose MultitouchSupport; used by `chuck` package. + MultitouchSupport = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/public.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/public.nix new file mode 100644 index 0000000000000..6e6df1eb23cc0 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/11.3.0/public.nix @@ -0,0 +1,197 @@ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ + AGL = { inherit Carbon OpenGL; }; + AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; + AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; + AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; + Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + Accessibility = { inherit CoreGraphics Foundation; }; + Accounts = { inherit Foundation; }; + AdServices = { inherit Foundation; }; + AdSupport = { inherit Foundation; }; + AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; + AppKit = { inherit ApplicationServices CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal OpenGL QuartzCore; }; + AppTrackingTransparency = { inherit Foundation; }; + AppleScriptKit = {}; + AppleScriptObjC = { inherit Foundation; }; + ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText ImageIO; }; + AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; + AudioUnit = { inherit AudioToolbox; }; + AudioVideoBridging = { inherit Foundation IOKit; }; + AuthenticationServices = { inherit AppKit Foundation; }; + AutomaticAssessmentConfiguration = { inherit Foundation; }; + Automator = { inherit AppKit Cocoa Foundation OSAKit; }; + BackgroundTasks = { inherit Foundation; }; + BusinessChat = { inherit Cocoa Foundation; }; + CFNetwork = { inherit CoreFoundation; }; + CalendarStore = {}; + CallKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; + ClassKit = { inherit CoreGraphics Foundation; }; + CloudKit = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; + Cocoa = { inherit AppKit CoreData Foundation; }; + Collaboration = { inherit AppKit CoreServices Foundation; }; + ColorSync = { inherit CoreFoundation; }; + Combine = {}; + Contacts = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ContactsUI = { inherit AppKit; }; + CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; + CoreAudioKit = { inherit AppKit AudioUnit Cocoa Foundation; }; + CoreAudioTypes = { inherit CoreFoundation; }; + CoreBluetooth = { inherit Foundation; }; + CoreData = { inherit CloudKit Combine CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; + CoreDisplay = {}; + CoreFoundation = {}; + CoreGraphics = { inherit CoreFoundation IOKit; }; + CoreHaptics = { inherit Foundation; }; + CoreImage = { inherit ApplicationServices CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; + CoreLocation = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDI = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDIServer = {}; + CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; + CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + CoreMediaIO = { inherit CoreFoundation CoreMedia; }; + CoreMotion = { inherit Foundation; }; + CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; + CoreSpotlight = { inherit Foundation UniformTypeIdentifiers; }; + CoreTelephony = {}; + CoreText = { inherit CoreFoundation CoreGraphics; }; + CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; + CoreWLAN = { inherit Foundation IOKit; }; + CryptoKit = { inherit CoreFoundation CoreGraphics Foundation IOKit LocalAuthentication Security; }; + CryptoTokenKit = { inherit CoreFoundation CoreGraphics Foundation IOKit Security; }; + DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; + DeveloperToolsSupport = { inherit Foundation; }; + DeviceCheck = { inherit Foundation; }; + DirectoryService = { inherit CoreFoundation; }; + DiscRecording = { inherit CoreServices Foundation; }; + DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; + DiskArbitration = { inherit CoreFoundation IOKit; }; + DriverKit = {}; + EventKit = { inherit CoreGraphics CoreLocation Foundation; }; + ExceptionHandling = { inherit Foundation; }; + ExecutionPolicy = { inherit Foundation; }; + ExternalAccessory = { inherit Foundation; }; + FWAUserLib = { inherit IOKit; }; + FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + FileProviderUI = { inherit AppKit FileProvider Foundation; }; + FinderSync = { inherit AppKit Foundation; }; + ForceFeedback = { inherit CoreFoundation IOKit; }; + Foundation = { inherit ApplicationServices Combine CoreFoundation CoreGraphics CoreServices IOKit Security; }; + GLKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; + GLUT = { inherit OpenGL; }; + GSS = { inherit CoreFoundation; }; + GameController = { inherit AppKit Foundation IOKit; }; + GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; + GameplayKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; + HIDDriverKit = { inherit IOKit USBDriverKit; }; + Hypervisor = {}; + ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; + IMServicePlugIn = { inherit Foundation; }; + IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; + IOBluetoothUI = { inherit Cocoa IOBluetooth; }; + IOKit = { inherit CoreFoundation; }; + IOSurface = { inherit CoreFoundation Foundation IOKit; }; + IOUSBHost = { inherit Foundation IOKit; }; + IdentityLookup = { inherit Foundation; }; + ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; + ImageIO = { inherit CoreFoundation CoreGraphics; }; + InputMethodKit = { inherit Carbon Cocoa Foundation; }; + InstallerPlugins = {}; + InstantMessage = {}; + Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; + JavaNativeFoundation = { inherit Foundation; }; + JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; + JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; + Kerberos = {}; + Kernel = {}; + KernelManagement = { inherit Foundation; }; + LDAP = {}; + LatentSemanticMapping = { inherit Carbon CoreFoundation; }; + LinkPresentation = { inherit AppKit Foundation; }; + LocalAuthentication = { inherit Foundation; }; + MLCompute = { inherit CoreFoundation CoreGraphics Foundation IOKit Metal; }; + MapKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText QuartzCore; }; + MediaLibrary = { inherit Foundation; }; + MediaPlayer = { inherit AVFoundation CoreGraphics Foundation; }; + MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; + Message = {}; + Metal = { inherit CoreFoundation CoreGraphics Foundation IOKit IOSurface; }; + MetalKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal ModelIO QuartzCore simd; }; + MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; + MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; + MetricKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + MultipeerConnectivity = { inherit Cocoa Foundation; }; + NaturalLanguage = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + NearbyInteraction = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + NetFS = { inherit CoreFoundation; }; + Network = { inherit CoreFoundation Foundation Security; }; + NetworkExtension = { inherit Foundation Network Security; }; + NetworkingDriverKit = {}; + NotificationCenter = { inherit AppKit Foundation; }; + OSAKit = { inherit Carbon Cocoa; }; + OSLog = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + OpenAL = {}; + OpenCL = { inherit OpenGL; }; + OpenDirectory = { inherit CoreFoundation Foundation; }; + OpenGL = {}; + PCIDriverKit = { inherit IOKit; }; + PCSC = {}; + PDFKit = { inherit AppKit Cocoa; }; + ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; + PassKit = { inherit AppKit Contacts CoreGraphics Foundation; }; + PencilKit = { inherit AppKit CloudKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; + PhotosUI = { inherit AppKit Foundation MapKit Photos; }; + PreferencePanes = { inherit Cocoa; }; + PushKit = { inherit Foundation; }; + Python = { inherit Carbon; }; + QTKit = {}; + Quartz = { inherit AppKit ApplicationServices Cocoa Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLook; }; + QuartzCore = { inherit CoreFoundation CoreGraphics CoreImage CoreVideo Foundation IOKit Metal OpenGL; }; + QuickLook = { inherit ApplicationServices CoreFoundation; }; + QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; + RealityKit = { inherit AVFoundation AppKit AudioToolbox CloudKit Combine CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreText Foundation IOKit Metal MultipeerConnectivity QuartzCore simd; }; + ReplayKit = { inherit AVFoundation AppKit Foundation; }; + Ruby = {}; + SafariServices = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + SceneKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + ScreenSaver = { inherit AppKit Foundation; }; + ScreenTime = { inherit AppKit Foundation; }; + ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; + Security = { inherit CoreFoundation; }; + SecurityFoundation = { inherit Foundation Security; }; + SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; + SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; + ServiceManagement = { inherit CoreFoundation Security; }; + Social = { inherit AppKit Foundation; }; + SoundAnalysis = { inherit AVFoundation CoreML CoreMedia Foundation; }; + Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + SpriteKit = { inherit AppKit CloudKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + StoreKit = { inherit AppKit CoreGraphics Foundation; }; + SwiftUI = { inherit AppKit CloudKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreLocation DeveloperToolsSupport Foundation IOKit Metal QuartzCore UniformTypeIdentifiers; }; + SyncServices = {}; + System = {}; + SystemConfiguration = { inherit CoreFoundation Security; }; + SystemExtensions = { inherit Foundation; }; + TWAIN = {}; + Tcl = {}; + Tk = {}; + USBDriverKit = { inherit IOKit; }; + UniformTypeIdentifiers = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + UserNotifications = { inherit Foundation; }; + UserNotificationsUI = { inherit AppKit; }; + VideoDecodeAcceleration = {}; + VideoSubscriberAccount = { inherit Foundation; }; + VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; + Virtualization = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; + WebKit = { inherit AppKit CloudKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit JavaScriptCore Metal OpenGL QuartzCore; }; + WidgetKit = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit Intents SwiftUI; }; + iTunesLibrary = { inherit Foundation; }; + vmnet = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/fixups.nix new file mode 100644 index 0000000000000..c0b8593edb323 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/fixups.nix @@ -0,0 +1,102 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ + lib, + # macOS things + frameworks, + libnetwork, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + inherit (libs) libDER; + libobjc = objc4; + in + with frameworks; { + # Below this comment are entries migrated from before the generator was + # added. If, for a given framework, you are able to reverify the extra + # deps are really necessary on top of the generator deps, move it above + # this comment (and maybe document your findings). + AVFoundation = {inherit ApplicationServices AVFCapture AVFCore;}; + Accelerate = {inherit CoreWLAN IOBluetooth;}; + AddressBook = {inherit AddressBookCore ContactsPersistence libobjc;}; + AppKit = {inherit AudioToolbox AudioUnit UIFoundation;}; + AudioToolbox = {inherit AudioToolboxCore;}; + AudioUnit = {inherit Carbon CoreAudio;}; + Carbon = {inherit IOKit QuartzCore libobjc;}; + CoreAudio = {inherit IOKit;}; + CoreFoundation = {inherit libobjc;}; + CoreGraphics = {inherit SystemConfiguration;}; + CoreMIDIServer = {inherit CoreMIDI;}; + CoreMedia = {inherit ApplicationServices AudioToolbox AudioUnit;}; + CoreServices = {inherit CoreAudio NetFS ServiceManagement;}; + CoreWLAN = {inherit SecurityFoundation;}; + DiscRecording = {inherit IOKit libobjc;}; + Foundation = {inherit SystemConfiguration libobjc;}; + GameKit = {inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit;}; + ICADevices = {inherit Carbon libobjc;}; + IOBluetooth = {inherit CoreBluetooth;}; + JavaScriptCore = {inherit libobjc;}; + Kernel = {inherit IOKit;}; + LinkPresentation = {inherit URLFormatting;}; + MediaToolbox = {inherit AudioUnit;}; + MetricKit = {inherit SignpostMetrics;}; + Network = {inherit libnetwork;}; + PCSC = {inherit CoreData;}; + PassKit = {inherit PassKitCore;}; + QTKit = {inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox;}; + Quartz = {inherit QTKit;}; + QuartzCore = {inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc;}; + Security = {inherit IOKit libDER;}; + TWAIN = {inherit Carbon;}; + VideoDecodeAcceleration = {inherit CoreVideo;}; + WebKit = {inherit ApplicationServices Carbon libobjc;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = {}; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/private.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/private.nix new file mode 100644 index 0000000000000..128b5add51400 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/private.nix @@ -0,0 +1,31 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ objc4, frameworks }: +# generated by hand to avoid exposing all private frameworks +# frameworks here are only the necessary ones used by public frameworks. +{ + AVFCapture = {}; + AVFCore = {}; + AddressBookCore = { inherit (frameworks) ContactsPersistence; }; + AudioToolboxCore = {}; + ContactsPersistence = {}; + UIFoundation = {}; + GameCenterFoundation = {}; + GameCenterUI = {}; + GameCenterUICore = {}; + URLFormatting = {}; + SignpostMetrics = {}; + PassKitCore = {}; + SkyLight = {}; + + # Also expose CoreSymbolication; used by `root` package. + CoreSymbolication = {}; + + # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. + DebugSymbols = {}; + + # Also expose DisplayServices; used by `sketchybar` package. + DisplayServices = { libobjc = objc4; }; + + # Also expose MultitouchSupport; used by `chuck` package. + MultitouchSupport = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/public.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/public.nix new file mode 100644 index 0000000000000..db0d379d14445 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.1.0/public.nix @@ -0,0 +1,209 @@ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ + AGL = { inherit Carbon OpenGL; }; + AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; + AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; + AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; + Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + Accessibility = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Accounts = { inherit Foundation; }; + AdServices = { inherit Foundation; }; + AdSupport = { inherit Foundation; }; + AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; + AppKit = { inherit Accessibility ApplicationServices CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal OpenGL QuartzCore; }; + AppTrackingTransparency = { inherit Foundation; }; + AppleScriptKit = {}; + AppleScriptObjC = { inherit Foundation; }; + ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText ImageIO; }; + AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; + AudioUnit = { inherit AudioToolbox; }; + AudioVideoBridging = { inherit Foundation IOKit; }; + AuthenticationServices = { inherit AppKit Foundation; }; + AutomaticAssessmentConfiguration = { inherit Foundation; }; + Automator = { inherit AppKit Cocoa Foundation OSAKit; }; + BackgroundTasks = { inherit Foundation; }; + BusinessChat = { inherit Cocoa Foundation; }; + CFNetwork = { inherit CoreFoundation; }; + CHIP = { inherit Foundation Security; }; + CalendarStore = {}; + CallKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; + ClassKit = { inherit CoreGraphics Foundation; }; + CloudKit = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; + Cocoa = { inherit AppKit CoreData Foundation; }; + Collaboration = { inherit AppKit CoreServices Foundation; }; + ColorSync = { inherit CoreFoundation; }; + Combine = {}; + Contacts = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ContactsUI = { inherit AppKit; }; + CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; + CoreAudioKit = { inherit AppKit AudioUnit Cocoa Foundation; }; + CoreAudioTypes = { inherit CoreFoundation; }; + CoreBluetooth = { inherit Foundation; }; + CoreData = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit; }; + CoreDisplay = {}; + CoreFoundation = {}; + CoreGraphics = { inherit CoreFoundation IOKit; }; + CoreHaptics = { inherit Foundation; }; + CoreImage = { inherit ApplicationServices CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; + CoreLocation = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDI = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDIServer = {}; + CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; + CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + CoreMediaIO = { inherit CoreFoundation CoreMedia; }; + CoreMotion = { inherit Foundation; }; + CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; + CoreSpotlight = { inherit Foundation UniformTypeIdentifiers; }; + CoreTelephony = {}; + CoreText = { inherit CoreFoundation CoreGraphics; }; + CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; + CoreWLAN = { inherit Foundation IOKit; }; + CreateML = { inherit AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreML CoreMedia CoreServices CoreVideo Foundation IOKit ImageIO Metal MetalPerformanceShaders NaturalLanguage TabularData VideoToolbox Vision simd; }; + CryptoKit = { inherit CoreFoundation CoreGraphics Foundation IOKit LocalAuthentication Security; }; + CryptoTokenKit = { inherit CoreFoundation CoreGraphics Foundation IOKit Security; }; + DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; + DataDetection = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + DeveloperToolsSupport = {}; + DeviceActivity = { inherit Foundation ManagedSettings; }; + DeviceCheck = { inherit Foundation; }; + DirectoryService = { inherit CoreFoundation; }; + DiscRecording = { inherit CoreServices Foundation; }; + DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; + DiskArbitration = { inherit CoreFoundation IOKit; }; + DriverKit = {}; + EventKit = { inherit CoreGraphics CoreLocation Foundation; }; + ExceptionHandling = { inherit Foundation; }; + ExecutionPolicy = { inherit Foundation; }; + ExposureNotification = { inherit Foundation; }; + ExternalAccessory = { inherit Foundation; }; + FWAUserLib = { inherit IOKit; }; + FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + FileProviderUI = { inherit AppKit FileProvider Foundation; }; + FinderSync = { inherit AppKit Foundation; }; + ForceFeedback = { inherit CoreFoundation IOKit; }; + Foundation = { inherit Combine CoreFoundation CoreGraphics CoreServices IOKit Security; }; + GLKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; + GLUT = { inherit OpenGL; }; + GSS = { inherit CoreFoundation; }; + GameController = { inherit AppKit Foundation IOKit; }; + GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; + GameplayKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; + GroupActivities = { inherit AVFoundation Combine CoreGraphics CryptoKit Foundation Network; }; + Hypervisor = {}; + ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; + IMServicePlugIn = { inherit Foundation; }; + IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; + IOBluetoothUI = { inherit Cocoa IOBluetooth; }; + IOKit = { inherit CoreFoundation; }; + IOSurface = { inherit CoreFoundation Foundation IOKit; }; + IOUSBHost = { inherit Foundation IOKit; }; + IdentityLookup = { inherit Foundation; }; + ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; + ImageIO = { inherit CoreFoundation CoreGraphics; }; + InputMethodKit = { inherit Carbon Cocoa Foundation; }; + InstallerPlugins = {}; + InstantMessage = {}; + Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit UserNotifications; }; + IntentsUI = { inherit AppKit; }; + JavaNativeFoundation = { inherit Foundation; }; + JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; + JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; + Kerberos = {}; + Kernel = {}; + KernelManagement = { inherit Foundation; }; + LDAP = {}; + LatentSemanticMapping = { inherit Carbon CoreFoundation; }; + LinkPresentation = { inherit AppKit Foundation; }; + LocalAuthentication = { inherit Foundation; }; + LocalAuthenticationEmbeddedUI = { inherit AppKit Foundation LocalAuthentication; }; + MLCompute = { inherit CoreFoundation CoreGraphics Foundation IOKit Metal; }; + MailKit = { inherit AppKit Foundation; }; + ManagedSettings = { inherit Combine Foundation; }; + MapKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText; }; + MediaLibrary = { inherit Foundation; }; + MediaPlayer = { inherit AVFoundation CoreGraphics Foundation; }; + MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; + Message = {}; + Metal = { inherit CoreFoundation CoreGraphics Foundation IOKit IOSurface; }; + MetalKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO QuartzCore simd; }; + MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; + MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; + MetricKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + MultipeerConnectivity = { inherit Cocoa Foundation; }; + MusicKit = { inherit Combine CoreGraphics Foundation; }; + NaturalLanguage = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + NearbyInteraction = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + NetFS = { inherit CoreFoundation; }; + Network = { inherit CoreFoundation Foundation Security; }; + NetworkExtension = { inherit Foundation Network Security; }; + NotificationCenter = { inherit AppKit Foundation; }; + OSAKit = { inherit Carbon Cocoa; }; + OSLog = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + OpenAL = {}; + OpenCL = { inherit OpenGL; }; + OpenDirectory = { inherit CoreFoundation Foundation; }; + OpenGL = {}; + PCSC = {}; + PDFKit = { inherit AppKit Cocoa; }; + PHASE = { inherit AVFAudio AVFoundation CoreAudioTypes Foundation ModelIO simd; }; + ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; + PassKit = { inherit AppKit Contacts CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + PencilKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; + PhotosUI = { inherit AppKit Foundation MapKit Photos; }; + PreferencePanes = { inherit Cocoa; }; + PushKit = { inherit Foundation; }; + Python = { inherit Carbon; }; + QTKit = {}; + Quartz = { inherit AppKit ApplicationServices Cocoa Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLookUI; }; + QuartzCore = { inherit CoreFoundation CoreGraphics CoreImage CoreVideo Foundation IOKit Metal OpenGL; }; + QuickLook = { inherit ApplicationServices CoreFoundation; }; + QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; + QuickLookUI = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal PDFKit QuartzCore QuickLook UniformTypeIdentifiers; }; + RealityFoundation = { inherit AVFAudio AVFoundation AppKit AudioToolbox Combine CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreMotion CoreText CoreVideo Foundation IOKit Metal QuartzCore simd; }; + RealityKit = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal MultipeerConnectivity QuartzCore RealityFoundation simd; }; + ReplayKit = { inherit AVFoundation AppKit Foundation; }; + Ruby = {}; + SafariServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + SceneKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + ScreenSaver = { inherit AppKit Foundation; }; + ScreenTime = { inherit AppKit Foundation; }; + ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; + Security = { inherit CoreFoundation; }; + SecurityFoundation = { inherit Foundation Security; }; + SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; + SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; + ServiceManagement = { inherit CoreFoundation Security; }; + ShazamKit = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal MusicKit; }; + Social = { inherit AppKit Foundation; }; + SoundAnalysis = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreML CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + SpriteKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + StoreKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CryptoKit Foundation IOKit Metal QuartzCore Security; }; + SwiftUI = { inherit Accessibility AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage DeveloperToolsSupport Foundation IOKit Metal QuartzCore UniformTypeIdentifiers; }; + SyncServices = {}; + System = {}; + SystemConfiguration = { inherit CoreFoundation Security; }; + SystemExtensions = { inherit Foundation; }; + TWAIN = {}; + TabularData = { inherit Combine Foundation; }; + Tcl = {}; + Tk = {}; + UniformTypeIdentifiers = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + UserNotifications = { inherit Foundation; }; + UserNotificationsUI = { inherit AppKit; }; + VideoDecodeAcceleration = {}; + VideoSubscriberAccount = { inherit Foundation; }; + VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; + Virtualization = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; + WebKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit JavaScriptCore Metal OpenGL QuartzCore; }; + WidgetKit = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit Intents SwiftUI UniformTypeIdentifiers; }; + iTunesLibrary = { inherit Foundation; }; + vmnet = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/fixups.nix new file mode 100644 index 0000000000000..c0b8593edb323 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/fixups.nix @@ -0,0 +1,102 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ + lib, + # macOS things + frameworks, + libnetwork, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + inherit (libs) libDER; + libobjc = objc4; + in + with frameworks; { + # Below this comment are entries migrated from before the generator was + # added. If, for a given framework, you are able to reverify the extra + # deps are really necessary on top of the generator deps, move it above + # this comment (and maybe document your findings). + AVFoundation = {inherit ApplicationServices AVFCapture AVFCore;}; + Accelerate = {inherit CoreWLAN IOBluetooth;}; + AddressBook = {inherit AddressBookCore ContactsPersistence libobjc;}; + AppKit = {inherit AudioToolbox AudioUnit UIFoundation;}; + AudioToolbox = {inherit AudioToolboxCore;}; + AudioUnit = {inherit Carbon CoreAudio;}; + Carbon = {inherit IOKit QuartzCore libobjc;}; + CoreAudio = {inherit IOKit;}; + CoreFoundation = {inherit libobjc;}; + CoreGraphics = {inherit SystemConfiguration;}; + CoreMIDIServer = {inherit CoreMIDI;}; + CoreMedia = {inherit ApplicationServices AudioToolbox AudioUnit;}; + CoreServices = {inherit CoreAudio NetFS ServiceManagement;}; + CoreWLAN = {inherit SecurityFoundation;}; + DiscRecording = {inherit IOKit libobjc;}; + Foundation = {inherit SystemConfiguration libobjc;}; + GameKit = {inherit GameCenterFoundation GameCenterUI GameCenterUICore ReplayKit;}; + ICADevices = {inherit Carbon libobjc;}; + IOBluetooth = {inherit CoreBluetooth;}; + JavaScriptCore = {inherit libobjc;}; + Kernel = {inherit IOKit;}; + LinkPresentation = {inherit URLFormatting;}; + MediaToolbox = {inherit AudioUnit;}; + MetricKit = {inherit SignpostMetrics;}; + Network = {inherit libnetwork;}; + PCSC = {inherit CoreData;}; + PassKit = {inherit PassKitCore;}; + QTKit = {inherit CoreMedia CoreMediaIO MediaToolbox VideoToolbox;}; + Quartz = {inherit QTKit;}; + QuartzCore = {inherit ApplicationServices CoreImage CoreVideo Metal OpenCL libobjc;}; + Security = {inherit IOKit libDER;}; + TWAIN = {inherit Carbon;}; + VideoDecodeAcceleration = {inherit CoreVideo;}; + WebKit = {inherit ApplicationServices Carbon libobjc;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = {}; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/private.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/private.nix new file mode 100644 index 0000000000000..128b5add51400 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/private.nix @@ -0,0 +1,31 @@ +# TODO(@connorbaker): Copied from 11.0 -- should be regenerated. +{ objc4, frameworks }: +# generated by hand to avoid exposing all private frameworks +# frameworks here are only the necessary ones used by public frameworks. +{ + AVFCapture = {}; + AVFCore = {}; + AddressBookCore = { inherit (frameworks) ContactsPersistence; }; + AudioToolboxCore = {}; + ContactsPersistence = {}; + UIFoundation = {}; + GameCenterFoundation = {}; + GameCenterUI = {}; + GameCenterUICore = {}; + URLFormatting = {}; + SignpostMetrics = {}; + PassKitCore = {}; + SkyLight = {}; + + # Also expose CoreSymbolication; used by `root` package. + CoreSymbolication = {}; + + # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. + DebugSymbols = {}; + + # Also expose DisplayServices; used by `sketchybar` package. + DisplayServices = { libobjc = objc4; }; + + # Also expose MultitouchSupport; used by `chuck` package. + MultitouchSupport = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/public.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/public.nix new file mode 100644 index 0000000000000..4488c84bf1245 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/12.3.0/public.nix @@ -0,0 +1,209 @@ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ + AGL = { inherit Carbon OpenGL; }; + AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; + AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; + AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; + Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + Accessibility = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Accounts = { inherit Foundation; }; + AdServices = { inherit Foundation; }; + AdSupport = { inherit Foundation; }; + AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; + AppKit = { inherit Accessibility ApplicationServices CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal OpenGL QuartzCore; }; + AppTrackingTransparency = { inherit Foundation; }; + AppleScriptKit = {}; + AppleScriptObjC = { inherit Foundation; }; + ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText ImageIO; }; + AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; + AudioUnit = { inherit AudioToolbox; }; + AudioVideoBridging = { inherit Foundation IOKit; }; + AuthenticationServices = { inherit AppKit Foundation; }; + AutomaticAssessmentConfiguration = { inherit Foundation; }; + Automator = { inherit AppKit Cocoa Foundation OSAKit; }; + BackgroundTasks = { inherit Foundation; }; + BusinessChat = { inherit Cocoa Foundation; }; + CFNetwork = { inherit CoreFoundation; }; + CHIP = { inherit Foundation Security; }; + CalendarStore = {}; + CallKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; + ClassKit = { inherit CoreGraphics Foundation; }; + CloudKit = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit; }; + Cocoa = { inherit AppKit CoreData Foundation; }; + Collaboration = { inherit AppKit CoreServices Foundation; }; + ColorSync = { inherit CoreFoundation; }; + Combine = {}; + Contacts = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ContactsUI = { inherit AppKit; }; + CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; + CoreAudioKit = { inherit AppKit AudioUnit Cocoa Foundation; }; + CoreAudioTypes = { inherit CoreFoundation; }; + CoreBluetooth = { inherit Foundation; }; + CoreData = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit; }; + CoreDisplay = {}; + CoreFoundation = {}; + CoreGraphics = { inherit CoreFoundation IOKit; }; + CoreHaptics = { inherit Foundation; }; + CoreImage = { inherit ApplicationServices CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; + CoreLocation = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDI = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + CoreMIDIServer = {}; + CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; + CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + CoreMediaIO = { inherit CoreAudio CoreFoundation CoreGraphics CoreMedia Foundation IOKit Metal; }; + CoreMotion = { inherit Foundation; }; + CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; + CoreSpotlight = { inherit Foundation UniformTypeIdentifiers; }; + CoreTelephony = {}; + CoreText = { inherit CoreFoundation CoreGraphics; }; + CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; + CoreWLAN = { inherit Foundation IOKit; }; + CreateML = { inherit AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreML CoreMedia CoreServices CoreVideo Foundation IOKit ImageIO Metal MetalPerformanceShaders NaturalLanguage TabularData VideoToolbox Vision simd; }; + CryptoKit = { inherit CoreFoundation CoreGraphics Foundation IOKit LocalAuthentication Security; }; + CryptoTokenKit = { inherit CoreFoundation CoreGraphics Foundation IOKit Security; }; + DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; + DataDetection = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + DeveloperToolsSupport = {}; + DeviceActivity = { inherit Foundation ManagedSettings; }; + DeviceCheck = { inherit Foundation; }; + DirectoryService = { inherit CoreFoundation; }; + DiscRecording = { inherit CoreServices Foundation; }; + DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; + DiskArbitration = { inherit CoreFoundation IOKit; }; + DriverKit = {}; + EventKit = { inherit CoreGraphics CoreLocation Foundation; }; + ExceptionHandling = { inherit Foundation; }; + ExecutionPolicy = { inherit Foundation; }; + ExposureNotification = { inherit Foundation; }; + ExternalAccessory = { inherit Foundation; }; + FWAUserLib = { inherit IOKit; }; + FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + FileProviderUI = { inherit AppKit FileProvider Foundation; }; + FinderSync = { inherit AppKit Foundation; }; + ForceFeedback = { inherit CoreFoundation IOKit; }; + Foundation = { inherit Combine CoreFoundation CoreGraphics CoreServices IOKit Security; }; + GLKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; + GLUT = { inherit OpenGL; }; + GSS = { inherit CoreFoundation; }; + GameController = { inherit AppKit Foundation IOKit; }; + GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; + GameplayKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; + GroupActivities = { inherit AVFoundation Combine CoreGraphics CryptoKit Foundation Network UniformTypeIdentifiers; }; + Hypervisor = {}; + ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; + IMServicePlugIn = { inherit Foundation; }; + IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; + IOBluetoothUI = { inherit Cocoa IOBluetooth; }; + IOKit = { inherit CoreFoundation; }; + IOSurface = { inherit CoreFoundation Foundation IOKit; }; + IOUSBHost = { inherit Foundation IOKit; }; + IdentityLookup = { inherit Foundation; }; + ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; + ImageIO = { inherit CoreFoundation CoreGraphics; }; + InputMethodKit = { inherit Carbon Cocoa Foundation; }; + InstallerPlugins = {}; + InstantMessage = {}; + Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit UserNotifications; }; + IntentsUI = { inherit AppKit; }; + JavaNativeFoundation = { inherit Foundation; }; + JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; + JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; + Kerberos = {}; + Kernel = {}; + KernelManagement = { inherit Foundation; }; + LDAP = {}; + LatentSemanticMapping = { inherit Carbon CoreFoundation; }; + LinkPresentation = { inherit AppKit Foundation; }; + LocalAuthentication = { inherit Foundation; }; + LocalAuthenticationEmbeddedUI = { inherit AppKit Foundation LocalAuthentication; }; + MLCompute = { inherit CoreFoundation CoreGraphics Foundation IOKit Metal; }; + MailKit = { inherit AppKit Foundation; }; + ManagedSettings = { inherit Combine Foundation; }; + MapKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText; }; + MediaLibrary = { inherit Foundation; }; + MediaPlayer = { inherit AVFoundation CoreGraphics Foundation; }; + MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; + Message = {}; + Metal = { inherit CoreFoundation CoreGraphics Foundation IOKit IOSurface; }; + MetalKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO QuartzCore simd; }; + MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; + MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; + MetricKit = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + MultipeerConnectivity = { inherit Cocoa Foundation; }; + MusicKit = { inherit Combine CoreGraphics Foundation; }; + NaturalLanguage = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + NearbyInteraction = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + NetFS = { inherit CoreFoundation; }; + Network = { inherit CoreFoundation Foundation Security; }; + NetworkExtension = { inherit Foundation Network Security; }; + NotificationCenter = { inherit AppKit Foundation; }; + OSAKit = { inherit Carbon Cocoa; }; + OSLog = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + OpenAL = {}; + OpenCL = { inherit OpenGL; }; + OpenDirectory = { inherit CoreFoundation Foundation; }; + OpenGL = {}; + PCSC = {}; + PDFKit = { inherit AppKit Cocoa; }; + PHASE = { inherit AVFAudio AVFoundation CoreAudioTypes Foundation ModelIO simd; }; + ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; + PassKit = { inherit AppKit Contacts CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + PencilKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; + PhotosUI = { inherit AppKit Foundation MapKit Photos; }; + PreferencePanes = { inherit Cocoa; }; + PushKit = { inherit Foundation; }; + QTKit = {}; + Quartz = { inherit AppKit ApplicationServices Cocoa Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLookUI; }; + QuartzCore = { inherit CoreFoundation CoreGraphics CoreImage CoreVideo Foundation IOKit Metal OpenGL; }; + QuickLook = { inherit ApplicationServices CoreFoundation; }; + QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; + QuickLookUI = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal PDFKit QuartzCore QuickLook UniformTypeIdentifiers; }; + RealityFoundation = { inherit AVFAudio AVFoundation AppKit AudioToolbox Combine CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreMotion CoreText CoreVideo Foundation IOKit Metal QuartzCore simd; }; + RealityKit = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal MultipeerConnectivity QuartzCore RealityFoundation simd; }; + ReplayKit = { inherit AVFoundation AppKit Foundation; }; + Ruby = {}; + SafariServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + SceneKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + ScreenCaptureKit = { inherit AppKit CoreGraphics CoreMedia Foundation; }; + ScreenSaver = { inherit AppKit Foundation; }; + ScreenTime = { inherit AppKit Foundation; }; + ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; + Security = { inherit CoreFoundation; }; + SecurityFoundation = { inherit Foundation Security; }; + SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; + SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; + ServiceManagement = { inherit CoreFoundation Security; }; + ShazamKit = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal MusicKit; }; + Social = { inherit AppKit Foundation; }; + SoundAnalysis = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreML CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + SpriteKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + StoreKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CryptoKit Foundation IOKit Metal QuartzCore Security; }; + SwiftUI = { inherit Accessibility AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage DeveloperToolsSupport Foundation IOKit Metal QuartzCore UniformTypeIdentifiers; }; + SyncServices = {}; + System = {}; + SystemConfiguration = { inherit CoreFoundation Security; }; + SystemExtensions = { inherit Foundation; }; + TWAIN = {}; + TabularData = { inherit Combine Foundation; }; + Tcl = {}; + Tk = {}; + UniformTypeIdentifiers = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + UserNotifications = { inherit Foundation; }; + UserNotificationsUI = { inherit AppKit; }; + VideoDecodeAcceleration = {}; + VideoSubscriberAccount = { inherit Foundation; }; + VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; + Virtualization = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; + WebKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit JavaScriptCore Metal QuartzCore; }; + WidgetKit = { inherit Combine CoreFoundation CoreGraphics Foundation IOKit Intents SwiftUI UniformTypeIdentifiers; }; + iTunesLibrary = { inherit Foundation; }; + vmnet = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/fixups.nix new file mode 100644 index 0000000000000..693ded1eca593 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/fixups.nix @@ -0,0 +1,72 @@ +# TODO(@connorbaker): Copied from 13.3 -- should be regenerated. +{ + cups, + lib, + # macOS things + frameworks, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + libobjc = objc4; + in + with frameworks; { + AppKit = {inherit CollectionViewCore UIFoundation;}; + ApplicationServices = {inherit cups;}; + AudioToolbox = {inherit AudioToolboxCore;}; + CoreFoundation = {inherit libobjc;}; + Foundation = {inherit libobjc;}; + QuartzCore = {inherit CoreImage libobjc;}; + Security = {inherit (libs) libDER;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = with frameworks; { + ServiceManagement = {inherit Foundation;}; + }; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/private.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/private.nix new file mode 100644 index 0000000000000..24e5353bbe4b6 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/private.nix @@ -0,0 +1,17 @@ +# TODO(@connorbaker): Copied from 13.3 -- should be regenerated. +# generated by hand to avoid exposing all private frameworks +# frameworks here are only the necessary ones used by public frameworks. +# To find these, @connorbaker built packages depending on public frameworks +# and added the missing frameworks to this list. +{}: +# NOTE: Must be a function so we can use callPackage in `default.nix` +{ + AudioToolboxCore = {}; # AudioToolbox + CollectionViewCore = {}; # AppKit + CoreSymbolication = {}; # hepmc3 + DebugSymbols = {}; # llvmPackages_8.lldb + DisplayServices = {}; # macchina + MultitouchSupport = {}; # chuck + SkyLight = {}; # spacebar + UIFoundation = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/public.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/public.nix new file mode 100644 index 0000000000000..307cd838d355e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.1.0/public.nix @@ -0,0 +1,227 @@ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ + AGL = { inherit Carbon OpenGL; }; + AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; + AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; + AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; + AVRouting = { inherit Foundation Network; }; + Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal simd; }; + Accessibility = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Accounts = { inherit Foundation; }; + AdServices = { inherit Foundation; }; + AdSupport = { inherit Foundation; }; + AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; + AppIntents = { inherit CoreFoundation CoreGraphics CoreLocation ExtensionFoundation Foundation IOKit UniformTypeIdentifiers; }; + AppKit = { inherit Accessibility ApplicationServices CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal OpenGL QuartzCore; }; + AppTrackingTransparency = { inherit Foundation; }; + AppleScriptKit = {}; + AppleScriptObjC = { inherit Foundation; }; + ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText Foundation ImageIO; }; + AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; + AudioUnit = { inherit AudioToolbox; }; + AudioVideoBridging = { inherit Foundation IOKit; }; + AuthenticationServices = { inherit AppKit Foundation Security; }; + AutomaticAssessmentConfiguration = { inherit Foundation; }; + Automator = { inherit AppKit Cocoa Foundation OSAKit; }; + BackgroundAssets = { inherit CoreFoundation ExtensionFoundation Foundation IOKit; }; + BackgroundTasks = { inherit Foundation; }; + BusinessChat = { inherit Cocoa Foundation; }; + CFNetwork = { inherit CoreFoundation; }; + CalendarStore = {}; + CallKit = { inherit CoreFoundation Foundation IOKit; }; + Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; + Charts = { inherit Foundation SwiftUI; }; + ClassKit = { inherit CoreGraphics Foundation; }; + CloudKit = { inherit AVFoundation CoreFoundation CoreLocation CoreTransferable Foundation IOKit UniformTypeIdentifiers; }; + Cocoa = { inherit AppKit CoreData Foundation; }; + Collaboration = { inherit AppKit CoreServices Foundation; }; + ColorSync = { inherit CoreFoundation; }; + Combine = {}; + Contacts = { inherit CoreFoundation Foundation IOKit; }; + ContactsUI = { inherit AppKit; }; + CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; + CoreAudioKit = { inherit AVFAudio AVFoundation AppKit AudioUnit Cocoa CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore; }; + CoreAudioTypes = { inherit CoreFoundation; }; + CoreBluetooth = { inherit Foundation; }; + CoreData = { inherit Combine CoreFoundation Foundation IOKit; }; + CoreDisplay = {}; + CoreFoundation = {}; + CoreGraphics = { inherit CoreFoundation IOKit; }; + CoreHaptics = { inherit Foundation; }; + CoreImage = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; + CoreLocation = { inherit CoreFoundation Foundation IOKit; }; + CoreMIDI = { inherit CoreFoundation Foundation IOKit; }; + CoreMIDIServer = {}; + CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; + CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + CoreMediaIO = { inherit CoreAudio CoreFoundation CoreGraphics CoreMedia Foundation IOKit Metal; }; + CoreMotion = { inherit Foundation; }; + CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; + CoreSpotlight = { inherit CoreFoundation Foundation IOKit UniformTypeIdentifiers; }; + CoreTelephony = { inherit CoreFoundation Foundation; }; + CoreText = { inherit CoreFoundation CoreGraphics; }; + CoreTransferable = { inherit Combine CoreFoundation Foundation IOKit UniformTypeIdentifiers; }; + CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; + CoreWLAN = { inherit Foundation IOKit; }; + CreateML = { inherit AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal MetalPerformanceShaders NaturalLanguage TabularData UniformTypeIdentifiers VideoToolbox Vision simd; }; + CreateMLComponents = { inherit AVFAudio AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreML CoreMedia CoreVideo Foundation IOKit Metal SoundAnalysis TabularData UniformTypeIdentifiers Vision; }; + CryptoKit = { inherit CoreFoundation Foundation IOKit LocalAuthentication Security; }; + CryptoTokenKit = { inherit CoreFoundation Foundation IOKit Security; }; + DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; + DataDetection = { inherit CoreFoundation Foundation IOKit; }; + DeveloperToolsSupport = {}; + DeviceActivity = { inherit Foundation ManagedSettings; }; + DeviceCheck = { inherit Foundation; }; + DirectoryService = { inherit CoreFoundation; }; + DiscRecording = { inherit CoreServices Foundation; }; + DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; + DiskArbitration = { inherit CoreFoundation IOKit; }; + DriverKit = {}; + EventKit = { inherit CoreGraphics CoreLocation Foundation; }; + ExceptionHandling = { inherit Foundation; }; + ExecutionPolicy = { inherit Foundation; }; + ExposureNotification = { inherit Foundation; }; + ExtensionFoundation = { inherit Foundation; }; + ExtensionKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage ExtensionFoundation Foundation IOKit Metal OSLog QuartzCore SwiftUI; }; + ExternalAccessory = { inherit Foundation; }; + FamilyControls = { inherit Combine CoreFoundation CoreServices Foundation IOKit; }; + FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + FileProviderUI = { inherit AppKit FileProvider Foundation; }; + FinderSync = { inherit AppKit Foundation; }; + ForceFeedback = { inherit CoreFoundation IOKit; }; + Foundation = { inherit Combine CoreFoundation CoreServices IOKit Security; }; + GLKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; + GLUT = { inherit OpenGL; }; + GSS = { inherit CoreFoundation; }; + GameController = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; + GameplayKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; + GroupActivities = { inherit AVFoundation CloudKit Combine CoreGraphics CryptoKit Foundation Network UniformTypeIdentifiers; }; + HealthKit = { inherit CoreFoundation CoreLocation Foundation IOKit UniformTypeIdentifiers; }; + Hypervisor = {}; + ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; + IMServicePlugIn = { inherit Foundation; }; + IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; + IOBluetoothUI = { inherit Cocoa IOBluetooth; }; + IOKit = { inherit CoreFoundation; }; + IOSurface = { inherit CoreFoundation Foundation IOKit; }; + IOUSBHost = { inherit Foundation IOKit; }; + IdentityLookup = { inherit Foundation; }; + ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; + ImageIO = { inherit CoreFoundation CoreGraphics; }; + InputMethodKit = { inherit Carbon Cocoa Foundation; }; + InstallerPlugins = {}; + InstantMessage = {}; + Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit UserNotifications; }; + IntentsUI = { inherit AppKit Intents; }; + JavaNativeFoundation = { inherit Foundation; }; + JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; + JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; + Kerberos = {}; + Kernel = {}; + KernelManagement = { inherit Foundation; }; + LDAP = {}; + LatentSemanticMapping = { inherit Carbon CoreFoundation; }; + LinkPresentation = { inherit AppKit Foundation; }; + LocalAuthentication = { inherit Foundation Security; }; + LocalAuthenticationEmbeddedUI = { inherit AppKit Foundation LocalAuthentication; }; + MLCompute = { inherit CoreFoundation Foundation IOKit Metal; }; + MailKit = { inherit AppKit Foundation; }; + ManagedSettings = { inherit Combine Foundation; }; + MapKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + Matter = { inherit Foundation Security; }; + MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText; }; + MediaLibrary = { inherit Foundation; }; + MediaPlayer = { inherit AVFoundation CoreGraphics CoreMedia Foundation; }; + MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; + Message = {}; + Metal = { inherit CoreFoundation Foundation IOKit IOSurface; }; + MetalFX = { inherit Metal; }; + MetalKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO QuartzCore simd; }; + MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; + MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; + MetricKit = { inherit CoreFoundation Foundation IOKit; }; + ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + MultipeerConnectivity = { inherit Cocoa Foundation; }; + MusicKit = { inherit Combine CoreGraphics Foundation; }; + NaturalLanguage = { inherit CoreFoundation Foundation IOKit; }; + NearbyInteraction = { inherit CoreFoundation Foundation IOKit simd; }; + NetFS = { inherit CoreFoundation; }; + Network = { inherit CoreFoundation Foundation Security; }; + NetworkExtension = { inherit Foundation Network Security; }; + NotificationCenter = { inherit AppKit Foundation; }; + OSAKit = { inherit Carbon Cocoa; }; + OSLog = { inherit CoreFoundation Foundation IOKit; }; + OpenAL = {}; + OpenCL = { inherit OpenGL; }; + OpenDirectory = { inherit CoreFoundation Foundation; }; + OpenGL = {}; + PCSC = {}; + PDFKit = { inherit AppKit Cocoa; }; + PHASE = { inherit AVFAudio AVFoundation CoreAudioTypes Foundation ModelIO simd; }; + ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; + PassKit = { inherit AppKit Contacts CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + PencilKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; + PhotosUI = { inherit AVFoundation AppKit CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit MapKit Metal Photos QuartzCore UniformTypeIdentifiers simd; }; + PreferencePanes = { inherit Cocoa; }; + PushKit = { inherit Foundation; }; + PushToTalk = {}; + QTKit = {}; + Quartz = { inherit AppKit ApplicationServices Cocoa CoreImage Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLookUI; }; + QuartzCore = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal OpenGL; }; + QuickLook = { inherit ApplicationServices CoreFoundation; }; + QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; + QuickLookUI = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal PDFKit QuartzCore QuickLook UniformTypeIdentifiers; }; + RealityFoundation = { inherit AVFAudio AVFoundation Accessibility AppKit AudioToolbox Combine CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreMotion CoreText CoreVideo Foundation IOKit Metal QuartzCore simd; }; + RealityKit = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal MultipeerConnectivity QuartzCore RealityFoundation simd; }; + ReplayKit = { inherit AVFoundation AppKit Foundation; }; + Ruby = {}; + SafariServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + SafetyKit = { inherit CoreLocation Foundation; }; + SceneKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + ScreenCaptureKit = { inherit AppKit CoreGraphics CoreMedia Foundation; }; + ScreenSaver = { inherit AppKit Foundation; }; + ScreenTime = { inherit AppKit Foundation; }; + ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; + Security = { inherit CoreFoundation; }; + SecurityFoundation = { inherit Foundation Security; }; + SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; + SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; + ServiceManagement = { inherit CoreFoundation Foundation Security; }; + SharedWithYou = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreTransferable Foundation IOKit Metal OSLog QuartzCore SharedWithYouCore SwiftUI UniformTypeIdentifiers; }; + SharedWithYouCore = { inherit CoreFoundation Foundation IOKit; }; + ShazamKit = { inherit AVFAudio AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal MusicKit QuartzCore UniformTypeIdentifiers simd; }; + Social = { inherit AppKit Foundation; }; + SoundAnalysis = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreML CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + SpriteKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + StoreKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CryptoKit Foundation IOKit Metal QuartzCore Security; }; + SwiftUI = { inherit Accessibility AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreTransferable DeveloperToolsSupport Foundation IOKit Metal OSLog QuartzCore UniformTypeIdentifiers; }; + SyncServices = {}; + System = {}; + SystemConfiguration = { inherit CoreFoundation Security; }; + SystemExtensions = { inherit Foundation; }; + TWAIN = {}; + TabularData = { inherit Combine Foundation; }; + Tcl = {}; + ThreadNetwork = { inherit Foundation; }; + Tk = {}; + UniformTypeIdentifiers = { inherit CoreFoundation Foundation IOKit; }; + UserNotifications = { inherit Foundation; }; + UserNotificationsUI = { inherit AppKit; }; + VideoDecodeAcceleration = {}; + VideoSubscriberAccount = { inherit Foundation; }; + VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; + Virtualization = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; + VisionKit = { inherit AppKit Foundation; }; + WeatherKit = { inherit CoreLocation Foundation; }; + WebKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit JavaScriptCore Metal QuartzCore; }; + WidgetKit = { inherit Combine CoreFoundation Foundation IOKit Intents SwiftUI; }; + iTunesLibrary = { inherit Foundation; }; + vecLib = {}; + vmnet = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/fixups.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/fixups.nix new file mode 100644 index 0000000000000..252a200f5b477 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/fixups.nix @@ -0,0 +1,71 @@ +{ + cups, + lib, + # macOS things + frameworks, + libs, + MacOSX-SDK, + objc4, +}: { + # Used to add dependencies which are not picked up by gen-frameworks.py. + # Some of these are simply private frameworks the generator does not see. + # Trial and error, building things and adding dependencies when they fail. + addToFrameworks = let + libobjc = objc4; + in + with frameworks; { + AppKit = {inherit CollectionViewCore UIFoundation;}; + ApplicationServices = {inherit cups;}; + AudioToolbox = {inherit AudioToolboxCore;}; + CoreFoundation = {inherit libobjc;}; + Foundation = {inherit libobjc;}; + QuartzCore = {inherit CoreImage libobjc;}; + Security = {inherit (libs) libDER;}; + }; + + # Used to remove dependencies which are picked up by gen-frameworks.py -- used mainly to break + # cyclic dependencies. + removeFromFrameworks = with frameworks; { + ServiceManagement = {inherit Foundation;}; + }; + + # Overrides for framework derivations. + overrideFrameworks = super: { + CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: { + setupHook = ../scripts/forceLinkCoreFoundationFramework.sh; + }); + + # This framework doesn't exist in newer SDKs (somewhere around 10.13), but + # there are references to it in nixpkgs. + QuickTime = throw "QuickTime framework not available"; + + # Seems to be appropriate given https://developer.apple.com/forums/thread/666686 + JavaVM = super.JavaNativeFoundation; + + CoreVideo = lib.overrideDerivation super.CoreVideo (drv: { + installPhase = + drv.installPhase + + '' + # When used as a module, complains about a missing import for + # Darwin.C.stdint. Apparently fixed in later SDKs. + awk -i inplace '/CFBase.h/ { print "#include " } { print }' \ + $out/Library/Frameworks/CoreVideo.framework/Headers/CVBase.h + ''; + }); + + System = lib.overrideDerivation super.System (drv: { + installPhase = + drv.installPhase + + '' + # Contrarily to the other frameworks, System framework's TBD file + # is a symlink pointing to ${MacOSX-SDK}/usr/lib/libSystem.B.tbd. + # This produces an error when installing the framework as: + # 1. The original file is not copied into the output directory + # 2. Even if it was copied, the relative path wouldn't match + # Thus, it is easier to replace the file than to fix the symlink. + cp --remove-destination ${MacOSX-SDK}/usr/lib/libSystem.B.tbd \ + $out/Library/Frameworks/System.framework/Versions/B/System.tbd + ''; + }); + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/private.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/private.nix new file mode 100644 index 0000000000000..6b18dd854eebc --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/private.nix @@ -0,0 +1,16 @@ +# generated by hand to avoid exposing all private frameworks +# frameworks here are only the necessary ones used by public frameworks. +# To find these, @connorbaker built packages depending on public frameworks +# and added the missing frameworks to this list. +{}: +# NOTE: Must be a function so we can use callPackage in `default.nix` +{ + AudioToolboxCore = {}; # AudioToolbox + CollectionViewCore = {}; # AppKit + CoreSymbolication = {}; # hepmc3 + DebugSymbols = {}; # llvmPackages_8.lldb + DisplayServices = {}; # macchina + MultitouchSupport = {}; # chuck + SkyLight = {}; # spacebar + UIFoundation = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/public.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/public.nix new file mode 100644 index 0000000000000..e8a3d50f6e706 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/13.3.0/public.nix @@ -0,0 +1,228 @@ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ + AGL = { inherit Carbon OpenGL; }; + AVFAudio = { inherit AudioToolbox CoreAudioTypes CoreMIDI CoreMedia Foundation; }; + AVFoundation = { inherit AVFAudio CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreVideo Foundation IOKit ImageIO MediaToolbox Metal QuartzCore UniformTypeIdentifiers simd; }; + AVKit = { inherit AVFoundation AppKit Cocoa Foundation; }; + AVRouting = { inherit Foundation Network; }; + Accelerate = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal simd; }; + Accessibility = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + Accounts = { inherit Foundation; }; + AdServices = { inherit Foundation; }; + AdSupport = { inherit Foundation; }; + AddressBook = { inherit Carbon Cocoa CoreFoundation Foundation; }; + AppIntents = { inherit CoreFoundation CoreGraphics CoreLocation ExtensionFoundation Foundation IOKit UniformTypeIdentifiers; }; + AppKit = { inherit Accessibility ApplicationServices CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal OpenGL QuartzCore; }; + AppTrackingTransparency = { inherit Foundation; }; + AppleScriptKit = {}; + AppleScriptObjC = { inherit Foundation; }; + ApplicationServices = { inherit ColorSync CoreFoundation CoreGraphics CoreServices CoreText Foundation ImageIO; }; + AudioToolbox = { inherit Carbon CoreAudio CoreAudioTypes CoreFoundation CoreMIDI Foundation; }; + AudioUnit = { inherit AudioToolbox; }; + AudioVideoBridging = { inherit Foundation IOKit; }; + AuthenticationServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore Security; }; + AutomaticAssessmentConfiguration = { inherit Foundation; }; + Automator = { inherit AppKit Cocoa Foundation OSAKit; }; + BackgroundAssets = { inherit CoreFoundation ExtensionFoundation Foundation IOKit; }; + BackgroundTasks = { inherit Foundation; }; + BusinessChat = { inherit Cocoa Foundation; }; + CFNetwork = { inherit CoreFoundation; }; + CalendarStore = {}; + CallKit = { inherit CoreFoundation Foundation IOKit; }; + CarKey = { inherit Foundation; }; + Carbon = { inherit ApplicationServices CoreServices Foundation Security; }; + Charts = { inherit Foundation SwiftUI; }; + ClassKit = { inherit CoreGraphics Foundation; }; + CloudKit = { inherit AVFoundation CoreFoundation CoreLocation CoreTransferable Foundation IOKit UniformTypeIdentifiers; }; + Cocoa = { inherit AppKit CoreData Foundation; }; + Collaboration = { inherit AppKit CoreServices Foundation; }; + ColorSync = { inherit CoreFoundation; }; + Combine = {}; + Contacts = { inherit CoreFoundation Foundation IOKit; }; + ContactsUI = { inherit AppKit; }; + CoreAudio = { inherit CoreAudioTypes CoreFoundation; }; + CoreAudioKit = { inherit AVFAudio AVFoundation AppKit AudioUnit Cocoa CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore; }; + CoreAudioTypes = { inherit CoreFoundation; }; + CoreBluetooth = { inherit Foundation; }; + CoreData = { inherit Combine CoreFoundation Foundation IOKit; }; + CoreDisplay = {}; + CoreFoundation = {}; + CoreGraphics = { inherit CoreFoundation IOKit; }; + CoreHaptics = { inherit Foundation; }; + CoreImage = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit IOSurface ImageIO Metal OpenGL; }; + CoreLocation = { inherit CoreFoundation Foundation IOKit; }; + CoreMIDI = { inherit CoreFoundation Foundation IOKit; }; + CoreMIDIServer = {}; + CoreML = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit ImageIO Metal; }; + CoreMedia = { inherit CoreAudio CoreAudioTypes CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal; }; + CoreMediaIO = { inherit CoreAudio CoreFoundation CoreGraphics CoreMedia Foundation IOKit Metal; }; + CoreMotion = { inherit Foundation; }; + CoreServices = { inherit CFNetwork CoreFoundation DiskArbitration Security; }; + CoreSpotlight = { inherit CoreFoundation Foundation IOKit UniformTypeIdentifiers; }; + CoreTelephony = { inherit CoreFoundation Foundation; }; + CoreText = { inherit CoreFoundation CoreGraphics; }; + CoreTransferable = { inherit Combine CoreFoundation Foundation IOKit UniformTypeIdentifiers; }; + CoreVideo = { inherit ApplicationServices CoreFoundation CoreGraphics IOSurface Metal OpenGL; }; + CoreWLAN = { inherit Foundation IOKit; }; + CreateML = { inherit AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal MetalPerformanceShaders NaturalLanguage TabularData UniformTypeIdentifiers VideoToolbox Vision simd; }; + CreateMLComponents = { inherit AVFAudio AVFoundation Combine CoreAudio CoreFoundation CoreGraphics CoreImage CoreMIDI CoreML CoreMedia CoreVideo Foundation IOKit Metal SoundAnalysis TabularData UniformTypeIdentifiers Vision; }; + CryptoKit = { inherit CoreFoundation Foundation IOKit LocalAuthentication Security; }; + CryptoTokenKit = { inherit CoreFoundation Foundation IOKit Security; }; + DVDPlayback = { inherit ApplicationServices CoreFoundation Security; }; + DataDetection = { inherit CoreFoundation Foundation IOKit; }; + DeveloperToolsSupport = {}; + DeviceActivity = { inherit Foundation ManagedSettings; }; + DeviceCheck = { inherit Foundation; }; + DirectoryService = { inherit CoreFoundation; }; + DiscRecording = { inherit CoreServices Foundation; }; + DiscRecordingUI = { inherit Carbon Cocoa DiscRecording; }; + DiskArbitration = { inherit CoreFoundation IOKit; }; + DriverKit = {}; + EventKit = { inherit CoreGraphics CoreLocation Foundation; }; + ExceptionHandling = { inherit Foundation; }; + ExecutionPolicy = { inherit Foundation; }; + ExposureNotification = { inherit Foundation; }; + ExtensionFoundation = { inherit Foundation; }; + ExtensionKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage ExtensionFoundation Foundation IOKit Metal OSLog QuartzCore SwiftUI; }; + ExternalAccessory = { inherit Foundation; }; + FamilyControls = { inherit Combine CoreFoundation CoreServices Foundation IOKit; }; + FileProvider = { inherit CoreFoundation CoreGraphics Foundation IOKit; }; + FileProviderUI = { inherit AppKit FileProvider Foundation; }; + FinderSync = { inherit AppKit Foundation; }; + ForceFeedback = { inherit CoreFoundation IOKit; }; + Foundation = { inherit Combine CoreFoundation CoreServices IOKit Security; }; + GLKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO OpenGL QuartzCore simd; }; + GLUT = { inherit OpenGL; }; + GSS = { inherit CoreFoundation; }; + GameController = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + GameKit = { inherit AppKit Cocoa Contacts CoreGraphics Foundation GameController GameplayKit Metal MetalKit ModelIO SceneKit SpriteKit simd; }; + GameplayKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore SceneKit SpriteKit simd; }; + GroupActivities = { inherit AVFoundation CloudKit Combine CoreGraphics CryptoKit Foundation Network UniformTypeIdentifiers; }; + HealthKit = { inherit CoreFoundation CoreLocation Foundation IOKit UniformTypeIdentifiers; }; + Hypervisor = {}; + ICADevices = { inherit CoreFoundation CoreGraphics CoreServices IOBluetooth; }; + IMServicePlugIn = { inherit Foundation; }; + IOBluetooth = { inherit CoreAudio CoreFoundation CoreServices Foundation IOKit; }; + IOBluetoothUI = { inherit Cocoa IOBluetooth; }; + IOKit = { inherit CoreFoundation; }; + IOSurface = { inherit CoreFoundation Foundation IOKit; }; + IOUSBHost = { inherit Foundation IOKit; }; + IdentityLookup = { inherit Foundation; }; + ImageCaptureCore = { inherit Cocoa CoreGraphics Foundation; }; + ImageIO = { inherit CoreFoundation CoreGraphics; }; + InputMethodKit = { inherit Carbon Cocoa Foundation; }; + InstallerPlugins = {}; + InstantMessage = {}; + Intents = { inherit CoreFoundation CoreGraphics CoreLocation Foundation IOKit UserNotifications; }; + IntentsUI = { inherit AppKit Intents; }; + JavaNativeFoundation = { inherit Foundation; }; + JavaRuntimeSupport = { inherit ApplicationServices Cocoa Foundation QuartzCore; }; + JavaScriptCore = { inherit CoreFoundation CoreGraphics Foundation; }; + Kerberos = {}; + Kernel = {}; + KernelManagement = { inherit Foundation; }; + LDAP = {}; + LatentSemanticMapping = { inherit Carbon CoreFoundation; }; + LinkPresentation = { inherit AppKit Foundation; }; + LocalAuthentication = { inherit Foundation Security; }; + LocalAuthenticationEmbeddedUI = { inherit AppKit Foundation LocalAuthentication; }; + MLCompute = { inherit CoreFoundation Foundation IOKit Metal; }; + MailKit = { inherit AppKit Foundation; }; + ManagedSettings = { inherit Combine Foundation; }; + MapKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CoreLocation Foundation IOKit Metal QuartzCore; }; + Matter = { inherit Foundation Security; }; + MediaAccessibility = { inherit CoreFoundation CoreGraphics CoreText; }; + MediaLibrary = { inherit Foundation; }; + MediaPlayer = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + MediaToolbox = { inherit AudioToolbox CoreFoundation CoreMedia; }; + Message = {}; + Metal = { inherit CoreFoundation Foundation IOKit IOSurface; }; + MetalFX = { inherit Metal; }; + MetalKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal ModelIO QuartzCore simd; }; + MetalPerformanceShaders = { inherit CoreGraphics Foundation Metal simd; }; + MetalPerformanceShadersGraph = { inherit Foundation MetalPerformanceShaders; }; + MetricKit = { inherit CoreFoundation Foundation IOKit; }; + ModelIO = { inherit CoreFoundation CoreGraphics Foundation IOKit simd; }; + MultipeerConnectivity = { inherit Cocoa Foundation; }; + MusicKit = { inherit Combine CoreGraphics Foundation; }; + NaturalLanguage = { inherit CoreFoundation Foundation IOKit; }; + NearbyInteraction = { inherit CoreFoundation Foundation IOKit simd; }; + NetFS = { inherit CoreFoundation; }; + Network = { inherit CoreFoundation Foundation Security; }; + NetworkExtension = { inherit Foundation Network Security; }; + NotificationCenter = { inherit AppKit Foundation; }; + OSAKit = { inherit Carbon Cocoa; }; + OSLog = { inherit CoreFoundation Foundation IOKit; }; + OpenAL = {}; + OpenCL = { inherit OpenGL; }; + OpenDirectory = { inherit CoreFoundation Foundation; }; + OpenGL = {}; + PCSC = {}; + PDFKit = { inherit AppKit Cocoa; }; + PHASE = { inherit AVFAudio AVFoundation CoreAudioTypes Foundation ModelIO simd; }; + ParavirtualizedGraphics = { inherit AppKit CoreVideo Foundation IOSurface Metal; }; + PassKit = { inherit AppKit Contacts CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + PencilKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Photos = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit ImageIO Metal QuartzCore UniformTypeIdentifiers simd; }; + PhotosUI = { inherit AVFoundation AppKit CoreAudio CoreData CoreFoundation CoreGraphics CoreImage CoreLocation CoreMIDI CoreMedia Foundation IOKit MapKit Metal Photos QuartzCore UniformTypeIdentifiers simd; }; + PreferencePanes = { inherit Cocoa; }; + PushKit = { inherit Foundation; }; + PushToTalk = {}; + QTKit = {}; + Quartz = { inherit AppKit ApplicationServices Cocoa CoreImage Foundation ImageCaptureCore OpenGL PDFKit QuartzCore QuickLookUI; }; + QuartzCore = { inherit CoreFoundation CoreGraphics CoreVideo Foundation IOKit Metal OpenGL; }; + QuickLook = { inherit ApplicationServices CoreFoundation; }; + QuickLookThumbnailing = { inherit CoreGraphics Foundation UniformTypeIdentifiers; }; + QuickLookUI = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal PDFKit QuartzCore QuickLook UniformTypeIdentifiers; }; + RealityFoundation = { inherit AVFAudio AVFoundation Accessibility AppKit AudioToolbox Combine CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia CoreMotion CoreText CoreVideo Foundation IOKit Metal QuartzCore simd; }; + RealityKit = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal MultipeerConnectivity QuartzCore RealityFoundation simd; }; + ReplayKit = { inherit AVFoundation AppKit Foundation; }; + Ruby = {}; + SafariServices = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + SafetyKit = { inherit CoreLocation Foundation; }; + SceneKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + ScreenCaptureKit = { inherit AppKit CoreGraphics CoreMedia Foundation; }; + ScreenSaver = { inherit AppKit Foundation; }; + ScreenTime = { inherit AppKit Foundation; }; + ScriptingBridge = { inherit ApplicationServices CoreServices Foundation; }; + Security = { inherit CoreFoundation; }; + SecurityFoundation = { inherit Foundation Security; }; + SecurityInterface = { inherit AppKit Cocoa Security SecurityFoundation; }; + SensorKit = { inherit CoreFoundation CoreLocation Foundation; }; + ServiceManagement = { inherit CoreFoundation Foundation Security; }; + SharedWithYou = { inherit AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreTransferable Foundation IOKit Metal OSLog QuartzCore SharedWithYouCore SwiftUI UniformTypeIdentifiers; }; + SharedWithYouCore = { inherit CoreFoundation Foundation IOKit; }; + ShazamKit = { inherit AVFAudio AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal MusicKit QuartzCore UniformTypeIdentifiers simd; }; + Social = { inherit AppKit Foundation; }; + SoundAnalysis = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreML CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + Speech = { inherit AVFoundation CoreAudio CoreFoundation CoreGraphics CoreMIDI CoreMedia Foundation IOKit Metal QuartzCore UniformTypeIdentifiers simd; }; + SpriteKit = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation GLKit IOKit Metal ModelIO QuartzCore simd; }; + StoreKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage CryptoKit Foundation IOKit Metal QuartzCore Security; }; + SwiftUI = { inherit Accessibility AppKit Combine CoreData CoreFoundation CoreGraphics CoreImage CoreTransferable DeveloperToolsSupport Foundation IOKit Metal OSLog QuartzCore UniformTypeIdentifiers; }; + SyncServices = {}; + System = {}; + SystemConfiguration = { inherit CoreFoundation Security; }; + SystemExtensions = { inherit Foundation; }; + TWAIN = {}; + TabularData = { inherit Combine Foundation; }; + Tcl = {}; + ThreadNetwork = { inherit Foundation; }; + Tk = {}; + UniformTypeIdentifiers = { inherit CoreFoundation Foundation IOKit; }; + UserNotifications = { inherit Foundation; }; + UserNotificationsUI = { inherit AppKit; }; + VideoDecodeAcceleration = {}; + VideoSubscriberAccount = { inherit Foundation; }; + VideoToolbox = { inherit CoreFoundation CoreGraphics CoreMedia CoreVideo; }; + Virtualization = { inherit AppKit Cocoa CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit Metal QuartzCore; }; + Vision = { inherit CoreAudio CoreFoundation CoreGraphics CoreML CoreMedia CoreVideo Foundation IOKit ImageIO Metal simd; }; + VisionKit = { inherit AppKit Foundation; }; + WeatherKit = { inherit CoreLocation Foundation; }; + WebKit = { inherit AppKit CoreData CoreFoundation CoreGraphics CoreImage Foundation IOKit JavaScriptCore Metal QuartzCore; }; + WidgetKit = { inherit Combine CoreFoundation Foundation IOKit Intents SwiftUI; }; + iTunesLibrary = { inherit Foundation; }; + vecLib = {}; + vmnet = {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/default.nix b/pkgs/os-specific/darwin/apple-sdks/frameworks/default.nix new file mode 100644 index 0000000000000..4da7e87e03e83 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/default.nix @@ -0,0 +1,127 @@ +{ + buildPackages, + lib, + stdenvNoCC, + # macOS things + callPackage, + MacOSX-SDK, +}: +let + inherit (MacOSX-SDK) version; + fixup-frameworks = callPackage (./. + "/${version}/fixups.nix") {}; + private-frameworks = callPackage (./. + "/${version}/private.nix") {}; + public-frameworks = callPackage (./. + "/${version}/public.nix") {}; + + mkDepsRewrites = deps: let + mergeRewrites = x: y: { + prefix = lib.mergeAttrs (x.prefix or {}) (y.prefix or {}); + const = lib.mergeAttrs (x.const or {}) (y.const or {}); + }; + + rewriteArgs = { + prefix ? {}, + const ? {}, + }: + lib.concatLists ( + (lib.mapAttrsToList (from: to: ["-p" "${from}:${to}"]) prefix) + ++ (lib.mapAttrsToList (from: to: ["-c" "${from}:${to}"]) const) + ); + + rewrites = depList: + lib.fold mergeRewrites {} + (map (dep: dep.tbdRewrites) + (lib.filter (dep: dep ? tbdRewrites) depList)); + in + lib.escapeShellArgs (rewriteArgs (rewrites (builtins.attrValues deps))); + + mkFramework = { + name, + deps, + private ? false, + }: let + standardFrameworkPath = name: private: "/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework"; + + self = stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-${lib.optionalString private "private-"}framework-${name}"; + + dontUnpack = true; + + # because we copy files from the system + preferLocalBuild = true; + + disallowedRequisites = [MacOSX-SDK]; + + nativeBuildInputs = [buildPackages.darwin.rewrite-tbd]; + + installPhase = '' + mkdir -p $out/Library/Frameworks + + cp -r ${MacOSX-SDK}${standardFrameworkPath name private} $out/Library/Frameworks + + if [[ -d ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule ]]; then + mkdir -p $out/lib/swift + cp -r -t $out/lib/swift \ + ${MacOSX-SDK}/usr/lib/swift/${name}.swiftmodule \ + ${MacOSX-SDK}/usr/lib/swift/libswift${name}.tbd + fi + + # Fix and check tbd re-export references + chmod u+w -R $out + find $out -name '*.tbd' -type f | while read tbd; do + echo "Fixing re-exports in $tbd" + rewrite-tbd \ + -p ${standardFrameworkPath name private}/:$out/Library/Frameworks/${name}.framework/ \ + -p /usr/lib/swift/:$out/lib/swift/ \ + ${mkDepsRewrites deps} \ + -r ${builtins.storeDir} \ + "$tbd" + done + ''; + + propagatedBuildInputs = builtins.attrValues deps; + + passthru.tbdRewrites.prefix."${standardFrameworkPath name private}/" = "${self}/Library/Frameworks/${name}.framework/"; + + meta = with lib; { + description = "Apple SDK framework ${name}"; + maintainers = with maintainers; [copumpkin]; + platforms = platforms.darwin; + }; + }; + in + self; + + # Helper functions for creating framework derivations. + framework = name: deps: + mkFramework { + inherit name deps; + private = false; + }; + + # Helper functions for creating private framework derivations. + privateFramework = name: deps: + mkFramework { + inherit name deps; + private = true; + }; + + # Merge addToFrameworks into public-frameworks and remove elements of removeFromFrameworks. + deps = let + inherit (fixup-frameworks) addToFrameworks removeFromFrameworks; + fixupDeps = name: deps: + lib.pipe deps [ + # Add dependencies from addToFrameworks. + (deps: lib.recursiveUpdate deps (addToFrameworks.${name} or {})) + # Keep dependencies not in removeFromFrameworks. + (lib.filterAttrs (depName: _: ! (removeFromFrameworks.${name}.${depName} or false))) + ]; + in + lib.mapAttrs fixupDeps public-frameworks; + + # Create derivations and add private frameworks. + bareFrameworks = + (lib.mapAttrs framework deps) + // (lib.mapAttrs privateFramework private-frameworks); +in + bareFrameworks // fixup-frameworks.overrideFrameworks bareFrameworks diff --git a/pkgs/os-specific/darwin/apple-sdks/frameworks/gen-frameworks.py b/pkgs/os-specific/darwin/apple-sdks/frameworks/gen-frameworks.py new file mode 100755 index 0000000000000..7926686e98dc7 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/frameworks/gen-frameworks.py @@ -0,0 +1,289 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python -p python3 swiftPackages.swift-unwrapped nix pbzx cpio + +""" +Generate a frameworks.nix for a macOS SDK. + +You may point this tool at an Xcode bundled SDK, but more ideal is using the +SDK from Nixpkgs. For example: + +SDK_PATH="$(nix-build --no-link -A darwin.apple_sdk_11_1.MacOSX-SDK)" +./gen-frameworks.py "$SDK_PATH" > ./new-frameworks.nix + +Alternatively, you can use the apple-sdk-releases.json file generated by +`gen-apple-sdk-releases.py` to regenerate the public frameworks for each SDK: + +./gen-frameworks.py --from-apple-sdk-releases ../apple-sdk-releases.json +""" + +from pathlib import Path +import argparse +import json +import logging +import subprocess +import tempfile + + +logging.basicConfig( + level=logging.DEBUG, + datefmt="%Y-%m-%dT%H:%M:%S%z", + format="[%(asctime)s][%(levelname)s] %(message)s", +) + +logger = logging.getLogger(__name__) + +ALLOWED_LIBS = ["simd"] + +HEADER = """\ +# This file is generated by gen-frameworks.nix. +# Do not edit, put overrides in apple_sdk.nix instead. +{ libs, frameworks }: with libs; with frameworks; +{ +""" + +FOOTER = """\ +} +""" + + +def name_from_ident(ident): + return ident.get("swift", ident.get("clang")) + + +def scan_sdk(sdk_dir: Path) -> str: + """ + Generates a Nix attribute set for the given SDK. + """ + # Find frameworks by scanning the SDK frameworks directory. + frameworks = [ + framework + for framework in map( + lambda p: p.stem, (sdk_dir / "System/Library/Frameworks").iterdir() + ) + if not framework.startswith("_") + ] + frameworks.sort() + + # Determine the longest name for padding output. + width = len(max(frameworks, key=len)) + + output = HEADER + + for framework in frameworks: + deps = [] + + # Use Swift to scan dependencies, because a module may have both Clang + # and Swift parts. Using Clang only imports the Clang module, whereas + # using Swift will usually import both Clang + Swift overlay. + # + # TODO: The above is an assumption. Not sure if it's possible a Swift + # module completely shadows a Clang module. (Seems unlikely) + # + # TODO: Handle "module 'Foobar' is incompatible with feature 'swift'" + # + # If there were a similar Clang invocation for scanning, we could fix + # the above todos, but that doesn't appear to exist. + logger.info(f"Scanning {framework}") + result = subprocess.run( + [ + "swiftc", + "-scan-dependencies", + # We provide a source snippet via stdin. + "-", + # Use the provided SDK. + "-sdk", + sdk_dir.as_posix(), + # This search path is normally added automatically by the + # compiler based on the SDK, but we have a patch in place that + # removes that for SDKs in /nix/store, because our xcbuild stub + # SDK doesn't have the directory. + # (swift-prevent-sdk-dirs-warning.patch) + "-I", + (sdk_dir / "usr/lib/swift").as_posix(), + # For some reason, 'lib/swift/shims' from both the SDK and + # Swift compiler are picked up, causing redefinition errors. + # This eliminates the latter. + "-resource-dir", + (sdk_dir / "usr/lib/swift").as_posix(), + ], + input=f"import {framework}".encode(), + stdout=subprocess.PIPE, + ) + if result.returncode != 0: + logger.error(f"Scanning {framework} failed (exit code {result.returncode})") + result.stdout = b"" + + # Parse JSON output. + if len(result.stdout) != 0: + data = json.loads(result.stdout) + + # Entries in the modules list come in pairs. The first is an + # identifier (`{ swift: "foobar" }` or `{ clang: "foobar" }`), and + # the second metadata for that module. Here we look for the pair + # that matches the framework we're scanning (and ignore the rest). + modules = data["modules"] + for i in range(0, len(modules), 2): + ident, meta = modules[i : i + 2] + + # NOTE: We may match twice, for a Swift module _and_ for a + # Clang module. So matching here doesn't break from the loop, + # and deps is appended to. + if name_from_ident(ident) == framework: + dep_idents = meta["directDependencies"] + deps += [name_from_ident(ident) for ident in dep_idents] + # List unfiltered deps in progress output. + logger.info(f"{ident} -> {dep_idents}") + + # Filter out modules that are not separate derivations. + # Also filter out duplicates (when a Swift overlay imports the Clang module) + allowed = frameworks + ALLOWED_LIBS + deps = set([dep for dep in deps if dep in allowed]) + + # Filter out self-references. (Swift overlay importing Clang module.) + if framework in deps: + deps.remove(framework) + + # Generate a Nix attribute line. + if len(deps) != 0: + deps = list(deps) + deps.sort() + deps = " ".join(deps) + output += f" {framework.ljust(width)} = {{ inherit {deps}; }};\n" + else: + output += f" {framework.ljust(width)} = {{}};\n" + + output += FOOTER + return output + + +def extract_pkg_payload(path: Path) -> Path: + """ + Returns the path to the Paylog extracted from the PKG file. This will be a temporary + directory. + """ + # Check if we already have the SDK extracted. + logger.info("Checking if SDK is already extracted...") + payload_dir = Path(tempfile.gettempdir()) / path.stem + + if payload_dir.exists(): + logger.info(f"Found extracted SDK at {payload_dir.as_posix()}") + return payload_dir + + logger.info( + "Payload has not been extracted yet, making temporary directory" + f" {payload_dir.as_posix()}" + ) + payload_dir.mkdir(parents=True) + + logger.info( + f"Extracting Payload from {path.as_posix()} to {payload_dir.as_posix()}..." + ) + # Run pbzx to extract the cpio archive from the PKG. + pbzx = subprocess.run( + ["pbzx", path.as_posix()], + capture_output=True, + ) + + # Run cpio to extract the SDK from the cpio archive. + cpio = subprocess.run( + ["cpio", "-idm"], + capture_output=True, + input=pbzx.stdout, + cwd=payload_dir, + ) + + # Ensure cpio succeeded. + assert cpio.returncode == 0, f"cpio failed with exit code {cpio.returncode}" + logger.info(f"Extracted Payload to {payload_dir.as_posix()}") + + return payload_dir + + +def find_sdk(payload_dir: Path) -> Path: + """ + Returns the path to the SDK inside an extracted Payload directory. + """ + sdk_dir = Path(payload_dir) / "Library/Developer/CommandLineTools/SDKs" + sdks = [sdk for sdk in sdk_dir.iterdir() if not sdk.is_symlink()] + assert len(sdks) == 1, f"Expected one SDK in {sdk_dir}, found {len(sdks)}: {sdks}" + return sdks[0] + + +def nix_fetchurl(url: str, hash: str) -> Path: + """ + Runs nix's fetchurl command to ensure the file is cached. + """ + logger.info(f"Ensuring {url} is cached...") + fetchurl_args = "{" + f'url = "{url}"; sha256 = "{hash}";' + "}" + cache = subprocess.run( + ["nix", "eval", "--raw", "--expr", f"builtins.fetchurl {fetchurl_args}"], + capture_output=True, + ) + assert cache.returncode == 0, ( + f"nix eval failed with exit code {cache.returncode}:" + f" {cache.stderr.decode('utf-8')}" + ) + store_path = Path(cache.stdout.decode("utf-8").strip()) + return store_path + + +def generate_frameworks_for_each_release(apple_sdk_releases: Path) -> None: + """ + Generates a frameworks.nix for each SDK in the apple-sdk-releases.json at the given + path. + """ + releases = json.load(open(apple_sdk_releases, "r")) + for version in releases: + # Get the pkg for this version. + fetchurl_args = releases[version]["CLTools_macOSNMOS_SDK"] + + # Ensure the pkg is cached. + store_path = nix_fetchurl(**fetchurl_args) + + # Extract the SDK from the pkg. + payload_dir = extract_pkg_payload(store_path) + sdk_dir = find_sdk(payload_dir) + + # Create the directory for the version. + frameworks_dir = Path(version) + frameworks_dir.mkdir(parents=True, exist_ok=True) + with open(frameworks_dir / "public.nix", "w") as f: + f.write(scan_sdk(sdk_dir)) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + prog="gen-frameworks.py", + description="Generate a frameworks.nix for a macOS SDK.", + ) + group = parser.add_mutually_exclusive_group(required=True) + group.add_argument( + "--from-sdk", + help="Use this SDK", + type=str, + required=False, + ) + group.add_argument( + "--from-pkg", + help="Use the SDK from this PKG", + type=str, + required=False, + ) + group.add_argument( + "--from-apple-sdk-releases", + help="Generate a framework.nix for each SDK in this apple-sdk-releases.json", + type=str, + required=False, + ) + args = parser.parse_args() + + if args.from_apple_sdk_releases: + generate_frameworks_for_each_release(args.from_apple_sdk_releases) + elif args.from_pkg: + payload_dir = extract_pkg_payload(args.from_pkg) + sdk = find_sdk(payload_dir) + print(scan_sdk(sdk)) + elif args.from_sdk: + print(scan_sdk(args.from_sdk)) + else: + parser.print_help() diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh b/pkgs/os-specific/darwin/apple-sdks/frameworks/scripts/forceLinkCoreFoundationFramework.sh similarity index 100% rename from pkgs/os-specific/darwin/apple-sdk-11.0/cf-setup-hook.sh rename to pkgs/os-specific/darwin/apple-sdks/frameworks/scripts/forceLinkCoreFoundationFramework.sh diff --git a/pkgs/os-specific/darwin/apple-sdks/gen-apple-sdk-releases.py b/pkgs/os-specific/darwin/apple-sdks/gen-apple-sdk-releases.py new file mode 100755 index 0000000000000..7e73eecadb2f5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/gen-apple-sdk-releases.py @@ -0,0 +1,174 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python -p python3 nix bash xar + +import re +import urllib.request +import dataclasses +from dataclasses import dataclass +from typing import DefaultDict, Literal, get_args +import logging +import subprocess +import json + +logging.basicConfig( + level=logging.DEBUG, + datefmt="%Y-%m-%dT%H:%M:%S%z", + format="[%(asctime)s][%(levelname)s] %(message)s", +) + +logger = logging.getLogger(__name__) + +SUCATALOG_URL = "https://swscan.apple.com/content/catalogs/others/index-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" + +# Packages we're interested in +PackageName = Literal[ + "CLTools_Executables", + "CLTools_macOS_SDK", + "CLTools_macOSLMOS_SDK", + "CLTools_macOSNMOS_SDK", +] + + +class EnhancedJSONEncoder(json.JSONEncoder): + def default(self, o): + if dataclasses.is_dataclass(o): + return dataclasses.asdict(o) + return super().default(o) + + +@dataclass +class SuCatalogPackage: + url: str + hash: str + package_name: PackageName + + +@dataclass +class NixStoreEntry: + store_path: str + hash: str + + +@dataclass +class FetchurlArgs: + url: str + hash: str + + +ParsedSuCatalog = dict[str, dict[PackageName, SuCatalogPackage]] +AppleSDKReleases = dict[str, dict[PackageName, FetchurlArgs]] + + +def parse_sucatalog( + catalog_url: str, +) -> ParsedSuCatalog: + logger.info(f"Fetching catalog from {catalog_url}...") + with urllib.request.urlopen(catalog_url) as sucatalog: + logger.info("Reading catalog...") + text = sucatalog.read().decode("utf-8") + + logger.info("Searching catalog for packages...") + catalog: ParsedSuCatalog = DefaultDict(dict) + + pat = re.compile( + r"(?Phttps://swcdn\.apple\.com/content/downloads/.+/(?P.+)/(?P" + + "|".join(get_args(PackageName)) + + r")\.pkg)", + re.VERBOSE, + ) + + matches = pat.finditer(text) + for match in matches: + package = SuCatalogPackage(**match.groupdict()) # type: ignore + logger.info(f"Found {package.package_name} with hash {package.hash}") + catalog[package.hash][package.package_name] = package + + return catalog + + +def nix_prefetch_file(url: str) -> NixStoreEntry: + logger.info(f"Adding {url} to Nix store...") + result = subprocess.run( + ["nix", "store", "prefetch-file", "--json", url], + capture_output=True, + text=True, + ) + + parsed = json.loads(result.stdout) + store_entry = NixStoreEntry(store_path=parsed["storePath"], hash=parsed["hash"]) + logger.info(f"Stored at {store_entry.store_path} with hash {store_entry.hash}") + + return store_entry + + +def get_macOS_SDK_version(store_path: str) -> str: + # Extract the Bom file from the package + logger.info(f"Getting macOS SDK version from {store_path}") + xar = subprocess.run( + [ + "xar", + "--exclude", + "[^Bom]", + "--to-stdout", + "-xf", + store_path, + ], + capture_output=True, + text=False, + ) + + # Extract the SDK version from the Bom file + pat = re.compile(r"MacOSX(?P[\d.]+)\.sdk") + matched = pat.search(str(xar.stdout)) + assert matched is not None, "Could not find SDK version" + sdk_version = matched.groups("sdk_version")[0] + + # Make sure the version is 3 components long + components = sdk_version.split(".") + length_corrected = components + ["0"] * (3 - len(components)) + formatted = ".".join(length_corrected) + return formatted + + +def generate_apple_sdk_releases(catalog: ParsedSuCatalog) -> AppleSDKReleases: + apple_sdk_releases: AppleSDKReleases = DefaultDict(dict) + for hash, packages in catalog.items(): + # Get CLTools_macOS_SDK since it'll have the SDK version + macOS_SDK = packages.pop("CLTools_macOS_SDK") + store_entry = nix_prefetch_file(macOS_SDK.url) + sdk_version = get_macOS_SDK_version(store_entry.store_path) + logger.info(f"Found macOS SDK version {sdk_version} for {hash}") + + # Warn if we have duplicate packages for the same SDK version + if sdk_version in apple_sdk_releases: + logger.warning( + f"Found macOS SDK version {sdk_version}, but with {hash}!" + " Will overwrite existing entries!" + ) + + fetchurl_args = FetchurlArgs(url=macOS_SDK.url, hash=store_entry.hash) + apple_sdk_releases[sdk_version]["CLTools_macOS_SDK"] = fetchurl_args + logger.info( + f"Added CLTools_macOS_SDK for {sdk_version} from {hash} to releases" + ) + + for package_name, package in packages.items(): + if package_name in apple_sdk_releases[sdk_version]: + logger.warning( + f"Replacing existing macOS SDK {sdk_version} {package_name} with" + f" package of the same version and name from {hash}" + ) + store_entry = nix_prefetch_file(package.url) + fetchurl_args = FetchurlArgs(url=package.url, hash=store_entry.hash) + apple_sdk_releases[sdk_version][package_name] = fetchurl_args + logger.info( + f"Added {package_name} for {sdk_version} from {hash} to releases" + ) + + return apple_sdk_releases + + +if __name__ == "__main__": + catalog = parse_sucatalog(SUCATALOG_URL) + releases = generate_apple_sdk_releases(catalog) + print(json.dumps(releases, indent=4, sort_keys=True, cls=EnhancedJSONEncoder)) diff --git a/pkgs/os-specific/darwin/apple-sdks/generic.nix b/pkgs/os-specific/darwin/apple-sdks/generic.nix new file mode 100644 index 0000000000000..8f15c5f398c8d --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/generic.nix @@ -0,0 +1,133 @@ +{ + lib, + newScope, + overrideCC, + pkgs, + stdenv, + version, +}: let + # TODO(@connorbaker): For some reason, building later MacOSX-SDK releases still requires the + # default SDK to have been built previously. Is this due to stdenv bootstrapping? + majorMinorVersion = lib.versions.majorMinor version; + apple_sdk_name = "apple_sdk_${builtins.replaceStrings ["."] ["_"] majorMinorVersion}"; + + # mkCc = cc: + # if stdenv.isAarch64 + # then cc + # else + # cc.override { + # bintools = stdenv.cc.bintools.override {libc = packages.Libsystem;}; + # libc = packages.Libsystem; + # }; + + mkCc = cc: + cc.override { + bintools = stdenv.cc.bintools.override {libc = packages.Libsystem;}; + libc = packages.Libsystem; + }; + + # mkStdenv = stdenv: + # if stdenv.isAarch64 + # then stdenv + # else + # (overrideCC stdenv (mkCc stdenv.cc)).override { + # targetPlatform = + # stdenv.targetPlatform + # // { + # darwinMinVersion = "10.12"; + # darwinSdkVersion = "11.0"; + # }; + # }; + + mkStdenv = stdenv: let + cc = overrideCC stdenv (mkCc stdenv.cc); + darwinAttrs = { + darwinMinVersion = "10.12"; + darwinSdkVersion = lib.versions.majorMinor packages.MacOSX-SDK.version; + }; + targetPlatform = stdenv.targetPlatform // darwinAttrs; + in + cc.override {inherit targetPlatform;}; + + stdenvs = + {stdenv = mkStdenv stdenv;} + // builtins.listToAttrs ( + builtins.map + (v: lib.attrsets.nameValuePair "clang${v}Stdenv" (mkStdenv pkgs."llvmPackages_${v}".stdenv)) + ["12" "13" "14" "15"] + ); + + callPackage = newScope (packages // pkgs.darwin); + + packages = + stdenvs + // { + # Make sure we pass our special `callPackage` instead of using packages.callPackage which + # does not have necessary attributes in scope. + frameworks = callPackage ./frameworks {inherit callPackage;}; + libs = callPackage ./libs {inherit callPackage;}; + + MacOSX-SDK = callPackage ./CLTools_macOSNMOS_SDK.nix {inherit version;}; + CLTools_Executables = callPackage ./CLTools_Executables.nix {inherit version;}; + Libsystem = callPackage ./libSystem.nix {}; + LibsystemCross = pkgs.darwin.Libsystem; + libcharset = callPackage ./libcharset.nix {}; + libunwind = callPackage ./libunwind.nix {}; + libnetwork = callPackage ./libnetwork.nix {}; + libpm = callPackage ./libpm.nix {}; + # Avoid introducing a new objc4 if stdenv already has one, to prevent + # conflicting LLVM modules. + objc4 = stdenv.objc4 or (callPackage ./libobjc.nix {}); + + # TODO(@connorbaker): questionable aliases + # TODO(@connorbaker): Why do we need to go through the pkgs.darwin.${apple_sdk_name} + # indirection? + configd = pkgs.darwin.${apple_sdk_name}.frameworks.SystemConfiguration; + inherit (pkgs.darwin.${apple_sdk_name}.frameworks) IOKit; + + xcodebuild = pkgs.xcbuild.override { + inherit (pkgs.darwin.${apple_sdk_name}) stdenv; + inherit (pkgs.darwin.${apple_sdk_name}.frameworks) CoreServices CoreGraphics ImageIO; + }; + + rustPlatform = + pkgs.makeRustPlatform { + inherit (pkgs.darwin.${apple_sdk_name}) stdenv; + inherit (pkgs) rustc cargo; + } + // { + inherit + (pkgs.callPackage ../../../build-support/rust/hooks { + inherit (pkgs.darwin.${apple_sdk_name}) stdenv; + inherit (pkgs) cargo rustc; + clang = mkCc pkgs.clang; + }) + bindgenHook + ; + }; + + # TODO(@connorbaker): Any reason we wouldn't want `libs` or `frameworks` to be in scope when + # using the `callPackage` belonging to a specific SDK? + callPackage = newScope (lib.optionalAttrs stdenv.isDarwin (stdenvs + // rec { + inherit (pkgs.darwin.${apple_sdk_name}) xcodebuild rustPlatform; + darwin = pkgs.darwin.overrideScope (_: prev: { + inherit + (prev.darwin.${apple_sdk_name}) + IOKit + Libsystem + LibsystemCross + Security + configd + libcharset + libunwind + objc4 + ; + apple_sdk = prev.darwin.${apple_sdk_name}; + CF = prev.darwin.${apple_sdk_name}.CoreFoundation; + }); + xcbuild = xcodebuild; + })); + }; +in + packages diff --git a/pkgs/os-specific/darwin/apple-sdks/libSystem.nix b/pkgs/os-specific/darwin/apple-sdks/libSystem.nix new file mode 100644 index 0000000000000..7b641d33af99f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libSystem.nix @@ -0,0 +1,98 @@ +{ + buildPackages, + MacOSX-SDK, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "libSystem"; + + dontBuild = true; + dontUnpack = true; + + nativeBuildInputs = [buildPackages.darwin.rewrite-tbd]; + + csu = [ + "bundle1.o" + "crt0.o" + "crt1.10.5.o" + "crt1.10.6.o" + "crt1.o" + "dylib1.10.5.o" + "dylib1.o" + "gcrt1.o" + "lazydylib1.o" + ]; + + installPhase = + '' + mkdir -p $out/{include,lib/swift} + '' + # Copy each directory in ${MacOSX-SDK}/usr/include into $out/include + + '' + for dir in $(ls -d ${MacOSX-SDK}/usr/include/*/); do + cp -dr $dir $out/include + done + '' + # Copy each header and modulemap file in ${MacOSX-SDK}/usr/include into $out/include + + '' + cp -d \ + ${MacOSX-SDK}/usr/include/*.h \ + ${MacOSX-SDK}/usr/include/*.modulemap \ + $out/include + '' + # Remove curses.h, ncurses.h, ncurses_dll.h, and unctrl.h which conflict with ncurses. + # Then, remove the module map for ncurses. + # NOTE: The sed expression expects the module map to use consistent indentation across + # releases. If this changes, the sed expression will need to be updated. + # + # For example, right now we assume that there is one leading space before the + # "explicit" keyword and that the closing brace is on its own line (also with one + # leading space). + + '' + rm $out/include/{curses,ncurses,ncurses_dll,unctrl}.h + sed -i -e '/^ explicit module ncurses {/,/^ }$/d' $out/include/module.modulemap + '' + + '' + rm $out/include/tk*.h $out/include/tcl*.h + + cp -dr \ + ${MacOSX-SDK}/usr/lib/libSystem.* \ + ${MacOSX-SDK}/usr/lib/system \ + $out/lib + + # Extra libraries + for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.1 resolv; do + cp -d \ + ${MacOSX-SDK}/usr/lib/lib$name.tbd \ + ${MacOSX-SDK}/usr/lib/lib$name.*.tbd \ + $out/lib + done + + for name in os Dispatch; do + cp -dr \ + ${MacOSX-SDK}/usr/lib/swift/$name.swiftmodule \ + ${MacOSX-SDK}/usr/lib/swift/libswift$name.tbd \ + $out/lib/swift + done + + for f in $csu; do + from=${MacOSX-SDK}/usr/lib/$f + if [ -e "$from" ]; then + cp -d $from $out/lib + else + echo "Csu file '$from' doesn't exist: skipping" + fi + done + + chmod u+w -R $out/lib + find $out -name '*.tbd' -type f | while read tbd; do + rewrite-tbd \ + -c /usr/lib/libsystem.dylib:$out/lib/libsystem.dylib \ + -p /usr/lib/system/:$out/lib/system/ \ + -p /usr/lib/swift/:$out/lib/swift/ \ + -r ${builtins.storeDir} \ + "$tbd" + done + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix b/pkgs/os-specific/darwin/apple-sdks/libcharset.nix similarity index 58% rename from pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix rename to pkgs/os-specific/darwin/apple-sdks/libcharset.nix index bf55037ab6057..033c22e31b64c 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libcharset.nix +++ b/pkgs/os-specific/darwin/apple-sdks/libcharset.nix @@ -1,13 +1,16 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - +{ + stdenvNoCC, + buildPackages, + MacOSX-SDK, +}: stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; pname = "libcharset"; - version = MacOSX-SDK.version; dontUnpack = true; dontBuild = true; - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; + nativeBuildInputs = [buildPackages.darwin.checkReexportsHook]; installPhase = '' mkdir -p $out/{include,lib} diff --git a/pkgs/os-specific/darwin/apple-sdks/libnetwork.nix b/pkgs/os-specific/darwin/apple-sdks/libnetwork.nix new file mode 100644 index 0000000000000..a1bae2d883d83 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libnetwork.nix @@ -0,0 +1,21 @@ +{ + stdenvNoCC, + buildPackages, + MacOSX-SDK, +}: let + self = stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "libnetwork"; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/lib + cp ${MacOSX-SDK}/usr/lib/libnetwork* $out/lib + ''; + + passthru .tbdRewrites.const."/usr/lib/libnetwork.dylib" = "${self}/lib/libnetwork.dylib"; + }; +in + self diff --git a/pkgs/os-specific/darwin/apple-sdks/libobjc.nix b/pkgs/os-specific/darwin/apple-sdks/libobjc.nix new file mode 100644 index 0000000000000..9233cac5cb4f5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libobjc.nix @@ -0,0 +1,27 @@ +{ + stdenvNoCC, + MacOSX-SDK, + libcharset, +}: let + self = stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "libobjc"; + + dontUnpack = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/{include,lib/swift} + cp -r ${MacOSX-SDK}/usr/include/objc $out/include + cp ${MacOSX-SDK}/usr/lib/libobjc* $out/lib + cp -r ${MacOSX-SDK}/usr/lib/swift/ObjectiveC.swiftmodule $out/lib/swift + cp ${MacOSX-SDK}/usr/lib/swift/libswiftObjectiveC.tbd $out/lib/swift + ''; + + passthru .tbdRewrites = { + const."/usr/lib/libobjc.A.dylib" = "${self}/lib/libobjc.A.dylib"; + const."/usr/lib/swift/libswiftObjectiveC.dylib" = "${self}/lib/swift/libswiftObjectiveC.dylib"; + }; + }; +in + self diff --git a/pkgs/os-specific/darwin/apple-sdks/libpm.nix b/pkgs/os-specific/darwin/apple-sdks/libpm.nix new file mode 100644 index 0000000000000..f98e618d39edb --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libpm.nix @@ -0,0 +1,24 @@ +{ + stdenvNoCC, + MacOSX-SDK, + checkReexportsHook, +}: +stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "libpm"; + + dontUnpack = true; + dontBuild = true; + + nativeBuildInputs = [checkReexportsHook]; + + installPhase = '' + mkdir -p $out/lib + cp ${MacOSX-SDK}/usr/lib/libpm* $out/lib + ''; + + passthru.tbdRewrites = { + const."/usr/lib/libpmenergy.dylib" = "${placeholder "out"}/lib/libpmenergy.dylib"; + const."/usr/lib/libpmsample.dylib" = "${placeholder "out"}/lib/libpmsample.dylib"; + }; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/Xplugin.nix b/pkgs/os-specific/darwin/apple-sdks/libs/Xplugin.nix new file mode 100644 index 0000000000000..e0674fc8f102f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/Xplugin.nix @@ -0,0 +1,25 @@ +{ + frameworks, + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-Xplugin"; + dontUnpack = true; + propagatedBuildInputs = with frameworks; [ + OpenGL + ApplicationServices + Carbon + IOKit + CoreGraphics + CoreServices + CoreText + ]; + installPhase = '' + mkdir -p $out/include $out/lib + ln -s "${MacOSX-SDK}/include/Xplugin.h" $out/include/Xplugin.h + cp ${MacOSX-SDK}/usr/lib/libXplugin.1.tbd $out/lib + ln -s libXplugin.1.tbd $out/lib/libXplugin.tbd + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/default.nix b/pkgs/os-specific/darwin/apple-sdks/libs/default.nix new file mode 100644 index 0000000000000..6ddb2a72e36f5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/default.nix @@ -0,0 +1,8 @@ +{callPackage}: { + libDER = callPackage ./libDER.nix {}; + sandbox = callPackage ./sandbox.nix {}; + simd = callPackage ./simd.nix {}; + utmp = callPackage ./utmp.nix {}; + xpc = callPackage ./xpc.nix {}; + Xplugin = callPackage ./Xplugin.nix {}; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/libDER.nix b/pkgs/os-specific/darwin/apple-sdks/libs/libDER.nix new file mode 100644 index 0000000000000..6e87faa2b555b --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/libDER.nix @@ -0,0 +1,13 @@ +{ + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-libDER"; + dontUnpack = true; + installPhase = '' + mkdir -p $out/include + cp -r ${MacOSX-SDK}/usr/include/libDER $out/include + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/sandbox.nix b/pkgs/os-specific/darwin/apple-sdks/libs/sandbox.nix new file mode 100644 index 0000000000000..e066b43e6f003 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/sandbox.nix @@ -0,0 +1,16 @@ +{ + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-sandbox"; + dontUnpack = true; + dontBuild = true; + installPhase = '' + mkdir -p $out/include $out/lib + ln -s "${MacOSX-SDK}/usr/include/sandbox.h" $out/include/sandbox.h + cp "${MacOSX-SDK}/usr/lib/libsandbox.1.tbd" $out/lib + ln -s libsandbox.1.tbd $out/lib/libsandbox.tbd + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/simd.nix b/pkgs/os-specific/darwin/apple-sdks/libs/simd.nix new file mode 100644 index 0000000000000..9554c4923c821 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/simd.nix @@ -0,0 +1,13 @@ +{ + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-simd"; + dontUnpack = true; + installPhase = '' + mkdir -p $out/include + cp -r ${MacOSX-SDK}/usr/include/simd $out/include + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/utmp.nix b/pkgs/os-specific/darwin/apple-sdks/libs/utmp.nix new file mode 100644 index 0000000000000..14ddf272eccba --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/utmp.nix @@ -0,0 +1,16 @@ +{ + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-utmp"; + dontUnpack = true; + installPhase = '' + mkdir -p $out/include + pushd $out/include >/dev/null + ln -s "${MacOSX-SDK}/include/utmp.h" + ln -s "${MacOSX-SDK}/include/utmpx.h" + popd >/dev/null + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdks/libs/xpc.nix b/pkgs/os-specific/darwin/apple-sdks/libs/xpc.nix new file mode 100644 index 0000000000000..7c2c43dd176ef --- /dev/null +++ b/pkgs/os-specific/darwin/apple-sdks/libs/xpc.nix @@ -0,0 +1,16 @@ +{ + MacOSX-SDK, + stdenv, +}: +stdenv.mkDerivation { + inherit (MacOSX-SDK) version; + pname = "apple-lib-xpc"; + dontUnpack = true; + installPhase = '' + mkdir -p $out/include + pushd $out/include >/dev/null + cp -r "${MacOSX-SDK}/usr/include/xpc" $out/include/xpc + cp "${MacOSX-SDK}/usr/include/launch.h" $out/include/launch.h + popd >/dev/null + ''; +} diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix b/pkgs/os-specific/darwin/apple-sdks/libunwind.nix similarity index 72% rename from pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix rename to pkgs/os-specific/darwin/apple-sdks/libunwind.nix index 885780eba75cd..29d493f08c066 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/libunwind.nix +++ b/pkgs/os-specific/darwin/apple-sdks/libunwind.nix @@ -1,13 +1,16 @@ -{ stdenvNoCC, buildPackages, MacOSX-SDK }: - +{ + stdenvNoCC, + buildPackages, + MacOSX-SDK, +}: stdenvNoCC.mkDerivation { + inherit (MacOSX-SDK) version; pname = "libunwind"; - version = MacOSX-SDK.version; dontUnpack = true; dontBuild = true; - nativeBuildInputs = [ buildPackages.darwin.checkReexportsHook ]; + nativeBuildInputs = [buildPackages.darwin.checkReexportsHook]; installPhase = '' mkdir -p $out/include/mach-o diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 262cb3d6a3870..dd8161bf913b3 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -77,9 +77,11 @@ appleDerivation' (if headersOnly then stdenvNoCC else stdenv) ( env.NIX_CFLAGS_COMPILE = "-Wno-error"; + # TODO(@connorbaker): These are out of the way and hard to find. Surely we can avoid listing all + # of these versions by hand? preBuild = let macosVersion = "10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11" + - lib.optionalString stdenv.isAarch64 " 10.12 10.13 10.14 10.15 11.0"; + lib.optionalString stdenv.isAarch64 " 10.12 10.13 10.14 10.15 11.0 11.1 11.3 12.1 12.3 13.1 13.3"; in '' # This is a bit of a hack... mkdir -p sdk/usr/local/libexec diff --git a/pkgs/os-specific/darwin/cctools/apple.nix b/pkgs/os-specific/darwin/cctools/apple.nix index f8ff90dbb13fa..b4d5c5c89dbe5 100644 --- a/pkgs/os-specific/darwin/cctools/apple.nix +++ b/pkgs/os-specific/darwin/cctools/apple.nix @@ -1,118 +1,136 @@ -{ lib, stdenv, fetchurl, symlinkJoin, xcbuildHook, tcsh, libobjc, libtapi, libunwind, llvm, memstreamHook, xar }: - -let - -cctools = stdenv.mkDerivation rec { - pname = "cctools"; - version = "973.0.1"; - - src = fetchurl { - url = "https://opensource.apple.com/tarballs/cctools/cctools-${version}.tar.gz"; - hash = "sha256-r/6tsyyfi3R/0cLl+lN/B9ZaOaVF+Z7vJ6xj4LzSgiQ="; - }; - - patches = [ - ./cctools-add-missing-vtool-libstuff-dep.patch - ]; - - postPatch = '' - for file in libstuff/writeout.c misc/libtool.c misc/lipo.c; do - substituteInPlace "$file" \ - --replace '__builtin_available(macOS 10.12, *)' '0' - done - substituteInPlace libmacho/swap.c \ - --replace '#ifndef RLD' '#if 1' - ''; - - nativeBuildInputs = [ xcbuildHook memstreamHook ]; - buildInputs = [ libobjc llvm ]; - - xcbuildFlags = [ - "MACOSX_DEPLOYMENT_TARGET=10.12" - ]; - - doCheck = true; - checkPhase = '' - runHook preCheck - - Products/Release/libstuff_test - rm Products/Release/libstuff_test - - runHook postCheck - ''; - - installPhase = '' - runHook preInstall - - rm -rf "$out/usr" - mkdir -p "$out/bin" - find Products/Release -maxdepth 1 -type f -perm 755 -exec cp {} "$out/bin/" \; - cp -r include "$out/" - - ln -s ./nm-classic "$out"/bin/nm - ln -s ./otool-classic "$out"/bin/otool - - runHook postInstall - ''; -}; - -ld64 = stdenv.mkDerivation rec { - pname = "ld64"; - version = "609"; - - src = fetchurl { - url = "https://opensource.apple.com/tarballs/ld64/ld64-${version}.tar.gz"; - hash = "sha256-SqQ7SqmK+uOPijzxOTqtkEu3qYmcth6H7rrQ03R1Q+4="; - }; - - postPatch = '' - substituteInPlace ld64.xcodeproj/project.pbxproj \ - --replace "/bin/csh" "${tcsh}/bin/tcsh" \ - --replace 'F9E8D4BE07FCAF2A00FD5801 /* PBXBuildRule */,' "" \ - --replace 'F9E8D4BD07FCAF2000FD5801 /* PBXBuildRule */,' "" - - sed -i src/ld/Options.cpp -e '1iconst char ldVersionString[] = "${version}";' - ''; - - nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ - libtapi - libunwind - llvm - xar - ]; - - installPhase = '' - runHook preInstall - - mkdir -p "$out/bin" - find Products/Release-assert -maxdepth 1 -type f -perm 755 -exec cp {} "$out/bin/" \; - - runHook postInstall - ''; -}; - +{ + dyld, + fetchFromGitHub, + lib, + libobjc, + libtapi, + libunwind, + llvm, + memstreamHook, + ncurses, + stdenv, + symlinkJoin, + tcsh, + xar, + xcbuildHook, +}: let + cctools = stdenv.mkDerivation (finalAttrs: { + pname = "cctools"; + version = "986"; + + src = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = finalAttrs.pname; + rev = "${finalAttrs.pname}-${finalAttrs.version}"; + hash = "sha256-Fc9Bmx6/ya8+jJuKKFcqB4gTmiV1P+SScKT6CyCXAbc="; + }; + + patches = [ + ./cctools-add-missing-vtool-libstuff-dep.patch + ]; + + postPatch = '' + for file in libstuff/writeout.c misc/libtool.c misc/lipo.c; do + substituteInPlace "$file" \ + --replace '__builtin_available(macOS 10.12, *)' '0' + done + substituteInPlace libmacho/swap.c \ + --replace '#ifndef RLD' '#if 1' + ''; + + nativeBuildInputs = [xcbuildHook memstreamHook]; + buildInputs = [libobjc llvm ncurses.dev]; + + xcbuildFlags = [ + "MACOSX_DEPLOYMENT_TARGET=10.12" + ]; + + doCheck = true; + checkPhase = '' + runHook preCheck + + Products/Release/libstuff_test + rm Products/Release/libstuff_test + + runHook postCheck + ''; + + installPhase = '' + runHook preInstall + + rm -rf "$out/usr" + mkdir -p "$out/bin" + find Products/Release -maxdepth 1 -type f -perm 755 -exec cp {} "$out/bin/" \; + cp -r include "$out/" + + ln -s ./nm-classic "$out"/bin/nm + ln -s ./otool-classic "$out"/bin/otool + + runHook postInstall + ''; + }); + + ld64 = stdenv.mkDerivation (finalAttrs: { + pname = "ld64"; + version = "711"; + + src = fetchFromGitHub { + owner = "apple-oss-distributions"; + repo = finalAttrs.pname; + rev = "${finalAttrs.pname}-${finalAttrs.version}"; + hash = "sha256-hQ/YID9teDTt7M23CkxJWrHxSPJbO3XFnjPTr96jOrw="; + }; + + postPatch = '' + substituteInPlace ld64.xcodeproj/project.pbxproj \ + --replace "/bin/csh" "${tcsh}/bin/tcsh" \ + --replace 'F9E8D4BE07FCAF2A00FD5801 /* PBXBuildRule */,' "" \ + --replace 'F9E8D4BD07FCAF2000FD5801 /* PBXBuildRule */,' "" + + sed -i src/ld/Options.cpp -e '1iconst char ldVersionString[] = "${finalAttrs.version}";' + ''; + + nativeBuildInputs = [xcbuildHook]; + # TODO(@connorbaker): https://github.com/NixOS/nixpkgs/issues/149692#issuecomment-1409604806 + buildInputs = [ + # TODO(@connorbaker): What provides ? + # The System framework doesn't. + dyld # for + libtapi + libunwind + llvm + xar + ]; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/bin" + find Products/Release-assert -maxdepth 1 -type f -perm 755 -exec cp {} "$out/bin/" \; + + runHook postInstall + ''; + }); in - -symlinkJoin rec { - name = "cctools-${version}"; - version = "${cctools.version}-${ld64.version}"; - - paths = [ - cctools - ld64 - ]; - - # workaround for the fetch-tarballs script - passthru = { - inherit (cctools) src; - ld64_src = ld64.src; - }; - - meta = with lib; { - description = "MacOS Compiler Tools"; - homepage = "http://www.opensource.apple.com/source/cctools/"; - license = licenses.apsl20; - platforms = platforms.darwin; - }; -} + symlinkJoin rec { + name = "cctools-${version}"; + version = "${cctools.version}-${ld64.version}"; + + paths = [ + cctools + ld64 + ]; + + # workaround for the fetch-tarballs script + passthru = { + inherit (cctools) src; + ld64_src = ld64.src; + }; + + meta = with lib; { + description = "MacOS Compiler Tools"; + homepage = "http://www.opensource.apple.com/source/cctools/"; + license = licenses.apsl20; + platforms = platforms.darwin; + }; + } diff --git a/pkgs/os-specific/darwin/gen-frameworks.py b/pkgs/os-specific/darwin/gen-frameworks.py deleted file mode 100755 index ec2a6c7c16ecd..0000000000000 --- a/pkgs/os-specific/darwin/gen-frameworks.py +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i python -p python3 swiftPackages.swift-unwrapped - -""" -Generate a frameworks.nix for a macOS SDK. - -You may point this tool at an Xcode bundled SDK, but more ideal is using the -SDK from Nixpkgs. For example: - -SDK_PATH="$(nix-build --no-link -A darwin.apple_sdk_11_0.MacOSX-SDK)" -./gen-frameworks.py "$SDK_PATH" > ./new-frameworks.nix -""" - -import json -import os -import subprocess -import sys - -ALLOWED_LIBS = ["simd"] - -HEADER = """\ -# This file is generated by gen-frameworks.nix. -# Do not edit, put overrides in apple_sdk.nix instead. -{ libs, frameworks }: with libs; with frameworks; -{ -""" - -FOOTER = """\ -} -""" - - -def eprint(*args): - print(*args, file=sys.stderr) - - -def name_from_ident(ident): - return ident.get("swift", ident.get("clang")) - - -def scan_sdk(sdk): - # Find frameworks by scanning the SDK frameworks directory. - frameworks = [ - framework.removesuffix(".framework") - for framework in os.listdir(f"{sdk}/System/Library/Frameworks") - if not framework.startswith("_") - ] - frameworks.sort() - - # Determine the longest name for padding output. - width = len(max(frameworks, key=len)) - - output = HEADER - - for framework in frameworks: - deps = [] - - # Use Swift to scan dependencies, because a module may have both Clang - # and Swift parts. Using Clang only imports the Clang module, whereas - # using Swift will usually import both Clang + Swift overlay. - # - # TODO: The above is an assumption. Not sure if it's possible a Swift - # module completely shadows a Clang module. (Seems unlikely) - # - # TODO: Handle "module 'Foobar' is incompatible with feature 'swift'" - # - # If there were a similar Clang invocation for scanning, we could fix - # the above todos, but that doesn't appear to exist. - eprint(f"# scanning {framework}") - result = subprocess.run( - [ - "swiftc", - "-scan-dependencies", - # We provide a source snippet via stdin. - "-", - # Use the provided SDK. - "-sdk", - sdk, - # This search path is normally added automatically by the - # compiler based on the SDK, but we have a patch in place that - # removes that for SDKs in /nix/store, because our xcbuild stub - # SDK doesn't have the directory. - # (swift-prevent-sdk-dirs-warning.patch) - "-I", - f"{sdk}/usr/lib/swift", - # For some reason, 'lib/swift/shims' from both the SDK and - # Swift compiler are picked up, causing redefinition errors. - # This eliminates the latter. - "-resource-dir", - f"{sdk}/usr/lib/swift", - ], - input=f"import {framework}".encode(), - stdout=subprocess.PIPE, - ) - if result.returncode != 0: - eprint(f"# Scanning {framework} failed (exit code {result.returncode})") - result.stdout = b"" - - # Parse JSON output. - if len(result.stdout) != 0: - data = json.loads(result.stdout) - - # Entries in the modules list come in pairs. The first is an - # identifier (`{ swift: "foobar" }` or `{ clang: "foobar" }`), and - # the second metadata for that module. Here we look for the pair - # that matches the framework we're scanning (and ignore the rest). - modules = data["modules"] - for i in range(0, len(modules), 2): - ident, meta = modules[i : i + 2] - - # NOTE: We may match twice, for a Swift module _and_ for a - # Clang module. So matching here doesn't break from the loop, - # and deps is appended to. - if name_from_ident(ident) == framework: - dep_idents = meta["directDependencies"] - deps += [name_from_ident(ident) for ident in dep_idents] - # List unfiltered deps in progress output. - eprint(ident, "->", dep_idents) - - # Filter out modules that are not separate derivations. - # Also filter out duplicates (when a Swift overlay imports the Clang module) - allowed = frameworks + ALLOWED_LIBS - deps = set([dep for dep in deps if dep in allowed]) - - # Filter out self-references. (Swift overlay importing Clang module.) - if framework in deps: - deps.remove(framework) - - # Generate a Nix attribute line. - if len(deps) != 0: - deps = list(deps) - deps.sort() - deps = " ".join(deps) - output += f" {framework.ljust(width)} = {{ inherit {deps}; }};\n" - else: - output += f" {framework.ljust(width)} = {{}};\n" - - output += FOOTER - sys.stdout.write(output) - - -if __name__ == "__main__": - if len(sys.argv) != 2: - eprint(f"Usage: {sys.argv[0]} ") - sys.exit(64) - - scan_sdk(sys.argv[1]) diff --git a/pkgs/os-specific/darwin/moltenvk/default.nix b/pkgs/os-specific/darwin/moltenvk/default.nix index 4d247fa58363b..5b3137b9e52e5 100644 --- a/pkgs/os-specific/darwin/moltenvk/default.nix +++ b/pkgs/os-specific/darwin/moltenvk/default.nix @@ -1,46 +1,43 @@ -{ lib -, overrideCC -, stdenv -, fetchurl -, fetchFromGitHub -, cctools -, sigtool -, cereal -, libcxx -, glslang -, spirv-cross -, spirv-headers -, spirv-tools -, vulkan-headers -, xcbuild -, AppKit -, Foundation -, Libsystem -, MacOSX-SDK -, Metal -, QuartzCore +{ + cctools, + cereal, + fetchFromGitHub, + frameworks, + glslang, + lib, + libcxx, + MacOSX-SDK, + sigtool, + spirv-cross, + spirv-headers, + spirv-tools, + stdenv, + vulkan-headers, + xcbuild, }: - stdenv.mkDerivation (finalAttrs: { pname = "MoltenVK"; version = "1.2.3"; - buildInputs = [ - AppKit - Foundation - Metal - QuartzCore - cereal - glslang - spirv-cross - spirv-headers - spirv-tools - vulkan-headers - ]; - - nativeBuildInputs = [ cctools sigtool xcbuild ]; - - outputs = [ "out" "bin" "dev" ]; + buildInputs = + (with frameworks; [ + AppKit + Foundation + Metal + QuartzCore + ]) + ++ [ + cereal + glslang + spirv-cross + spirv-headers + spirv-tools + vulkan-headers + ]; + + nativeBuildInputs = [cctools sigtool xcbuild]; + + outputs = ["out" "bin" "dev"]; src = fetchFromGitHub { owner = "KhronosGroup"; @@ -150,7 +147,7 @@ stdenv.mkDerivation (finalAttrs: { description = "A Vulkan Portability implementation built on top of Apple’s Metal API"; homepage = "https://github.com/KhronosGroup/MoltenVK"; changelog = "https://github.com/KhronosGroup/MoltenVK/releases"; - maintainers = [ lib.maintainers.reckenrode ]; + maintainers = [lib.maintainers.reckenrode]; license = lib.licenses.asl20; platforms = lib.platforms.darwin; }; diff --git a/pkgs/os-specific/darwin/xcode/default.nix b/pkgs/os-specific/darwin/xcode/default.nix index ec98a0b1cfb6c..39d61afd23928 100644 --- a/pkgs/os-specific/darwin/xcode/default.nix +++ b/pkgs/os-specific/darwin/xcode/default.nix @@ -1,84 +1,29 @@ -{ stdenv, requireFile, lib }: +{ + lib, + requireFile, + stdenv, +}: let + releases = import ./releases.nix; -let requireXcode = version: sha256: - let - xip = "Xcode_" + version + ".xip"; - # TODO(alexfmpe): Find out how to validate the .xip signature in Linux - unxip = if stdenv.buildPlatform.isDarwin - then '' - open -W ${xip} - rm -rf ${xip} - '' - else '' - xar -xf ${xip} - rm -rf ${xip} - pbzx -n Content | cpio -i - rm Content Metadata - ''; - app = requireFile rec { - name = "Xcode.app"; - url = "https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_${version}/${xip}"; - hashMode = "recursive"; - inherit sha256; - message = '' - Unfortunately, we cannot download ${name} automatically. - Please go to ${url} - to download it yourself, and add it to the Nix store by running the following commands. - Note: download (~ 5GB), extraction and storing of Xcode will take a while + mkName = xcodeAttrs: "xcode_" + lib.replaceStrings ["."] ["_"] xcodeAttrs.version; - ${unxip} - nix-store --add-fixed --recursive sha256 Xcode.app - rm -rf Xcode.app - ''; - }; - meta = with lib; { - homepage = "https://developer.apple.com/downloads/"; - description = "Apple's XCode SDK"; - license = licenses.unfree; - platforms = platforms.darwin ++ platforms.linux; - }; + requireXcode = import ./require-xcode.nix { + inherit lib requireFile stdenv; + }; - in app.overrideAttrs ( oldAttrs: oldAttrs // { inherit meta; }); + mkXcode = xcodeAttrs: requireXcode {inherit (xcodeAttrs) version hash;}; -in lib.makeExtensible (self: { - xcode_8_1 = requireXcode "8.1" "sha256-VuAovU/b4rcLh+xMtcsZmbTWwTk35VGfMSp+fqPbsqM="; - xcode_8_2 = requireXcode "8.2" "sha256-ohqgGD7JEEmXEvmfn/N9Ga2lM8jNwhIuh+ky7PQPzY4="; - xcode_9_1 = requireXcode "9.1" "sha256-LG7pVMh1rNh5uP/bASvV9sKvGDrSGWH90J4gzwcgYSk="; - xcode_9_2 = requireXcode "9.2" "sha256-jMiG2G2zoGw4m00CjkGE+2cn0qeOdSUcXosZI2577q0="; - xcode_9_3 = requireXcode "9.3" "sha256-XIQYjfDVSmrYbyolnZIUtmOMhj9uhyWIn0KncsiaqYo="; - xcode_9_4 = requireXcode "9.4" "sha256-ZzE4F4UHVgKlJIn36kfs6Pba8iUAe6P/rh/VmxwLXwE="; - xcode_9_4_1 = requireXcode "9.4.1" "sha256-fFGB/XMZJQ2u9qh+2LYBHFh6mj5lr6gMlSQwgyS8M3k="; - xcode_10_1 = requireXcode "10.1" "sha256-u4Br3SsWbPCv6r4vGHFQUQmfPb9oUEmcdCFktMlbTes="; - xcode_10_2 = requireXcode "10.2" "sha256-592xNBS3Obp/3sDROyI4SxPN77cKMk45Lnis/QJd/vc="; - xcode_10_2_1 = requireXcode "10.2.1" "sha256-r65DbLDpiFJ78VH2hvfp7ZVpehoI44PSnaeDbElZTYc="; - xcode_10_3 = requireXcode "10.3" "sha256-61lDed7/Wi6uVBaj6/fUELISvmH3j69dQE19Y91GwsQ="; - xcode_11 = requireXcode "11" "sha256-EDM5tjuzGTzlVUg6MJKup/Q2OBrFXjzFdXSRO+eQA+Q="; - xcode_11_1 = requireXcode "11.1" "sha256-gXGVkEG+dFEoDbRjtfyN8MeUcoA6hcfsUaVDKAn7T7A="; - xcode_11_2 = requireXcode "11.2" "sha256-8qFEgRVhgOomSnJk23WaM/nACK9JFmiIICjUfT/Co9I="; - xcode_11_3 = requireXcode "11.3" "sha256-6nPCY0rIU2c7nRYDXMWcDHrCm34eqZq6wx157mk3OxM="; - xcode_11_3_1 = requireXcode "11.3.1" "sha256-BI8Olfqyxh51jyNpydiRkPwTQ4OK+ZpHUybPkCSL1tw="; - xcode_11_4 = requireXcode "11.4" "sha256-x/sLazHPs4SoCPKJ0CgFbTEmxlzJeZ7HtinMlse6uRg="; - xcode_11_5 = requireXcode "11.5" "sha256-fLqMcIOM6ZqacTBMF6N0swJzOmnt+FfYlDt8m/BXP7Y="; - xcode_11_6 = requireXcode "11.6" "sha256-nVDsbD7pGCM2jgXzRtV+VIFc/klmX05W6x/eOAOHjvg="; - xcode_11_7 = requireXcode "11.7" "sha256-stKqjXmERNQ4qF/73EE34oLtfF9+WZXK9BwXSVjLQhA="; - xcode_12 = requireXcode "12" "sha256-H8Hcre9dB2v2VT8/SrEkU+RZ2rZRiM0JqMX6i4yoffA="; - xcode_12_0_1 = requireXcode "12.0.1" "sha256-gK7PZ22aR3ow72pSjr7tUIOsgoAEUqcMZgNCEFVp29w="; - xcode_12_1 = requireXcode "12.1" "sha256-l4+MW8IWMqR/9dxd9FVtfxJs3M/qtIcj6nyQ2cjxLfI="; - xcode_12_2 = requireXcode "12.2" "sha256-G8jku/9WB8Q1zgKWGbSv06bSWE385sPlc7xnfonjIJ4="; - xcode_12_3 = requireXcode "12.3" "sha256-CYU2fAeT+DWiK/mpRoGv57RjGfseL23BDU57SokPjk8="; - xcode_12_4 = requireXcode "12.4" "sha256-Qw4j+XFry85/AviHQVhjjjKLAfmRNNwMGN5G8FheJwQ="; - xcode_12_5 = requireXcode "12.5" "sha256-xiGffnV0P9Ojd6IrJSXILUX4oznPif7zm00WAksn3qU="; - xcode_12_5_1 = requireXcode "12.5.1" "sha256-zL0kS86ZzBkIrKLPKvWguDvXj9Tqbr7uR/VZaT/uZ9A="; - xcode_13 = requireXcode "13" "sha256-uTY6d5DBu4OOQLkxs3ExDfLXh50rE2LLlqtCbk3Qn6E="; - xcode_13_1 = requireXcode "13.1" "sha256-vd+4eFVaAyvXsdaExcfbDZSXOwkpt+rEbkBYSMjdUEA="; - xcode_13_2 = requireXcode "13.2" "sha256-guJXm/QnMfvUZwAcJwoy0QeO+DpDcUhs8AxVKvm9tYQ="; - xcode_13_2_1 = requireXcode "13.2.1" "sha256-r832Uu+Q8utK4zN0CtwiMCvMYT5HstWInyq4cNIaZJM="; - xcode_13_3 = requireXcode "13.3" "sha256-p2zaWMpmUeNHQtYOOaVdhCt3cgapvzL3l73/J+UwzCE="; - xcode_13_3_1 = requireXcode "13.3.1" "sha256-j71vpJVJpyj/IOlL+4+5lYgOlhf/zn+7ExIHbxL51cQ="; - xcode_13_4 = requireXcode "13.4" "sha256-IY1coss90GlBeJg/HQPMU8v2rOOxsqlY5q+2Qxe8nnY="; - xcode_13_4_1 = requireXcode "13.4.1" "sha256-Jk8fLgvnODoIhuVJqfV0KrpBBL40fRrHJbFmm44NRKE="; - xcode_14 = requireXcode "14" "sha256-E+wjPgQx/lbYAsauksdmGsygL5VPBA8R9pHB93eA7T0="; - xcode_14_1 = requireXcode "14.1" "sha256-QJGAUVIhuDYyzDNttBPv5lIGOfvkYqdOFSUAr5tlkfs="; - xcode = self."xcode_${lib.replaceStrings ["."] ["_"] (if (stdenv.targetPlatform ? xcodeVer) then stdenv.targetPlatform.xcodeVer else "12.3")}"; -}) + allXcodes = builtins.listToAttrs ( + builtins.map + (xcodeAttrs: lib.nameValuePair (mkName xcodeAttrs) (mkXcode xcodeAttrs)) + releases + ); + defaultVersion = + if (stdenv.targetPlatform ? xcodeVer) + then stdenv.targetPlatform.xcodeVer + else "12.3"; + + defaultXcode = allXcodes.${mkName {version = defaultVersion;}}; +in + lib.makeExtensible (_: allXcodes // {xcode = defaultXcode;}) diff --git a/pkgs/os-specific/darwin/xcode/releases.nix b/pkgs/os-specific/darwin/xcode/releases.nix new file mode 100644 index 0000000000000..832112ccfdc7f --- /dev/null +++ b/pkgs/os-specific/darwin/xcode/releases.nix @@ -0,0 +1,413 @@ +# Information taken from https://en.wikipedia.org/wiki/Xcode +# +# AttrSet String String: +# version: Xcode version +# hash: sha256 recursive hash of Xcode.app +# minDarwinVersion: Minimum Darwin version supported by Xcode +# darwinSdkVersion: SDK version shipped with Xcode +# cctoolsVersion: Version of cctools shipped with Xcode +# ld64Version: Version of ld64 shipped with Xcode +# llvmVersion: Version of llvm shipped with Xcode +# clangVersion: Version of clang shipped with Xcode +[ + { + version = "8.1"; + hash = "sha256-VuAovU/b4rcLh+xMtcsZmbTWwTk35VGfMSp+fqPbsqM="; + minDarwinVersion = "10.11.5"; + darwinSdkVersion = "10.12.1"; + cctoolsVersion = "895"; + ld64Version = "274.1"; + llvmVersion = "3.9.0svn"; + clangVersion = "8.0.0"; + } + { + version = "8.2"; + hash = "sha256-ohqgGD7JEEmXEvmfn/N9Ga2lM8jNwhIuh+ky7PQPzY4="; + minDarwinVersion = "10.11.5"; + darwinSdkVersion = "10.12.2"; + cctoolsVersion = "895"; + ld64Version = "274.2"; + llvmVersion = "3.9.0svn"; + clangVersion = "8.0.0"; + } + { + version = "9.1"; + hash = "sha256-LG7pVMh1rNh5uP/bASvV9sKvGDrSGWH90J4gzwcgYSk="; + minDarwinVersion = "10.12.6"; + darwinSdkVersion = "10.13.1"; + cctoolsVersion = "900"; + ld64Version = "302.3.1"; + llvmVersion = "4.0.0"; + clangVersion = "9.0.0"; + } + { + version = "9.2"; + hash = "sha256-jMiG2G2zoGw4m00CjkGE+2cn0qeOdSUcXosZI2577q0="; + minDarwinVersion = "10.12.6"; + darwinSdkVersion = "10.13.2"; + cctoolsVersion = "900"; + ld64Version = "305"; + llvmVersion = "4.0.0"; + clangVersion = "9.0.0"; + } + { + version = "9.3"; + hash = "sha256-XIQYjfDVSmrYbyolnZIUtmOMhj9uhyWIn0KncsiaqYo="; + minDarwinVersion = "10.13.2"; + darwinSdkVersion = "10.13.4"; + cctoolsVersion = "906"; + ld64Version = "351.8"; + llvmVersion = "5.0.2"; + clangVersion = "9.1.0"; + } + { + version = "9.4"; + hash = "sha256-ZzE4F4UHVgKlJIn36kfs6Pba8iUAe6P/rh/VmxwLXwE="; + minDarwinVersion = "10.13.2"; + darwinSdkVersion = "10.13.4"; + cctoolsVersion = "906"; + ld64Version = "351.8"; + llvmVersion = "5.0.2"; + clangVersion = "9.1.0"; + } + { + version = "9.4.1"; + hash = "sha256-fFGB/XMZJQ2u9qh+2LYBHFh6mj5lr6gMlSQwgyS8M3k="; + minDarwinVersion = "10.13.2"; + darwinSdkVersion = "10.13.4"; + cctoolsVersion = "906"; + ld64Version = "351.8"; + llvmVersion = "5.0.2"; + clangVersion = "9.1.0"; + } + { + version = "10.1"; + hash = "sha256-u4Br3SsWbPCv6r4vGHFQUQmfPb9oUEmcdCFktMlbTes="; + minDarwinVersion = "10.13.6"; + darwinSdkVersion = "10.14.1"; + cctoolsVersion = "921.0.1"; + ld64Version = "409.12"; + llvmVersion = "6.0.1"; + clangVersion = "10.0.0"; + } + { + version = "10.2"; + hash = "sha256-592xNBS3Obp/3sDROyI4SxPN77cKMk45Lnis/QJd/vc="; + minDarwinVersion = "10.14.3"; + darwinSdkVersion = "10.14.4"; + cctoolsVersion = "927.0.2"; + ld64Version = "450.3"; + llvmVersion = "7.0.0"; + clangVersion = "10.0.1"; + } + { + version = "10.2.1"; + hash = "sha256-r65DbLDpiFJ78VH2hvfp7ZVpehoI44PSnaeDbElZTYc="; + minDarwinVersion = "10.14.3"; + darwinSdkVersion = "10.14.4"; + cctoolsVersion = "927.0.2"; + ld64Version = "450.3"; + llvmVersion = "7.0.0"; + clangVersion = "10.0.1"; + } + { + version = "10.3"; + hash = "sha256-61lDed7/Wi6uVBaj6/fUELISvmH3j69dQE19Y91GwsQ="; + minDarwinVersion = "10.14.3"; + darwinSdkVersion = "10.14.6"; + cctoolsVersion = "927.0.2"; + ld64Version = "450.3"; + llvmVersion = "7.0.0"; + clangVersion = "10.0.1"; + } + { + version = "11"; + hash = "sha256-EDM5tjuzGTzlVUg6MJKup/Q2OBrFXjzFdXSRO+eQA+Q="; + minDarwinVersion = "10.14.4"; + darwinSdkVersion = "10.15"; + cctoolsVersion = "949.0.1"; + ld64Version = "512.4"; + llvmVersion = "8.0.0"; + clangVersion = "11.0.0"; + } + { + version = "11.1"; + hash = "sha256-gXGVkEG+dFEoDbRjtfyN8MeUcoA6hcfsUaVDKAn7T7A="; + minDarwinVersion = "10.14.4"; + darwinSdkVersion = "10.15"; + cctoolsVersion = "949.0.1"; + ld64Version = "512.4"; + llvmVersion = "8.0.0"; + clangVersion = "11.0.0"; + } + { + version = "11.2"; + hash = "sha256-8qFEgRVhgOomSnJk23WaM/nACK9JFmiIICjUfT/Co9I="; + minDarwinVersion = "10.14.4"; + darwinSdkVersion = "10.15.1"; + cctoolsVersion = "949.0.1"; + ld64Version = "520"; + llvmVersion = "8.0.0"; + clangVersion = "11.0.0"; + } + { + version = "11.3"; + hash = "sha256-6nPCY0rIU2c7nRYDXMWcDHrCm34eqZq6wx157mk3OxM="; + minDarwinVersion = "10.14.4"; + darwinSdkVersion = "10.15.2"; + cctoolsVersion = "949.0.1"; + ld64Version = "530"; + llvmVersion = "8.0.0"; + clangVersion = "11.0.0"; + } + { + version = "11.3.1"; + hash = "sha256-BI8Olfqyxh51jyNpydiRkPwTQ4OK+ZpHUybPkCSL1tw="; + minDarwinVersion = "10.14.4"; + darwinSdkVersion = "10.15.2"; + cctoolsVersion = "949.0.1"; + ld64Version = "530"; + llvmVersion = "8.0.0"; + clangVersion = "11.0.0"; + } + { + version = "11.4"; + hash = "sha256-x/sLazHPs4SoCPKJ0CgFbTEmxlzJeZ7HtinMlse6uRg="; + minDarwinVersion = "10.15.2"; + darwinSdkVersion = "10.15.4"; + cctoolsVersion = "959.0.1"; + ld64Version = "556.5"; + llvmVersion = "9.0.0"; + clangVersion = "11.0.3"; + } + { + version = "11.5"; + hash = "sha256-fLqMcIOM6ZqacTBMF6N0swJzOmnt+FfYlDt8m/BXP7Y="; + minDarwinVersion = "10.15.2"; + darwinSdkVersion = "10.15.4"; + cctoolsVersion = "959.0.1"; + ld64Version = "556.5"; + llvmVersion = "9.0.0"; + clangVersion = "11.0.3"; + } + { + version = "11.6"; + hash = "sha256-nVDsbD7pGCM2jgXzRtV+VIFc/klmX05W6x/eOAOHjvg="; + minDarwinVersion = "10.15.2"; + darwinSdkVersion = "10.15.6"; + cctoolsVersion = "959.0.1"; + ld64Version = "556.5"; + llvmVersion = "9.0.0"; + clangVersion = "11.0.3"; + } + { + version = "11.7"; + hash = "sha256-stKqjXmERNQ4qF/73EE34oLtfF9+WZXK9BwXSVjLQhA="; + minDarwinVersion = "10.15.2"; + darwinSdkVersion = "10.15.6"; + cctoolsVersion = "959.0.1"; + ld64Version = "556.5"; + llvmVersion = "9.0.0"; + clangVersion = "11.0.3"; + } + { + version = "12"; + hash = "sha256-H8Hcre9dB2v2VT8/SrEkU+RZ2rZRiM0JqMX6i4yoffA="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "10.15.6"; + cctoolsVersion = "973.0.1"; + ld64Version = "609"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.0.1"; + hash = "sha256-gK7PZ22aR3ow72pSjr7tUIOsgoAEUqcMZgNCEFVp29w="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "10.15.6"; + cctoolsVersion = "973.0.1"; + ld64Version = "609"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.1"; + hash = "sha256-l4+MW8IWMqR/9dxd9FVtfxJs3M/qtIcj6nyQ2cjxLfI="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "10.15.6"; + cctoolsVersion = "973.0.1"; + ld64Version = "609"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.2"; + hash = "sha256-G8jku/9WB8Q1zgKWGbSv06bSWE385sPlc7xnfonjIJ4="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "11.0"; + cctoolsVersion = "973.4"; + ld64Version = "609.7"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.3"; + hash = "sha256-CYU2fAeT+DWiK/mpRoGv57RjGfseL23BDU57SokPjk8="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "11.1"; + cctoolsVersion = "977.1"; + ld64Version = "609.8"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.4"; + hash = "sha256-Qw4j+XFry85/AviHQVhjjjKLAfmRNNwMGN5G8FheJwQ="; + minDarwinVersion = "10.15.4"; + darwinSdkVersion = "11.1"; + cctoolsVersion = "977.1"; + ld64Version = "609.8"; + llvmVersion = "10.0.0"; + clangVersion = "12.0.0"; + } + { + version = "12.5"; + hash = "sha256-xiGffnV0P9Ojd6IrJSXILUX4oznPif7zm00WAksn3qU="; + minDarwinVersion = "11.0"; + darwinSdkVersion = "11.3"; + cctoolsVersion = "980"; + ld64Version = "650.9"; + llvmVersion = "11.1.0"; + clangVersion = "12.0.5"; + } + { + version = "12.5.1"; + hash = "sha256-zL0kS86ZzBkIrKLPKvWguDvXj9Tqbr7uR/VZaT/uZ9A="; + minDarwinVersion = "11.0"; + darwinSdkVersion = "11.3"; + cctoolsVersion = "980.1"; + ld64Version = "650.9"; + llvmVersion = "11.1.0"; + clangVersion = "12.0.5"; + } + { + version = "13"; + hash = "sha256-uTY6d5DBu4OOQLkxs3ExDfLXh50rE2LLlqtCbk3Qn6E="; + minDarwinVersion = "11.3"; + darwinSdkVersion = "11.3"; + cctoolsVersion = "986"; + ld64Version = "711"; + llvmVersion = "12.0.0"; + clangVersion = "13.0.0"; + } + { + version = "13.1"; + hash = "sha256-vd+4eFVaAyvXsdaExcfbDZSXOwkpt+rEbkBYSMjdUEA="; + minDarwinVersion = "11.3"; + darwinSdkVersion = "12.0"; + cctoolsVersion = "986"; + ld64Version = "711"; + llvmVersion = "12.0.0"; + clangVersion = "13.0.0"; + } + { + version = "13.2"; + hash = "sha256-guJXm/QnMfvUZwAcJwoy0QeO+DpDcUhs8AxVKvm9tYQ="; + minDarwinVersion = "11.3"; + darwinSdkVersion = "12.1"; + cctoolsVersion = "986"; + ld64Version = "711"; + llvmVersion = "12.0.0"; + clangVersion = "13.0.0"; + } + { + version = "13.2.1"; + hash = "sha256-r832Uu+Q8utK4zN0CtwiMCvMYT5HstWInyq4cNIaZJM="; + minDarwinVersion = "11.3"; + darwinSdkVersion = "12.1"; + cctoolsVersion = "986"; + ld64Version = "711"; + llvmVersion = "12.0.0"; + clangVersion = "13.0.0"; + } + { + version = "13.3"; + hash = "sha256-p2zaWMpmUeNHQtYOOaVdhCt3cgapvzL3l73/J+UwzCE="; + minDarwinVersion = "12.0"; + darwinSdkVersion = "12.3"; + cctoolsVersion = "994.1"; + ld64Version = "762"; + llvmVersion = "13.0.0"; + clangVersion = "13.1.6"; + } + { + version = "13.3.1"; + hash = "sha256-j71vpJVJpyj/IOlL+4+5lYgOlhf/zn+7ExIHbxL51cQ="; + minDarwinVersion = "12.0"; + darwinSdkVersion = "12.3"; + cctoolsVersion = "994.1"; + ld64Version = "762"; + llvmVersion = "13.0.0"; + clangVersion = "13.1.6"; + } + { + version = "13.4"; + hash = "sha256-IY1coss90GlBeJg/HQPMU8v2rOOxsqlY5q+2Qxe8nnY="; + minDarwinVersion = "12.0"; + darwinSdkVersion = "12.3"; + cctoolsVersion = "994.1"; + ld64Version = "764"; + llvmVersion = "13.0.0"; + clangVersion = "13.1.6"; + } + { + version = "13.4.1"; + hash = "sha256-Jk8fLgvnODoIhuVJqfV0KrpBBL40fRrHJbFmm44NRKE="; + minDarwinVersion = "12.0"; + darwinSdkVersion = "12.3"; + cctoolsVersion = "994.1"; + ld64Version = "764"; + llvmVersion = "13.0.0"; + clangVersion = "13.1.6"; + } + { + version = "14"; + hash = "sha256-E+wjPgQx/lbYAsauksdmGsygL5VPBA8R9pHB93eA7T0="; + minDarwinVersion = "12.5"; + darwinSdkVersion = "12.3"; + cctoolsVersion = "1001.2"; + ld64Version = "819.6"; + llvmVersion = "14.0.0"; + clangVersion = "14.0.0"; + } + { + version = "14.1"; + hash = "sha256-QJGAUVIhuDYyzDNttBPv5lIGOfvkYqdOFSUAr5tlkfs="; + minDarwinVersion = "12.5"; + darwinSdkVersion = "13.0"; + cctoolsVersion = "1001.2"; + ld64Version = "820.1"; + llvmVersion = "14.0.0"; + clangVersion = "14.0.0"; + } + { + version = "14.2"; + hash = "sha256-wLwuz/cH53sB7FW7JOA+nRFRSWSQRzKa3wqc9YhO6GA="; + minDarwinVersion = "12.5"; + darwinSdkVersion = "13.1"; + cctoolsVersion = "1001.2"; + ld64Version = "820.1"; + llvmVersion = "14.0.0"; + clangVersion = "14.0.0"; + } + { + version = "14.3"; + hash = "sha256-bUg6Z8oS3dxfEWPMRJCtmaMbR7Yd8g1PEG55xp7ZlFk="; + minDarwinVersion = "13.0"; + darwinSdkVersion = "13.3"; + cctoolsVersion = "1005.2"; + ld64Version = "857.1"; + llvmVersion = "15.0.0"; + clangVersion = "14.0.3"; + } +] diff --git a/pkgs/os-specific/darwin/xcode/require-xcode.nix b/pkgs/os-specific/darwin/xcode/require-xcode.nix new file mode 100644 index 0000000000000..cdb65bdcad3ce --- /dev/null +++ b/pkgs/os-specific/darwin/xcode/require-xcode.nix @@ -0,0 +1,49 @@ +{ + lib, + requireFile, + stdenv, +}: +# Generic build for Xcode.app +{ + hash, + version, +}: let + appName = "Xcode.app"; + xipName = "Xcode_" + version + ".xip"; + # TODO(alexfmpe): Find out how to validate the .xip signature in Linux + unxipCmd = + if stdenv.buildPlatform.isDarwin + then '' + open -W ${xipName} + rm -rf ${xipName} + '' + else '' + xar -xf ${xipName} + rm -rf ${xipName} + pbzx -n Content | cpio -i + rm Content Metadata + ''; + url = "https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_${version}/${xipName}"; + app = requireFile { + inherit url hash; + name = appName; + hashMode = "recursive"; + message = '' + Unfortunately, we cannot download ${appName} automatically. + Please go to ${url} + to download it yourself, and add it to the Nix store by running the following commands. + Note: download (~ 5GB), extraction and storing of Xcode will take a while + + ${unxipCmd} + nix-store --add-fixed --recursive sha256 Xcode.app + rm -rf Xcode.app + ''; + }; + meta = with lib; { + homepage = "https://developer.apple.com/downloads/"; + description = "Apple's Xcode SDK"; + license = licenses.unfree; + platforms = platforms.darwin ++ platforms.linux; + }; +in + app.overrideAttrs (oldAttrs: oldAttrs // {inherit version meta;}) diff --git a/pkgs/tools/misc/fclones/default.nix b/pkgs/tools/misc/fclones/default.nix index 4a22def16c2cb..1add6f7026621 100644 --- a/pkgs/tools/misc/fclones/default.nix +++ b/pkgs/tools/misc/fclones/default.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-C7DKwEMYdypfItflMOL7rjbAdXDRsXDNoPlc9j6aBRA="; buildInputs = lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.frameworks.AppKit + darwin.apple_sdk_11_1.frameworks.AppKit ]; # device::test_physical_device_name test fails on Darwin diff --git a/pkgs/tools/misc/toastify/default.nix b/pkgs/tools/misc/toastify/default.nix index 21e0d7091c18a..332fd4513b296 100644 --- a/pkgs/tools/misc/toastify/default.nix +++ b/pkgs/tools/misc/toastify/default.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ecc3z0T82pYR9gSYZYxRYhse9IroydPOAtRgDWqHTbo="; buildInputs = lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.frameworks.Cocoa + darwin.apple_sdk_11_1.frameworks.Cocoa ]; preBuild = lib.optionalString stdenv.isDarwin '' diff --git a/pkgs/tools/system/bottom/default.nix b/pkgs/tools/system/bottom/default.nix index efd7fda4a2760..ba96f83eaff80 100644 --- a/pkgs/tools/system/bottom/default.nix +++ b/pkgs/tools/system/bottom/default.nix @@ -22,7 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk_11_0.frameworks.Foundation + darwin.apple_sdk_11_1.frameworks.Foundation ]; doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2b213f19c3cc2..0e2236d23b3d1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1275,7 +1275,7 @@ with pkgs; _6tunnel = callPackage ../tools/networking/6tunnel { }; - _7zz = darwin.apple_sdk_11_0.callPackage ../tools/archivers/7zz { }; + _7zz = darwin.apple_sdk_11_1.callPackage ../tools/archivers/7zz { }; _9pfs = callPackage ../tools/filesystems/9pfs { }; @@ -1607,7 +1607,7 @@ with pkgs; hexdiff = callPackage ../tools/misc/hexdiff { }; - httm = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/httm { }; + httm = darwin.apple_sdk_11_1.callPackage ../tools/filesystems/httm { }; inherit (callPackage ../tools/networking/ivpn/default.nix {}) ivpn ivpn-service; @@ -2076,8 +2076,8 @@ with pkgs; git-town = callPackage ../applications/version-management/git-town { }; - git-trim = darwin.apple_sdk_11_0.callPackage ../applications/version-management/git-trim { - inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation Security; + git-trim = darwin.apple_sdk_11_1.callPackage ../applications/version-management/git-trim { + inherit (darwin.apple_sdk_11_1.frameworks) IOKit CoreFoundation Security; }; git-up = callPackage ../applications/version-management/git-up { @@ -2461,16 +2461,16 @@ with pkgs; ### APPLICATIONS/EMULATORS/BSNES - ares = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/ares { }; + ares = darwin.apple_sdk_11_1.callPackage ../applications/emulators/bsnes/ares { }; - bsnes-hd = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/bsnes-hd { }; + bsnes-hd = darwin.apple_sdk_11_1.callPackage ../applications/emulators/bsnes/bsnes-hd { }; higan = callPackage ../applications/emulators/bsnes/higan { }; ### APPLICATIONS/EMULATORS/DOLPHIN-EMU dolphin-emu = qt6Packages.callPackage ../applications/emulators/dolphin-emu { - inherit (darwin.apple_sdk_11_0.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox; + inherit (darwin.apple_sdk_11_1.frameworks) CoreBluetooth ForceFeedback IOBluetooth IOKit OpenGL VideoToolbox; inherit (darwin) moltenvk; stdenv = if stdenv.isDarwin && stdenv.isAarch64 then llvmPackages_14.stdenv @@ -2651,11 +2651,11 @@ with pkgs; kermit-terminal = callPackage ../applications/terminal-emulators/kermit-terminal { }; - kitty = darwin.apple_sdk_11_0.callPackage ../applications/terminal-emulators/kitty { + kitty = darwin.apple_sdk_11_1.callPackage ../applications/terminal-emulators/kitty { go = go_1_20; harfbuzz = harfbuzz.override { withCoreText = stdenv.isDarwin; }; - inherit (darwin.apple_sdk_11_0) Libsystem; - inherit (darwin.apple_sdk_11_0.frameworks) + inherit (darwin.apple_sdk_11_1) Libsystem; + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa Kernel UniformTypeIdentifiers @@ -2669,7 +2669,7 @@ with pkgs; microcom = callPackage ../applications/terminal-emulators/microcom { }; - mlterm = darwin.apple_sdk_11_0.callPackage ../applications/terminal-emulators/mlterm { }; + mlterm = darwin.apple_sdk_11_1.callPackage ../applications/terminal-emulators/mlterm { }; mlterm-wayland = mlterm.override { enableX11 = false; }; @@ -2731,8 +2731,8 @@ with pkgs; wayst = callPackage ../applications/terminal-emulators/wayst { }; - wezterm = darwin.apple_sdk_11_0.callPackage ../applications/terminal-emulators/wezterm { - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreGraphics Foundation UserNotifications System; + wezterm = darwin.apple_sdk_11_1.callPackage ../applications/terminal-emulators/wezterm { + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa CoreGraphics Foundation UserNotifications System; }; x3270 = callPackage ../applications/terminal-emulators/x3270 { }; @@ -2814,7 +2814,7 @@ with pkgs; android-backup-extractor = callPackage ../tools/backup/android-backup-extractor { }; - android-tools = lowPrio (darwin.apple_sdk_11_0.callPackage ../tools/misc/android-tools { }); + android-tools = lowPrio (darwin.apple_sdk_11_1.callPackage ../tools/misc/android-tools { }); anew = callPackage ../tools/text/anew { }; @@ -3471,8 +3471,8 @@ with pkgs; gmnitohtml = callPackage ../applications/misc/gmnitohtml { }; - go2tv = darwin.apple_sdk_11_0.callPackage ../applications/video/go2tv { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa Kernel UserNotifications; + go2tv = darwin.apple_sdk_11_1.callPackage ../applications/video/go2tv { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon Cocoa Kernel UserNotifications; }; go2tv-lite = go2tv.override { withGui = false; }; @@ -5044,7 +5044,7 @@ with pkgs; ghdorker = callPackage ../tools/security/ghdorker { }; - ghidra = if stdenv.isDarwin then darwin.apple_sdk_11_0.callPackage ../tools/security/ghidra/build.nix {} + ghidra = if stdenv.isDarwin then darwin.apple_sdk_11_1.callPackage ../tools/security/ghidra/build.nix {} else callPackage ../tools/security/ghidra/build.nix { }; ghidra-bin = callPackage ../tools/security/ghidra { }; @@ -5715,9 +5715,9 @@ with pkgs; proxmox-backup-client = callPackage ../applications/backup/proxmox-backup-client { }; - pueue = darwin.apple_sdk_11_0.callPackage ../applications/misc/pueue { - inherit (darwin.apple_sdk_11_0) Libsystem; - inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration; + pueue = darwin.apple_sdk_11_1.callPackage ../applications/misc/pueue { + inherit (darwin.apple_sdk_11_1) Libsystem; + inherit (darwin.apple_sdk_11_1.frameworks) SystemConfiguration; }; pixcat = with python3Packages; toPythonApplication pixcat; @@ -5730,9 +5730,9 @@ with pkgs; pyznap = python3Packages.callPackage ../tools/backup/pyznap { }; - procs = darwin.apple_sdk_11_0.callPackage ../tools/admin/procs { - inherit (darwin.apple_sdk_11_0.frameworks) Security; - inherit (darwin.apple_sdk_11_0) Libsystem; + procs = darwin.apple_sdk_11_1.callPackage ../tools/admin/procs { + inherit (darwin.apple_sdk_11_1.frameworks) Security; + inherit (darwin.apple_sdk_11_1) Libsystem; }; procyon = callPackage ../tools/misc/procyon { }; @@ -6125,7 +6125,7 @@ with pkgs; bup = callPackage ../tools/backup/bup { }; - bupstash = darwin.apple_sdk_11_0.callPackage ../tools/backup/bupstash { }; + bupstash = darwin.apple_sdk_11_1.callPackage ../tools/backup/bupstash { }; burp = callPackage ../tools/backup/burp { }; @@ -6405,7 +6405,7 @@ with pkgs; libotf = callPackage ../tools/inputmethods/m17n-lib/otf.nix { }; netbird = callPackage ../tools/networking/netbird { - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa IOKit Kernel UserNotifications WebKit; + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa IOKit Kernel UserNotifications WebKit; }; netbird-ui = netbird.override { @@ -6482,8 +6482,8 @@ with pkgs; agebox = callPackage ../tools/security/agebox { }; - age-plugin-yubikey = darwin.apple_sdk_11_0.callPackage ../tools/security/age-plugin-yubikey { - inherit (darwin.apple_sdk_11_0.frameworks) Foundation PCSC IOKit; + age-plugin-yubikey = darwin.apple_sdk_11_1.callPackage ../tools/security/age-plugin-yubikey { + inherit (darwin.apple_sdk_11_1.frameworks) Foundation PCSC IOKit; }; artim-dark = callPackage ../data/themes/artim-dark { }; @@ -10872,7 +10872,7 @@ with pkgs; tinystatus = callPackage ../tools/networking/tinystatus { }; - toastify = darwin.apple_sdk_11_0.callPackage ../tools/misc/toastify {}; + toastify = darwin.apple_sdk_11_1.callPackage ../tools/misc/toastify {}; tuc = callPackage ../tools/text/tuc { }; @@ -11312,8 +11312,8 @@ with pkgs; plantuml-server = callPackage ../tools/misc/plantuml-server { }; - plan9port = darwin.apple_sdk_11_0.callPackage ../tools/system/plan9port { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa IOKit Metal QuartzCore; + plan9port = darwin.apple_sdk_11_1.callPackage ../tools/system/plan9port { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon Cocoa IOKit Metal QuartzCore; inherit (darwin) DarwinTools; }; @@ -11617,8 +11617,8 @@ with pkgs; remarshal = with python3Packages; toPythonApplication remarshal; - rehex = darwin.apple_sdk_11_0.callPackage ../applications/editors/rehex { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa IOKit; + rehex = darwin.apple_sdk_11_1.callPackage ../applications/editors/rehex { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon Cocoa IOKit; }; rig = callPackage ../tools/misc/rig { }; @@ -11666,8 +11666,8 @@ with pkgs; qarte = libsForQt5.callPackage ../applications/video/qarte { }; - qdrant = darwin.apple_sdk_11_0.callPackage ../servers/search/qdrant { - inherit (darwin.apple_sdk_11_0.frameworks) Security; + qdrant = darwin.apple_sdk_11_1.callPackage ../servers/search/qdrant { + inherit (darwin.apple_sdk_11_1.frameworks) Security; }; qlcplus = libsForQt5.callPackage ../applications/misc/qlcplus { }; @@ -11709,7 +11709,7 @@ with pkgs; qovery-cli = callPackage ../tools/admin/qovery-cli { }; qownnotes = qt6Packages.callPackage ../applications/office/qownnotes { - 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; }; qpdf = callPackage ../development/libraries/qpdf { }; @@ -11717,7 +11717,7 @@ with pkgs; qprint = callPackage ../tools/text/qprint { }; qscintilla = libsForQt5.callPackage ../development/libraries/qscintilla { - 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; }; qscintilla-qt4 = callPackage ../development/libraries/qscintilla-qt4 { }; @@ -11959,10 +11959,10 @@ with pkgs; rnnoise = callPackage ../development/libraries/rnnoise { }; - # Use `apple_sdk_11_0` because `apple_sdk.libs` does not provide `simd` - rnnoise-plugin = darwin.apple_sdk_11_0.callPackage ../development/libraries/rnnoise-plugin { - inherit (darwin.apple_sdk_11_0.frameworks) WebKit MetalKit CoreAudioKit; - inherit (darwin.apple_sdk_11_0.libs) simd; + # Use `apple_sdk_11_1` because `apple_sdk.libs` does not provide `simd` + rnnoise-plugin = darwin.apple_sdk_11_1.callPackage ../development/libraries/rnnoise-plugin { + inherit (darwin.apple_sdk_11_1.frameworks) WebKit MetalKit CoreAudioKit; + inherit (darwin.apple_sdk_11_1.libs) simd; }; rnote = callPackage ../applications/graphics/rnote { @@ -12097,7 +12097,7 @@ with pkgs; s3bro = callPackage ../tools/admin/s3bro { }; - s3fs = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/s3fs { }; + s3fs = darwin.apple_sdk_11_1.callPackage ../tools/filesystems/s3fs { }; s3cmd = python3Packages.callPackage ../tools/networking/s3cmd { }; @@ -12225,7 +12225,7 @@ with pkgs; secp256k1 = callPackage ../tools/security/secp256k1 { }; - securefs = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/securefs { }; + securefs = darwin.apple_sdk_11_1.callPackage ../tools/filesystems/securefs { }; seehecht = callPackage ../tools/text/seehecht { }; @@ -12385,8 +12385,8 @@ with pkgs; sixpair = callPackage ../tools/misc/sixpair { }; - sketchybar = darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/sketchybar { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa CoreWLAN DisplayServices SkyLight; + sketchybar = darwin.apple_sdk_11_1.callPackage ../os-specific/darwin/sketchybar { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon Cocoa CoreWLAN DisplayServices SkyLight; }; skippy-xd = callPackage ../tools/X11/skippy-xd { }; @@ -12458,8 +12458,8 @@ with pkgs; snallygaster = callPackage ../tools/security/snallygaster { }; - snapcast = darwin.apple_sdk_11_0.callPackage ../applications/audio/snapcast { - inherit (darwin.apple_sdk_11_0.frameworks) IOKit AudioToolbox; + snapcast = darwin.apple_sdk_11_1.callPackage ../applications/audio/snapcast { + inherit (darwin.apple_sdk_11_1.frameworks) IOKit AudioToolbox; pulseaudioSupport = config.pulseaudio or stdenv.isLinux; }; @@ -12622,7 +12622,7 @@ with pkgs; squashfsTools = callPackage ../tools/filesystems/squashfs { }; - squashfs-tools-ng = darwin.apple_sdk_11_0.callPackage ../tools/filesystems/squashfs-tools-ng { }; + squashfs-tools-ng = darwin.apple_sdk_11_1.callPackage ../tools/filesystems/squashfs-tools-ng { }; squashfuse = callPackage ../tools/filesystems/squashfuse { }; @@ -13124,7 +13124,7 @@ with pkgs; toxvpn = callPackage ../tools/networking/toxvpn { }; - toybox = darwin.apple_sdk_11_0.callPackage ../tools/misc/toybox { }; + toybox = darwin.apple_sdk_11_1.callPackage ../tools/misc/toybox { }; trackma = callPackage ../tools/misc/trackma { }; @@ -13626,7 +13626,7 @@ with pkgs; watchlog = callPackage ../tools/misc/watchlog { }; watchman = callPackage ../development/tools/watchman { - inherit (darwin.apple_sdk_11_0.frameworks) CoreServices; + inherit (darwin.apple_sdk_11_1.frameworks) CoreServices; }; wavefunctioncollapse = callPackage ../tools/graphics/wavefunctioncollapse { }; @@ -14808,14 +14808,14 @@ with pkgs; inherit (callPackages ../development/compilers/crystal { llvmPackages = llvmPackages_13; - 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; }) crystal_1_2 crystal_1_7; inherit (callPackages ../development/compilers/crystal { llvmPackages = llvmPackages_15; - 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; }) crystal_1_8 crystal; @@ -15556,7 +15556,7 @@ with pkgs; gwt240 = callPackage ../development/compilers/gwt/2.4.0.nix { }; - hvm = darwin.apple_sdk_11_0.callPackage ../development/compilers/hvm { }; + hvm = darwin.apple_sdk_11_1.callPackage ../development/compilers/hvm { }; iay = callPackage ../tools/misc/iay { inherit (darwin.apple_sdk.frameworks) AppKit Security Foundation Cocoa; @@ -15710,7 +15710,7 @@ with pkgs; jwasm = callPackage ../development/compilers/jwasm { }; - kind2 = darwin.apple_sdk_11_0.callPackage ../development/compilers/kind2 { }; + kind2 = darwin.apple_sdk_11_1.callPackage ../development/compilers/kind2 { }; knightos-genkfs = callPackage ../development/tools/knightos/genkfs { }; @@ -16498,6 +16498,7 @@ with pkgs; cargo-udeps = callPackage ../development/tools/rust/cargo-udeps { inherit (darwin.apple_sdk.frameworks) CoreServices Security SystemConfiguration; }; + cargo-ui = callPackage ../development/tools/rust/cargo-ui { }; cargo-unused-features = callPackage ../development/tools/rust/cargo-unused-features { }; @@ -16511,8 +16512,8 @@ with pkgs; cargo-wasi = callPackage ../development/tools/rust/cargo-wasi { inherit (darwin.apple_sdk.frameworks) Security; }; - cargo-watch = darwin.apple_sdk_11_0.callPackage ../development/tools/rust/cargo-watch { - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreServices Foundation; + cargo-watch = darwin.apple_sdk_11_1.callPackage ../development/tools/rust/cargo-watch { + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa CoreServices Foundation; }; cargo-wipe = callPackage ../development/tools/rust/cargo-wipe { }; cargo-workspaces = callPackage ../development/tools/rust/cargo-workspaces { @@ -16688,7 +16689,7 @@ with pkgs; gconf = gnome2.GConf; }; - tinycc = darwin.apple_sdk_11_0.callPackage ../development/compilers/tinycc { }; + tinycc = darwin.apple_sdk_11_1.callPackage ../development/compilers/tinycc { }; tinygo = callPackage ../development/compilers/tinygo { llvmPackages = llvmPackages_14; @@ -17652,8 +17653,8 @@ with pkgs; kotlin-language-server = callPackage ../development/tools/language-servers/kotlin-language-server { }; - lua-language-server = darwin.apple_sdk_11_0.callPackage ../development/tools/language-servers/lua-language-server { - inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Foundation; + lua-language-server = darwin.apple_sdk_11_1.callPackage ../development/tools/language-servers/lua-language-server { + inherit (darwin.apple_sdk_11_1.frameworks) CoreFoundation Foundation; }; metals = callPackage ../development/tools/language-servers/metals { }; @@ -17822,13 +17823,13 @@ with pkgs; bazel_self = bazel_5; }; - bazel_6 = darwin.apple_sdk_11_0.callPackage ../development/tools/build-managers/bazel/bazel_6 { + bazel_6 = darwin.apple_sdk_11_1.callPackage ../development/tools/build-managers/bazel/bazel_6 { inherit (darwin) cctools; - inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation; + inherit (darwin.apple_sdk_11_1.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; stdenv = if stdenv.isDarwin then - darwin.apple_sdk_11_0.stdenv else + darwin.apple_sdk_11_1.stdenv else if stdenv.cc.isClang then llvmPackages.stdenv else stdenv; bazel_self = bazel_6; }; @@ -17854,7 +17855,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreServices; }; - buildBazelPackage = darwin.apple_sdk_11_0.callPackage ../build-support/build-bazel-package { }; + buildBazelPackage = darwin.apple_sdk_11_1.callPackage ../build-support/build-bazel-package { }; bear = callPackage ../development/tools/build-managers/bear { }; @@ -18306,9 +18307,9 @@ with pkgs; dot2tex = with python3.pkgs; toPythonApplication dot2tex; - doxygen = darwin.apple_sdk_11_0.callPackage ../development/tools/documentation/doxygen { + doxygen = darwin.apple_sdk_11_1.callPackage ../development/tools/documentation/doxygen { qt5 = null; - inherit (darwin.apple_sdk_11_0.frameworks) CoreServices; + inherit (darwin.apple_sdk_11_1.frameworks) CoreServices; }; doxygen_gui = lowPrio (doxygen.override { inherit qt5; }); @@ -18770,7 +18771,7 @@ with pkgs; libwtk-sdl2 = callPackage ../development/libraries/libwtk-sdl2 { }; linuxkit = callPackage ../development/tools/misc/linuxkit { - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa Virtualization; + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa Virtualization; inherit (darwin) sigtool; }; @@ -19099,7 +19100,7 @@ with pkgs; hammer = callPackage ../development/tools/parsing/hammer { }; - rcodesign = darwin.apple_sdk_11_0.callPackage ../development/tools/rcodesign {}; + rcodesign = darwin.apple_sdk_11_1.callPackage ../development/tools/rcodesign {}; rdocker = callPackage ../development/tools/rdocker { }; @@ -19260,7 +19261,7 @@ with pkgs; slimerjs = callPackage ../development/tools/slimerjs { }; slint-lsp = callPackage ../development/tools/misc/slint-lsp { - inherit (darwin.apple_sdk_11_0.frameworks) AppKit CoreGraphics CoreServices CoreText Foundation OpenGL; + inherit (darwin.apple_sdk_11_1.frameworks) AppKit CoreGraphics CoreServices CoreText Foundation OpenGL; }; sloccount = callPackage ../development/tools/misc/sloccount { }; @@ -19675,7 +19676,7 @@ with pkgs; armadillo = callPackage ../development/libraries/armadillo { }; - arrayfire = darwin.apple_sdk_11_0.callPackage ../development/libraries/arrayfire { }; + arrayfire = darwin.apple_sdk_11_1.callPackage ../development/libraries/arrayfire { }; arrow-cpp = callPackage ../development/libraries/arrow-cpp { }; @@ -21681,7 +21682,7 @@ with pkgs; libde265 = callPackage ../development/libraries/libde265 { }; - libdeflate = darwin.apple_sdk_11_0.callPackage ../development/libraries/libdeflate { }; + libdeflate = darwin.apple_sdk_11_1.callPackage ../development/libraries/libdeflate { }; libdeltachat = callPackage ../development/libraries/libdeltachat { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration; @@ -21838,7 +21839,7 @@ with pkgs; libgringotts = callPackage ../development/libraries/libgringotts { }; libgrss = callPackage ../development/libraries/libgrss { - inherit (darwin.apple_sdk_11_0.frameworks) Foundation AppKit; + inherit (darwin.apple_sdk_11_1.frameworks) Foundation AppKit; }; libgweather = callPackage ../development/libraries/libgweather { }; @@ -22994,13 +22995,13 @@ with pkgs; # Keep Mesa 22.3 for now because 23.0 does not build on Darwin. # FIXME: remove, also investigate why we even need Mesa on Darwin. - mesa_22_3 = darwin.apple_sdk_11_0.callPackage ../development/libraries/mesa/22.3.nix { - inherit (darwin.apple_sdk_11_0.frameworks) OpenGL; - inherit (darwin.apple_sdk_11_0.libs) Xplugin; + mesa_22_3 = darwin.apple_sdk_11_1.callPackage ../development/libraries/mesa/22.3.nix { + inherit (darwin.apple_sdk_11_1.frameworks) OpenGL; + inherit (darwin.apple_sdk_11_1.libs) Xplugin; }; - mesa_23_0 = darwin.apple_sdk_11_0.callPackage ../development/libraries/mesa/23.0.nix { - inherit (darwin.apple_sdk_11_0.frameworks) OpenGL; - inherit (darwin.apple_sdk_11_0.libs) Xplugin; + mesa_23_0 = darwin.apple_sdk_11_1.callPackage ../development/libraries/mesa/23.0.nix { + inherit (darwin.apple_sdk_11_1.frameworks) OpenGL; + inherit (darwin.apple_sdk_11_1.libs) Xplugin; }; mesa = if stdenv.isDarwin then mesa_22_3 else mesa_23_0; @@ -23026,8 +23027,8 @@ with pkgs; micropython = callPackage ../development/interpreters/micropython { }; - MIDIVisualizer = darwin.apple_sdk_11_0.callPackage ../applications/audio/midi-visualizer { - inherit (darwin.apple_sdk_11_0.frameworks) AppKit Cocoa Carbon CoreAudio CoreMIDI CoreServices Kernel; + MIDIVisualizer = darwin.apple_sdk_11_1.callPackage ../applications/audio/midi-visualizer { + inherit (darwin.apple_sdk_11_1.frameworks) AppKit Cocoa Carbon CoreAudio CoreMIDI CoreServices Kernel; }; mimalloc = callPackage ../development/libraries/mimalloc { }; @@ -23041,7 +23042,7 @@ with pkgs; minizip-ng = callPackage ../development/libraries/minizip-ng { }; mkvtoolnix = libsForQt5.callPackage ../applications/video/mkvtoolnix { - 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; }; mkvtoolnix-cli = mkvtoolnix.override { @@ -23362,8 +23363,8 @@ with pkgs; openssl = openssl_legacy; }; - opencolorio = darwin.apple_sdk_11_0.callPackage ../development/libraries/opencolorio { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon GLUT Cocoa; + opencolorio = darwin.apple_sdk_11_1.callPackage ../development/libraries/opencolorio { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon GLUT Cocoa; }; opencolorio_1 = callPackage ../development/libraries/opencolorio/1.x.nix { }; @@ -23669,7 +23670,7 @@ with pkgs; darwin buildPackages; inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; inherit config; - 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; }); libsForQt5 = recurseIntoAttrs (import ./qt5-packages.nix { @@ -23686,7 +23687,7 @@ with pkgs; qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { inherit lib pkgs qt6; - 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; }); quark-engine = callPackage ../tools/security/quark-engine { }; @@ -23790,7 +23791,7 @@ with pkgs; useQt6 = true; }; - randomx = darwin.apple_sdk_11_0.callPackage ../development/libraries/randomx { }; + randomx = darwin.apple_sdk_11_1.callPackage ../development/libraries/randomx { }; remodel = callPackage ../development/tools/remodel { inherit (darwin.apple_sdk.frameworks) Security; @@ -24237,7 +24238,7 @@ with pkgs; subtitleeditor = callPackage ../applications/video/subtitleeditor { }; - suil = darwin.apple_sdk_11_0.callPackage ../development/libraries/audio/suil { }; + suil = darwin.apple_sdk_11_1.callPackage ../development/libraries/audio/suil { }; sundials = callPackage ../development/libraries/sundials { python = python3; @@ -24420,7 +24421,7 @@ with pkgs; ucommon = callPackage ../development/libraries/ucommon { }; - v8 = darwin.apple_sdk_11_0.callPackage ../development/libraries/v8 { }; + v8 = darwin.apple_sdk_11_1.callPackage ../development/libraries/v8 { }; vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; @@ -24537,7 +24538,7 @@ with pkgs; wavpack = callPackage ../development/libraries/wavpack { }; - wayland = darwin.apple_sdk_11_0.callPackage ../development/libraries/wayland { }; + wayland = darwin.apple_sdk_11_1.callPackage ../development/libraries/wayland { }; wayland-scanner = wayland.bin; wayland-protocols = callPackage ../development/libraries/wayland/protocols.nix { }; @@ -24727,11 +24728,11 @@ with pkgs; libzra = callPackage ../development/libraries/libzra { }; # requires a newer Apple SDK - zig_0_9 = darwin.apple_sdk_11_0.callPackage ../development/compilers/zig/0.9.1.nix { + zig_0_9 = darwin.apple_sdk_11_1.callPackage ../development/compilers/zig/0.9.1.nix { llvmPackages = llvmPackages_13; }; # requires a newer Apple SDK - zig_0_10 = darwin.apple_sdk_11_0.callPackage ../development/compilers/zig/0.10.nix { + zig_0_10 = darwin.apple_sdk_11_1.callPackage ../development/compilers/zig/0.10.nix { llvmPackages = llvmPackages_15; }; zig = zig_0_10; @@ -24853,35 +24854,35 @@ with pkgs; buildGoPackage = buildGo120Package; # requires a newer Apple SDK - go_1_18 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.18.nix { - inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security; + go_1_18 = darwin.apple_sdk_11_1.callPackage ../development/compilers/go/1.18.nix { + inherit (darwin.apple_sdk_11_1.frameworks) Foundation Security; }; - buildGo118Module = darwin.apple_sdk_11_0.callPackage ../build-support/go/module.nix { + buildGo118Module = darwin.apple_sdk_11_1.callPackage ../build-support/go/module.nix { go = buildPackages.go_1_18; }; - buildGo118Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix{ + buildGo118Package = darwin.apple_sdk_11_1.callPackage ../build-support/go/package.nix{ go = buildPackages.go_1_18; }; # requires a newer Apple SDK - go_1_19 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.19.nix { - inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security; + go_1_19 = darwin.apple_sdk_11_1.callPackage ../development/compilers/go/1.19.nix { + inherit (darwin.apple_sdk_11_1.frameworks) Foundation Security; }; - buildGo119Module = darwin.apple_sdk_11_0.callPackage ../build-support/go/module.nix { + buildGo119Module = darwin.apple_sdk_11_1.callPackage ../build-support/go/module.nix { go = buildPackages.go_1_19; }; - buildGo119Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix { + buildGo119Package = darwin.apple_sdk_11_1.callPackage ../build-support/go/package.nix { go = buildPackages.go_1_19; }; # requires a newer Apple SDK - go_1_20 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.20.nix { - inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security; + go_1_20 = darwin.apple_sdk_11_1.callPackage ../development/compilers/go/1.20.nix { + inherit (darwin.apple_sdk_11_1.frameworks) Foundation Security; }; - buildGo120Module = darwin.apple_sdk_11_0.callPackage ../build-support/go/module.nix { + buildGo120Module = darwin.apple_sdk_11_1.callPackage ../build-support/go/module.nix { go = buildPackages.go_1_20; }; - buildGo120Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix { + buildGo120Package = darwin.apple_sdk_11_1.callPackage ../build-support/go/package.nix { go = buildPackages.go_1_20; }; @@ -25906,13 +25907,13 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; }; - mongodb-6_0 = darwin.apple_sdk_11_0.callPackage ../servers/nosql/mongodb/6.0.nix { + mongodb-6_0 = darwin.apple_sdk_11_1.callPackage ../servers/nosql/mongodb/6.0.nix { sasl = cyrus_sasl; boost = boost178.override { enableShared = false; }; inherit (darwin) cctools; inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; stdenv = if stdenv.isDarwin then - darwin.apple_sdk_11_0.stdenv.override (old: { + darwin.apple_sdk_11_1.stdenv.override (old: { hostPlatform = old.hostPlatform // { darwinMinVersion = "10.14"; }; buildPlatform = old.buildPlatform // { darwinMinVersion = "10.14"; }; targetPlatform = old.targetPlatform // { darwinMinVersion = "10.14"; }; @@ -26233,7 +26234,7 @@ with pkgs; deadpixi-sam-unstable = callPackage ../applications/editors/deadpixi-sam { }; - samba4 = darwin.apple_sdk_11_0.callPackage ../servers/samba/4.x.nix { }; + samba4 = darwin.apple_sdk_11_1.callPackage ../servers/samba/4.x.nix { }; samba = samba4; @@ -27265,15 +27266,15 @@ with pkgs; nsh = callPackage ../shells/nsh { }; - nushell = darwin.apple_sdk_11_0.callPackage ../shells/nushell { - inherit (darwin.apple_sdk_11_0) Libsystem; - inherit (darwin.apple_sdk_11_0.frameworks) AppKit Security; + nushell = darwin.apple_sdk_11_1.callPackage ../shells/nushell { + inherit (darwin.apple_sdk_11_1) Libsystem; + inherit (darwin.apple_sdk_11_1.frameworks) AppKit Security; }; nu_scripts = callPackage ../shells/nushell/nu_scripts { }; nushellPlugins = callPackage ../shells/nushell/plugins { - inherit (darwin.apple_sdk_11_0.frameworks) IOKit CoreFoundation; + inherit (darwin.apple_sdk_11_1.frameworks) IOKit CoreFoundation; }; nettools = if stdenv.isLinux @@ -27321,8 +27322,8 @@ with pkgs; ginkgo = callPackage ../development/tools/ginkgo { }; - gdlv = darwin.apple_sdk_11_0.callPackage ../development/tools/gdlv { - inherit (darwin.apple_sdk_11_0.frameworks) OpenGL AppKit; + gdlv = darwin.apple_sdk_11_1.callPackage ../development/tools/gdlv { + inherit (darwin.apple_sdk_11_1.frameworks) OpenGL AppKit; }; go-bindata = callPackage ../development/tools/go-bindata { }; @@ -29408,13 +29409,13 @@ with pkgs; bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv + darwin.apple_sdk_11_1.stdenv else stdenv; }; bambootracker-qt6 = qt6Packages.callPackage ../applications/audio/bambootracker { stdenv = if stdenv.hostPlatform.isDarwin then - darwin.apple_sdk_11_0.stdenv + darwin.apple_sdk_11_1.stdenv else stdenv; }; @@ -30084,7 +30085,7 @@ with pkgs; dunst = callPackage ../applications/misc/dunst { }; du-dust = callPackage ../tools/misc/dust { - inherit (darwin.apple_sdk_11_0.frameworks) AppKit; + inherit (darwin.apple_sdk_11_1.frameworks) AppKit; }; dutree = callPackage ../tools/misc/dutree { }; @@ -30093,9 +30094,9 @@ with pkgs; denemo = callPackage ../applications/audio/denemo { }; - dexed = darwin.apple_sdk_11_0.callPackage ../applications/audio/dexed { - inherit (darwin.apple_sdk_11_0.frameworks) Accelerate Cocoa WebKit MetalKit DiscRecording CoreAudioKit; - inherit (darwin.apple_sdk_11_0.libs) simd; + dexed = darwin.apple_sdk_11_1.callPackage ../applications/audio/dexed { + inherit (darwin.apple_sdk_11_1.frameworks) Accelerate Cocoa WebKit MetalKit DiscRecording CoreAudioKit; + inherit (darwin.apple_sdk_11_1.libs) simd; }; dvdauthor = callPackage ../applications/video/dvdauthor { }; @@ -30338,8 +30339,8 @@ with pkgs; karlender = callPackage ../applications/office/karlender { }; keepassxc = libsForQt5.callPackage ../applications/misc/keepassxc { - inherit (darwin.apple_sdk_11_0.frameworks) LocalAuthentication; - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; + inherit (darwin.apple_sdk_11_1.frameworks) LocalAuthentication; + stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_1.stdenv else stdenv; }; keepass-diff = callPackage ../applications/misc/keepass-diff { }; @@ -30490,9 +30491,9 @@ with pkgs; ganttproject-bin = callPackage ../applications/misc/ganttproject-bin { }; - gaucheBootstrap = darwin.apple_sdk_11_0.callPackage ../development/interpreters/gauche/boot.nix { }; + gaucheBootstrap = darwin.apple_sdk_11_1.callPackage ../development/interpreters/gauche/boot.nix { }; - gauche = darwin.apple_sdk_11_0.callPackage ../development/interpreters/gauche { }; + gauche = darwin.apple_sdk_11_1.callPackage ../development/interpreters/gauche { }; gazelle-origin = python3Packages.callPackage ../tools/misc/gazelle-origin { }; @@ -30733,9 +30734,9 @@ with pkgs; filezilla = callPackage ../applications/networking/ftp/filezilla { }; - fire = darwin.apple_sdk_11_0.callPackage ../applications/audio/fire { - inherit (darwin.apple_sdk_11_0.frameworks) Accelerate Cocoa WebKit CoreServices DiscRecording CoreAudioKit MetalKit; - inherit (darwin.apple_sdk_11_0.libs) simd; + fire = darwin.apple_sdk_11_1.callPackage ../applications/audio/fire { + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa WebKit CoreServices DiscRecording CoreAudioKit MetalKit; + inherit (darwin.apple_sdk_11_1.libs) simd; }; buildMozillaMach = opts: callPackage (import ../applications/networking/browsers/firefox/common.nix opts) { }; @@ -30948,7 +30949,7 @@ with pkgs; goffice = callPackage ../development/libraries/goffice { }; - got = darwin.apple_sdk_11_0.callPackage ../applications/version-management/got { }; + got = darwin.apple_sdk_11_1.callPackage ../applications/version-management/got { }; gtkterm = callPackage ../tools/misc/gtkterm { }; @@ -31718,7 +31719,7 @@ with pkgs; inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {}); - inlyne = darwin.apple_sdk_11_0.callPackage ../applications/misc/inlyne { }; + inlyne = darwin.apple_sdk_11_1.callPackage ../applications/misc/inlyne { }; inspectrum = callPackage ../applications/radio/inspectrum { }; @@ -31906,13 +31907,13 @@ with pkgs; kooha = callPackage ../applications/video/kooha { }; kotatogram-desktop = libsForQt5.callPackage ../applications/networking/instant-messengers/telegram/kotatogram-desktop { - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreFoundation CoreServices CoreText CoreGraphics + inherit (darwin.apple_sdk_11_1.frameworks) Cocoa CoreFoundation CoreServices CoreText CoreGraphics CoreMedia OpenGL AudioUnit ApplicationServices Foundation AGL Security SystemConfiguration Carbon AudioToolbox VideoToolbox VideoDecodeAcceleration AVFoundation CoreAudio CoreVideo CoreMediaIO QuartzCore AppKit CoreWLAN WebKit IOKit GSS MediaPlayer IOSurface Metal MetalKit; stdenv = if stdenv.isDarwin - then darwin.apple_sdk_11_0.stdenv + then darwin.apple_sdk_11_1.stdenv else stdenv; # telegram-desktop has random crashes when jemalloc is built with gcc. @@ -32107,7 +32108,7 @@ with pkgs; ladspa-sdk = callPackage ../applications/audio/ladspa-sdk { }; ladybird = qt6Packages.callPackage ../applications/networking/browsers/ladybird { - stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.clang14Stdenv else stdenv; + stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_1.clang14Stdenv else stdenv; }; lazpaint = callPackage ../applications/graphics/lazpaint { }; @@ -32547,11 +32548,11 @@ with pkgs; xmr-stak = callPackage ../applications/misc/xmr-stak { }; - xmrig = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig { }; + xmrig = darwin.apple_sdk_11_1.callPackage ../applications/misc/xmrig { }; - xmrig-mo = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig/moneroocean.nix { }; + xmrig-mo = darwin.apple_sdk_11_1.callPackage ../applications/misc/xmrig/moneroocean.nix { }; - xmrig-proxy = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig/proxy.nix { }; + xmrig-proxy = darwin.apple_sdk_11_1.callPackage ../applications/misc/xmrig/proxy.nix { }; molot-lite = callPackage ../applications/audio/molot-lite { }; @@ -32723,7 +32724,7 @@ with pkgs; libdvdnav = libdvdnav_4_2_1; } // (config.mplayer or {})); - mpv-unwrapped = darwin.apple_sdk_11_0.callPackage ../applications/video/mpv { + mpv-unwrapped = darwin.apple_sdk_11_1.callPackage ../applications/video/mpv { inherit lua; }; @@ -32842,7 +32843,7 @@ with pkgs; ninjas2 = callPackage ../applications/audio/ninjas2 { }; - nncp = darwin.apple_sdk_11_0.callPackage ../tools/misc/nncp { }; + nncp = darwin.apple_sdk_11_1.callPackage ../tools/misc/nncp { }; notion = callPackage ../applications/window-managers/notion { }; @@ -33236,9 +33237,9 @@ with pkgs; openbrf = libsForQt5.callPackage ../applications/misc/openbrf { }; - opencpn = darwin.apple_sdk_11_0.callPackage ../applications/misc/opencpn { + opencpn = darwin.apple_sdk_11_1.callPackage ../applications/misc/opencpn { inherit (darwin) DarwinTools; - inherit (darwin.apple_sdk_11_0.frameworks) AppKit; + inherit (darwin.apple_sdk_11_1.frameworks) AppKit; }; openfx = callPackage ../development/libraries/openfx { }; @@ -33247,7 +33248,7 @@ with pkgs; boost = boost175; }; - openimageio = darwin.apple_sdk_11_0.callPackage ../development/libraries/openimageio { }; + openimageio = darwin.apple_sdk_11_1.callPackage ../development/libraries/openimageio { }; openjump = callPackage ../applications/misc/openjump { }; @@ -33265,7 +33266,7 @@ with pkgs; vm = callPackage ../applications/audio/open-music-kontrollers/vm.nix { }; }; - openrsync = darwin.apple_sdk_11_0.callPackage ../applications/networking/sync/openrsync { }; + openrsync = darwin.apple_sdk_11_1.callPackage ../applications/networking/sync/openrsync { }; openscad = libsForQt5.callPackage ../applications/graphics/openscad { }; @@ -33284,7 +33285,7 @@ with pkgs; opentx = libsForQt5.callPackage ../applications/misc/opentx { }; - openvi = darwin.apple_sdk_11_0.callPackage ../applications/editors/openvi { }; + openvi = darwin.apple_sdk_11_1.callPackage ../applications/editors/openvi { }; opera = callPackage ../applications/networking/browsers/opera { }; @@ -33786,7 +33787,7 @@ with pkgs; quantomatic = callPackage ../applications/science/physics/quantomatic { }; quassel = libsForQt5.callPackage ../applications/networking/irc/quassel { - 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; }; quasselClient = quassel.override { @@ -34258,9 +34259,9 @@ with pkgs; printrun = callPackage ../applications/misc/printrun { }; - prusa-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer { }; + prusa-slicer = darwin.apple_sdk_11_1.callPackage ../applications/misc/prusa-slicer { }; - super-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer/super-slicer.nix { }; + super-slicer = darwin.apple_sdk_11_1.callPackage ../applications/misc/prusa-slicer/super-slicer.nix { }; super-slicer-latest = super-slicer.latest; @@ -34283,8 +34284,8 @@ with pkgs; snapper = callPackage ../tools/misc/snapper { }; snapper-gui = callPackage ../applications/misc/snapper-gui { }; - snd = darwin.apple_sdk_11_0.callPackage ../applications/audio/snd { - inherit (darwin.apple_sdk_11_0.frameworks) CoreServices CoreMIDI; + snd = darwin.apple_sdk_11_1.callPackage ../applications/audio/snd { + inherit (darwin.apple_sdk_11_1.frameworks) CoreServices CoreMIDI; }; sharpsat-td = callPackage ../applications/science/logic/sharpsat-td { }; @@ -34321,12 +34322,12 @@ with pkgs; psst = callPackage ../applications/audio/psst { }; - squeezelite = darwin.apple_sdk_11_0.callPackage ../applications/audio/squeezelite { - inherit (darwin.apple_sdk_11_0.frameworks) CoreVideo VideoDecodeAcceleration CoreAudio AudioToolbox AudioUnit Carbon; + squeezelite = darwin.apple_sdk_11_1.callPackage ../applications/audio/squeezelite { + inherit (darwin.apple_sdk_11_1.frameworks) CoreVideo VideoDecodeAcceleration CoreAudio AudioToolbox AudioUnit Carbon; }; - squeezelite-pulse = darwin.apple_sdk_11_0.callPackage ../applications/audio/squeezelite { - inherit (darwin.apple_sdk_11_0.frameworks) CoreVideo VideoDecodeAcceleration CoreAudio AudioToolbox AudioUnit Carbon; + squeezelite-pulse = darwin.apple_sdk_11_1.callPackage ../applications/audio/squeezelite { + inherit (darwin.apple_sdk_11_1.frameworks) CoreVideo VideoDecodeAcceleration CoreAudio AudioToolbox AudioUnit Carbon; audioBackend = "pulse"; }; @@ -34816,7 +34817,7 @@ with pkgs; ueberzug = with python3Packages; toPythonApplication ueberzug; - ueberzugpp = darwin.apple_sdk_11_0.callPackage ../tools/graphics/ueberzugpp { }; + ueberzugpp = darwin.apple_sdk_11_1.callPackage ../tools/graphics/ueberzugpp { }; uefi-run = callPackage ../tools/virtualization/uefi-run { }; @@ -34891,8 +34892,8 @@ with pkgs; vdpauinfo = callPackage ../tools/X11/vdpauinfo { }; - vengi-tools = darwin.apple_sdk_11_0.callPackage ../applications/graphics/vengi-tools { - inherit (darwin.apple_sdk_11_0.frameworks) Carbon CoreServices OpenCL; + vengi-tools = darwin.apple_sdk_11_1.callPackage ../applications/graphics/vengi-tools { + inherit (darwin.apple_sdk_11_1.frameworks) Carbon CoreServices OpenCL; }; verbiste = callPackage ../applications/misc/verbiste { @@ -35239,7 +35240,7 @@ with pkgs; }; chatterino2 = libsForQt5.callPackage ../applications/networking/instant-messengers/chatterino2 { - 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; }; weston = callPackage ../applications/window-managers/weston { }; @@ -35759,7 +35760,7 @@ with pkgs; balanceofsatoshis = nodePackages.balanceofsatoshis; bitcoin = libsForQt5.callPackage ../applications/blockchains/bitcoin { - 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; boost = boost17x; withGui = true; inherit (darwin) autoSignDarwinBinariesHook; @@ -38267,7 +38268,7 @@ with pkgs; keymapviz = callPackage ../tools/misc/keymapviz { }; - killport = darwin.apple_sdk_11_0.callPackage ../tools/misc/killport { }; + killport = darwin.apple_sdk_11_1.callPackage ../tools/misc/killport { }; lean = callPackage ../applications/science/logic/lean { }; lean2 = callPackage ../applications/science/logic/lean2 { }; @@ -38458,7 +38459,7 @@ with pkgs; withNgshared = false; }; - nvc = darwin.apple_sdk_11_0.callPackage ../applications/science/electronics/nvc { }; + nvc = darwin.apple_sdk_11_1.callPackage ../applications/science/electronics/nvc { }; openems = callPackage ../applications/science/electronics/openems { qcsxcad = libsForQt5.qcsxcad; @@ -39163,8 +39164,8 @@ with pkgs; lguf-brightness = callPackage ../misc/lguf-brightness { }; - lighthouse = darwin.apple_sdk_11_0.callPackage ../applications/blockchains/lighthouse { - inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Security SystemConfiguration; + lighthouse = darwin.apple_sdk_11_1.callPackage ../applications/blockchains/lighthouse { + inherit (darwin.apple_sdk_11_1.frameworks) CoreFoundation Security SystemConfiguration; }; lilypond = callPackage ../misc/lilypond { }; @@ -39510,8 +39511,8 @@ with pkgs; sticky = callPackage ../applications/misc/sticky { }; - stork = darwin.apple_sdk_11_0.callPackage ../applications/misc/stork { - inherit (darwin.apple_sdk_11_0.frameworks) Security; + stork = darwin.apple_sdk_11_1.callPackage ../applications/misc/stork { + inherit (darwin.apple_sdk_11_1.frameworks) Security; }; superd = callPackage ../misc/superd { }; @@ -39536,8 +39537,8 @@ with pkgs; physlock = callPackage ../misc/screensavers/physlock { }; - pjsip = darwin.apple_sdk_11_0.callPackage ../applications/networking/pjsip { - inherit (darwin.apple_sdk_11_0.frameworks) AppKit CoreFoundation Security; + pjsip = darwin.apple_sdk_11_1.callPackage ../applications/networking/pjsip { + inherit (darwin.apple_sdk_11_1.frameworks) AppKit CoreFoundation Security; }; pounce = callPackage ../servers/pounce { }; @@ -39580,7 +39581,7 @@ with pkgs; rauc = callPackage ../tools/misc/rauc { }; - rbspy = darwin.apple_sdk_11_0.callPackage ../development/tools/rbspy { }; + rbspy = darwin.apple_sdk_11_1.callPackage ../development/tools/rbspy { }; redprl = callPackage ../applications/science/logic/redprl { }; @@ -39650,7 +39651,7 @@ with pkgs; shellz = callPackage ../tools/security/shellz { }; - timeloop = pkgs.darwin.apple_sdk_11_0.callPackage ../applications/science/computer-architecture/timeloop { }; + timeloop = pkgs.darwin.apple_sdk_11_1.callPackage ../applications/science/computer-architecture/timeloop { }; canon-cups-ufr2 = callPackage ../misc/cups/drivers/canon { }; @@ -40044,7 +40045,7 @@ with pkgs; with-shell = callPackage ../applications/misc/with-shell { }; - wizer = darwin.apple_sdk_11_0.callPackage ../development/tools/wizer { }; + wizer = darwin.apple_sdk_11_1.callPackage ../development/tools/wizer { }; wmutils-core = callPackage ../tools/X11/wmutils-core { }; @@ -40147,8 +40148,8 @@ with pkgs; xzoom = callPackage ../tools/X11/xzoom { }; - yabai = darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/yabai { - inherit (darwin.apple_sdk_11_0.frameworks) SkyLight Cocoa Carbon ScriptingBridge; + yabai = darwin.apple_sdk_11_1.callPackage ../os-specific/darwin/yabai { + inherit (darwin.apple_sdk_11_1.frameworks) SkyLight Cocoa Carbon ScriptingBridge; }; yacreader = libsForQt5.callPackage ../applications/graphics/yacreader { }; @@ -40592,7 +40593,7 @@ with pkgs; treefmt = callPackage ../development/tools/treefmt { }; - bottom = darwin.apple_sdk_11_0.callPackage ../tools/system/bottom { }; + bottom = darwin.apple_sdk_11_1.callPackage ../tools/system/bottom { }; cagebreak = callPackage ../applications/window-managers/cagebreak { wlroots = wlroots_0_15; diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index b6e70772d04a2..634eeb8ddfa64 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -1,244 +1,265 @@ -{ lib -, buildPackages, pkgs, targetPackages -, generateSplicesForMkScope, makeScopeWithSplicing -, stdenv -, preLibcCrossHeaders -}: - -let +{ + buildPackages, + generateSplicesForMkScope, + lib, + makeScopeWithSplicing, + pkgs, + preLibcCrossHeaders, + stdenv, + targetPackages, +}: let # Prefix for binaries. Customarily ends with a dash separator. # # TODO(@Ericson2314) Make unconditional, or optional but always true by # default. - targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) - (stdenv.targetPlatform.config + "-"); + targetPrefix = + lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) + (stdenv.targetPlatform.config + "-"); in + makeScopeWithSplicing + (generateSplicesForMkScope "darwin") + (_: {}) + (spliced: spliced.apple_sdk.frameworks) + (self: let + # NOTE: Must use pkgs.callPackage to avoid infinite recursion. + inherit (self) callPackage; + + # Open source packages that are built from source + appleSourcePackages = pkgs.callPackage ../os-specific/darwin/apple-source-releases {} self; + + impure-cmds = pkgs.callPackage ../os-specific/darwin/impure-cmds {}; + + # macOS 10.12 SDK + appleSDKs = + (pkgs.callPackage ../os-specific/darwin/apple-sdks {}) + // { + # Special case the old, pre-11.x SDKs, which are not in the same format as + # the newer ones. + apple_sdk_10_12 = pkgs.callPackage ../os-specific/darwin/apple-sdk-10-12 { + inherit (buildPackages.darwin) print-reexports; + inherit (self) darwin-stubs; + }; + } + // { + # Pick the default SDK + apple_sdk = + if stdenv.hostPlatform.isAarch64 + then appleSDKs.apple_sdk_11_1 + else appleSDKs.apple_sdk_10_12; + }; -makeScopeWithSplicing (generateSplicesForMkScope "darwin") (_: {}) (spliced: spliced.apple_sdk.frameworks) (self: let - inherit (self) mkDerivation callPackage; - - # Must use pkgs.callPackage to avoid infinite recursion. - - # Open source packages that are built from source - appleSourcePackages = pkgs.callPackage ../os-specific/darwin/apple-source-releases { } self; - - impure-cmds = pkgs.callPackage ../os-specific/darwin/impure-cmds { }; - - # macOS 10.12 SDK - apple_sdk_10_12 = pkgs.callPackage ../os-specific/darwin/apple-sdk { - inherit (buildPackages.darwin) print-reexports; - inherit (self) darwin-stubs; - }; - - # macOS 11.0 SDK - apple_sdk_11_0 = pkgs.callPackage ../os-specific/darwin/apple-sdk-11.0 { }; - - # Pick an SDK - apple_sdk = if stdenv.hostPlatform.isAarch64 then apple_sdk_11_0 else apple_sdk_10_12; - - # Pick the source of libraries: either Apple's open source releases, or the - # SDK. - useAppleSDKLibs = stdenv.hostPlatform.isAarch64; - - selectAttrs = attrs: names: - lib.listToAttrs (lib.concatMap (n: lib.optionals (attrs ? "${n}") [(lib.nameValuePair n attrs."${n}")]) names); - - chooseLibs = ( - # There are differences in which libraries are exported. Avoid evaluation - # errors when a package is not provided. - selectAttrs ( - if useAppleSDKLibs - then apple_sdk - else appleSourcePackages - ) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"] - ) // { - inherit ( - if useAppleSDKLibs - then apple_sdk.frameworks - else appleSourcePackages - ) Security; - }; -in + # All supported Xcode releases + xcodeReleases = pkgs.callPackages ../os-specific/darwin/xcode {}; + + # Pick the source of libraries: either Apple's open source releases, or the + # SDK. + useAppleSDKLibs = stdenv.hostPlatform.isAarch64; + + selectAttrs = attrs: names: + lib.listToAttrs (lib.concatMap (n: lib.optionals (attrs ? "${n}") [(lib.nameValuePair n attrs."${n}")]) names); + + chooseLibs = + ( + # There are differences in which libraries are exported. Avoid evaluation + # errors when a package is not provided. + selectAttrs ( + if useAppleSDKLibs + then appleSDKs.apple_sdk + else appleSourcePackages + ) ["Libsystem" "LibsystemCross" "libcharset" "libunwind" "objc4" "configd" "IOKit"] + ) + // { + inherit + ( + if useAppleSDKLibs + then appleSDKs.apple_sdk.frameworks + else appleSourcePackages + ) + Security + ; + }; + in + impure-cmds + // appleSourcePackages + // chooseLibs + // appleSDKs + // xcodeReleases + // { + stdenvNoCF = stdenv.override { + extraBuildInputs = []; + }; -impure-cmds // appleSourcePackages // chooseLibs // { + binutils-unwrapped = callPackage ../os-specific/darwin/binutils { + inherit (pkgs) binutils-unwrapped; + inherit (pkgs.llvmPackages) llvm clang-unwrapped; + }; - inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0; + binutils = pkgs.wrapBintoolsWith { + libc = + if stdenv.targetPlatform != stdenv.hostPlatform + then pkgs.libcCross + else pkgs.stdenv.cc.libc; + bintools = self.binutils-unwrapped; + }; - stdenvNoCF = stdenv.override { - extraBuildInputs = []; - }; + binutilsDualAs-unwrapped = callPackage ../os-specific/darwin/binutils { + inherit (pkgs) binutils-unwrapped; + inherit (pkgs.llvmPackages) llvm clang-unwrapped; + dualAs = true; + }; - binutils-unwrapped = callPackage ../os-specific/darwin/binutils { - inherit (pkgs) binutils-unwrapped; - inherit (pkgs.llvmPackages) llvm clang-unwrapped; - }; + binutilsDualAs = pkgs.wrapBintoolsWith { + libc = + if stdenv.targetPlatform != stdenv.hostPlatform + then pkgs.libcCross + else pkgs.stdenv.cc.libc; + bintools = self.binutilsDualAs-unwrapped; + }; - binutils = pkgs.wrapBintoolsWith { - libc = - if stdenv.targetPlatform != stdenv.hostPlatform - then pkgs.libcCross - else pkgs.stdenv.cc.libc; - bintools = self.binutils-unwrapped; - }; + binutilsNoLibc = pkgs.wrapBintoolsWith { + libc = preLibcCrossHeaders; + bintools = self.binutils-unwrapped; + }; - binutilsDualAs-unwrapped = callPackage ../os-specific/darwin/binutils { - inherit (pkgs) binutils-unwrapped; - inherit (pkgs.llvmPackages) llvm clang-unwrapped; - dualAs = true; - }; + cctools = callPackage ../os-specific/darwin/cctools/port.nix { + stdenv = + if stdenv.isDarwin + then stdenv + else pkgs.libcxxStdenv; + }; - binutilsDualAs = pkgs.wrapBintoolsWith { - libc = - if stdenv.targetPlatform != stdenv.hostPlatform - then pkgs.libcCross - else pkgs.stdenv.cc.libc; - bintools = self.binutilsDualAs-unwrapped; - }; + cctools-apple = callPackage ../os-specific/darwin/cctools/apple.nix { + stdenv = + if stdenv.isDarwin + then stdenv + else pkgs.libcxxStdenv; + }; - binutilsNoLibc = pkgs.wrapBintoolsWith { - libc = preLibcCrossHeaders; - bintools = self.binutils-unwrapped; - }; + # TODO: remove alias. + cf-private = self.apple_sdk.frameworks.CoreFoundation; - cctools = callPackage ../os-specific/darwin/cctools/port.nix { - stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv; - }; + DarwinTools = callPackage ../os-specific/darwin/DarwinTools {}; - cctools-apple = callPackage ../os-specific/darwin/cctools/apple.nix { - stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv; - }; - - # TODO(@connorbaker): See https://github.com/NixOS/nixpkgs/issues/229389. - cf-private = self.apple_sdk.frameworks.CoreFoundation; - - DarwinTools = callPackage ../os-specific/darwin/DarwinTools { }; - - darwin-stubs = callPackage ../os-specific/darwin/darwin-stubs { }; - - print-reexports = callPackage ../os-specific/darwin/print-reexports { }; - - rewrite-tbd = callPackage ../os-specific/darwin/rewrite-tbd { }; - - checkReexportsHook = pkgs.makeSetupHook { - name = "darwin-check-reexports-hook"; - propagatedBuildInputs = [ pkgs.darwin.print-reexports ]; - } ../os-specific/darwin/print-reexports/setup-hook.sh; + darwin-stubs = callPackage ../os-specific/darwin/darwin-stubs {}; - sigtool = callPackage ../os-specific/darwin/sigtool { }; + print-reexports = callPackage ../os-specific/darwin/print-reexports {}; - postLinkSignHook = pkgs.writeTextFile { - name = "post-link-sign-hook"; - executable = true; + rewrite-tbd = callPackage ../os-specific/darwin/rewrite-tbd {}; - text = '' - if [ "$linkerOutput" != "/dev/null" ]; then - CODESIGN_ALLOCATE=${targetPrefix}codesign_allocate \ - ${self.sigtool}/bin/codesign -f -s - "$linkerOutput" - fi - ''; - }; + checkReexportsHook = + pkgs.makeSetupHook { + name = "darwin-check-reexports-hook"; + propagatedBuildInputs = [pkgs.darwin.print-reexports]; + } + ../os-specific/darwin/print-reexports/setup-hook.sh; - signingUtils = callPackage ../os-specific/darwin/signing-utils { }; + sigtool = callPackage ../os-specific/darwin/sigtool {}; - autoSignDarwinBinariesHook = pkgs.makeSetupHook { - name = "auto-sign-darwin-binaries-hook"; - propagatedBuildInputs = [ self.signingUtils ]; - } ../os-specific/darwin/signing-utils/auto-sign-hook.sh; + postLinkSignHook = pkgs.writeTextFile { + name = "post-link-sign-hook"; + executable = true; - maloader = callPackage ../os-specific/darwin/maloader { - }; + text = '' + if [ "$linkerOutput" != "/dev/null" ]; then + CODESIGN_ALLOCATE=${targetPrefix}codesign_allocate \ + ${self.sigtool}/bin/codesign -f -s - "$linkerOutput" + fi + ''; + }; - insert_dylib = callPackage ../os-specific/darwin/insert_dylib { }; + signingUtils = callPackage ../os-specific/darwin/signing-utils {}; - iosSdkPkgs = callPackage ../os-specific/darwin/xcode/sdk-pkgs.nix { - buildIosSdk = buildPackages.darwin.iosSdkPkgs.sdk; - targetIosSdkPkgs = targetPackages.darwin.iosSdkPkgs; - inherit (pkgs.llvmPackages) clang-unwrapped; - }; + autoSignDarwinBinariesHook = + pkgs.makeSetupHook { + name = "auto-sign-darwin-binaries-hook"; + propagatedBuildInputs = [self.signingUtils]; + } + ../os-specific/darwin/signing-utils/auto-sign-hook.sh; - iproute2mac = callPackage ../os-specific/darwin/iproute2mac { }; + maloader = + callPackage ../os-specific/darwin/maloader { + }; - libobjc = self.objc4; + insert_dylib = callPackage ../os-specific/darwin/insert_dylib {}; - lsusb = callPackage ../os-specific/darwin/lsusb { }; - - moltenvk = pkgs.darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/moltenvk { - inherit (apple_sdk_11_0.frameworks) AppKit Foundation Metal QuartzCore; - inherit (apple_sdk_11_0) MacOSX-SDK Libsystem; - inherit (pkgs.darwin) cctools sigtool; - }; - - opencflite = callPackage ../os-specific/darwin/opencflite { }; - - openwith = pkgs.darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/openwith { - inherit (apple_sdk_11_0.frameworks) AppKit Foundation UniformTypeIdentifiers; - }; - - stubs = pkgs.callPackages ../os-specific/darwin/stubs { }; - - trash = callPackage ../os-specific/darwin/trash { }; - - xattr = pkgs.python3Packages.callPackage ../os-specific/darwin/xattr { }; + iosSdkPkgs = callPackage ../os-specific/darwin/xcode/sdk-pkgs.nix { + buildIosSdk = buildPackages.darwin.iosSdkPkgs.sdk; + targetIosSdkPkgs = targetPackages.darwin.iosSdkPkgs; + inherit (pkgs.llvmPackages) clang-unwrapped; + }; - inherit (pkgs.callPackages ../os-specific/darwin/xcode { }) - xcode_8_1 xcode_8_2 - xcode_9_1 xcode_9_2 xcode_9_3 xcode_9_4 xcode_9_4_1 - xcode_10_1 xcode_10_2 xcode_10_2_1 xcode_10_3 - xcode_11 xcode_11_1 xcode_11_2 xcode_11_3_1 xcode_11_4 xcode_11_5 xcode_11_6 xcode_11_7 - xcode_12 xcode_12_0_1 xcode_12_1 xcode_12_2 xcode_12_3 xcode_12_4 xcode_12_5 xcode_12_5_1 - xcode_13 xcode_13_1 xcode_13_2 xcode_13_3 xcode_13_3_1 xcode_13_4 xcode_13_4_1 - xcode_14 xcode_14_1 - xcode; + iproute2mac = callPackage ../os-specific/darwin/iproute2mac {}; - CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { }; + libobjc = self.objc4; - # TODO: make swift-corefoundation build with apple_sdk_11_0.Libsystem - CF = if useAppleSDKLibs - then - # This attribute (CF) is included in extraBuildInputs in the stdenv. This - # is typically the open source project. When a project refers to - # "CoreFoundation" it has an extra setup hook to force impure system - # CoreFoundation into the link step. - # - # In this branch, we only have a single "CoreFoundation" to choose from. - # To be compatible with the existing convention, we define - # CoreFoundation with the setup hook, and CF as the same package but - # with the setup hook removed. - # - # This may seem unimportant, but without it packages (e.g., bacula) will - # fail with linker errors referring ___CFConstantStringClassReference. - # It's not clear to me why some packages need this extra setup. - lib.overrideDerivation apple_sdk.frameworks.CoreFoundation (drv: { - setupHook = null; - }) - else callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { }; + lsusb = callPackage ../os-specific/darwin/lsusb {}; - # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in - # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { }; + # TODO(@connorbaker): Currently does not compile. + moltenvk = pkgs.darwin.apple_sdk_13_3.callPackage ../os-specific/darwin/moltenvk { + inherit (pkgs.darwin) cctools sigtool; + inherit (pkgs.darwin.apple_sdk_13_3) frameworks MacOSX-SDK; + }; - libtapi = callPackage ../os-specific/darwin/libtapi {}; - - ios-deploy = callPackage ../os-specific/darwin/ios-deploy {}; - - discrete-scroll = callPackage ../os-specific/darwin/discrete-scroll { }; - - # See doc/builders/special/darwin-builder.section.md - builder = - let - toGuest = builtins.replaceStrings [ "darwin" ] [ "linux" ]; - - nixos = import ../../nixos { - configuration = { - imports = [ - ../../nixos/modules/profiles/macos-builder.nix - ]; - - virtualisation.host = { inherit pkgs; }; - }; + opencflite = callPackage ../os-specific/darwin/opencflite {}; - system = toGuest stdenv.hostPlatform.system; + openwith = pkgs.darwin.apple_sdk_13_3.callPackage ../os-specific/darwin/openwith { + inherit (pkgs.darwin.apple_sdk_13_3.frameworks) AppKit Foundation UniformTypeIdentifiers; }; - in - nixos.config.system.build.macos-builder-installer; -}) + stubs = pkgs.callPackages ../os-specific/darwin/stubs {}; + + trash = callPackage ../os-specific/darwin/trash {}; + + xattr = pkgs.python3Packages.callPackage ../os-specific/darwin/xattr {}; + + CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication {}; + + # TODO: make swift-corefoundation build with apple_sdk_11_1.Libsystem + CF = + if useAppleSDKLibs + then + # This attribute (CF) is included in extraBuildInputs in the stdenv. This + # is typically the open source project. When a project refers to + # "CoreFoundation" it has an extra setup hook to force impure system + # CoreFoundation into the link step. + # + # In this branch, we only have a single "CoreFoundation" to choose from. + # To be compatible with the existing convention, we define + # CoreFoundation with the setup hook, and CF as the same package but + # with the setup hook removed. + # + # This may seem unimportant, but without it packages (e.g., bacula) will + # fail with linker errors referring ___CFConstantStringClassReference. + # It's not clear to me why some packages need this extra setup. + lib.overrideDerivation appleSDKs.apple_sdk.frameworks.CoreFoundation (drv: { + setupHook = null; + }) + else callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix {}; + + # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in + # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { }; + + libtapi = callPackage ../os-specific/darwin/libtapi {}; + + ios-deploy = callPackage ../os-specific/darwin/ios-deploy {}; + + discrete-scroll = callPackage ../os-specific/darwin/discrete-scroll {}; + + # See doc/builders/special/darwin-builder.section.md + builder = let + toGuest = builtins.replaceStrings ["darwin"] ["linux"]; + + nixos = import ../../nixos { + configuration = { + imports = [ + ../../nixos/modules/profiles/macos-builder.nix + ]; + + virtualisation.host = {inherit pkgs;}; + }; + + system = toGuest stdenv.hostPlatform.system; + }; + in + nixos.config.system.build.macos-builder-installer; + }) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e7a81ab193cd5..02ba2dcf97d0f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5103,7 +5103,7 @@ self: super: with self; { inherit (pkgs.darwin) cctools; # Some platforms don't have `cudaSupport` defined, hence the need for 'or false'. cudaSupport = pkgs.config.cudaSupport or false; - IOKit = pkgs.darwin.apple_sdk_11_0.IOKit; + IOKit = pkgs.darwin.apple_sdk_11_1.IOKit; protobuf = pkgs.protobuf3_20; # jaxlib-build 0.3.15 won't build with protobuf 3.21 }; diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index 6de840951521d..706dc18b9b931 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -174,7 +174,7 @@ in (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGea pulseaudio-qt = callPackage ../development/libraries/pulseaudio-qt { }; - qca-qt5 = pkgs.darwin.apple_sdk_11_0.callPackage ../development/libraries/qca-qt5 { + qca-qt5 = pkgs.darwin.apple_sdk_11_1.callPackage ../development/libraries/qca-qt5 { inherit (libsForQt5) qtbase; }; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 12a340446a5a9..f2b853d7f46a0 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -229,6 +229,7 @@ let perlPackages = { }; darwin = packagePlatforms pkgs.darwin // { + cf-private = {}; xcode = {}; }; } ));