From 80f7c3ddbf0997e984a4990a36a48d3999dc9e45 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 18:44:35 +0100 Subject: [PATCH 01/35] nixos/doc/rl-2505: announce macOS version support policy --- nixos/doc/manual/release-notes/rl-2505.section.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 29af283010c9..23e21b2724f7 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -4,7 +4,11 @@ -- Create the first release note entry in this section! +- **This release of Nixpkgs requires macOS Big Sur 11.3 or newer, as announced in the 24.11 release notes.** + We cannot guarantee that packages will continue to work on older versions of macOS. + Future Nixpkgs releases will only support [macOS versions supported by Apple](https://endoflife.date/macos); this means that **Nixpkgs 25.11 will require macOS Sonoma 14 or newer**. + Users on old macOS versions should consider upgrading to a supported version (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS. + If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports versions back to Mac OS X Snow Leopard 10.6. From 0f9067f865a22aa6c1fe94eed7f218287b3e9425 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 18:44:35 +0100 Subject: [PATCH 02/35] darwin: set the minimum version to macOS 11.3 --- doc/stdenv/platform-notes.chapter.md | 35 +++++------ lib/systems/default.nix | 2 +- .../darwin/apple-sdk-11.0/default.nix | 59 ++++--------------- pkgs/stdenv/darwin/override-sdk.nix | 36 ++++------- pkgs/top-level/darwin-packages.nix | 7 +-- 5 files changed, 41 insertions(+), 98 deletions(-) diff --git a/doc/stdenv/platform-notes.chapter.md b/doc/stdenv/platform-notes.chapter.md index 7e06a9bab30f..3f7296d32653 100644 --- a/doc/stdenv/platform-notes.chapter.md +++ b/doc/stdenv/platform-notes.chapter.md @@ -87,31 +87,24 @@ When that happens, the one with the highest version is always used. The following is a list of Xcode versions, the SDK version in Nixpkgs, and the attribute to use to add it. Check your package’s documentation (platform support or installation instructions) to find which Xcode or SDK version to use. -Generally, only the last SDK release for a major version is packaged (each _x_ in 10._x_ until 10.15 is considered a major version). +Generally, only the last SDK release for a major version is packaged. -| Xcode version | SDK version | Nixpkgs attribute | -|--------------------|---------------------------------------------------|-------------------| -| Varies by platform | 10.12.2 (x86_64-darwin)
11.3 (aarch64-darwin) | `apple-sdk` | -| 8.0–8.3.3 | 10.12.2 | `apple-sdk_10_12` | -| 9.0–9.4.1 | 10.13.2 | `apple-sdk_10_13` | -| 10.0–10.3 | 10.14.6 | `apple-sdk_10_14` | -| 11.0–11.7 | 10.15.6 | `apple-sdk_10_15` | -| 12.0–12.5.1 | 11.3 | `apple-sdk_11` | -| 13.0–13.4.1 | 12.3 | `apple-sdk_12` | -| 14.0–14.3.1 | 13.3 | `apple-sdk_13` | -| 15.0–15.4 | 14.4 | `apple-sdk_14` | -| 16.0 | 15.0 | `apple-sdk_15` | +| Xcode version | SDK version | Nixpkgs attribute | +|--------------------|--------------------|------------------------------| +| 12.0–12.5.1 | 11.3 | `apple-sdk_11` / `apple-sdk` | +| 13.0–13.4.1 | 12.3 | `apple-sdk_12` | +| 14.0–14.3.1 | 13.3 | `apple-sdk_13` | +| 15.0–15.4 | 14.4 | `apple-sdk_14` | +| 16.0 | 15.0 | `apple-sdk_15` | #### Darwin Default SDK versions {#sec-darwin-troubleshooting-darwin-defaults} -The current default versions of the deployment target (minimum version) and SDK are indicated by Darwin-specific attributes on the platform. Because of the ways that minimum version and SDK can be changed that are not visible to Nix, they should be treated as lower bounds. +The current default version of the SDK and deployment target (minimum supported version) are indicated by the Darwin-specific platform attributes `darwinSdkVersion` and `darwinMinVersion`. +Because of the ways that minimum version and SDK can be changed that are not visible to Nix, they should be treated as lower bounds. If you need to parameterize over a specific version, create a function that takes the version as a parameter instead of relying on these attributes. -- `darwinMinVersion` defaults to 10.12 on x86_64-darwin and 11.0 on aarch64-darwin. - It sets the default deployment target. -- `darwinSdkVersion` defaults to 10.12 on x86-64-darwin and 11.0 on aarch64-darwin. - Only the major version determines the SDK version, resulting in the 10.12.2 and 11.3 SDKs being used on these platforms respectively. +On macOS, the `darwinMinVersion` and `darwinSdkVersion` are always the same, and are currently set to 11.3. #### `xcrun` cannot find a binary {#sec-darwin-troubleshooting-xcrun} @@ -264,10 +257,10 @@ The legacy SDK provided two ways of overriding the default SDK. These are both being phased out along with the legacy SDKs. They have been updated to set up the new SDK for you, but you should replace them with doing that directly. -- `pkgs.darwin.apple_sdk_11_0.callPackage` - this pattern was used to provide frameworks from the 11.0 SDK. - It now adds the `apple-sdk_11` package to your derivation’s build inputs. +- `pkgs.darwin.apple_sdk_11_0.callPackage` - this pattern was used to provide frameworks from the macOS 11 SDK. + It is now the same as `callPackage`. - `overrideSDK` - this stdenv adapter would try to replace the frameworks used by your derivation and its transitive dependencies. - It now adds the `apple-sdk_11` package for `11.0` or the `apple-sdk_12` package for `12.3`. + It now adds the `apple-sdk_12` package for `12.3` and does nothing for `11.0`. If `darwinMinVersion` is specified, it will add `darwinMinVersionHook` with the specified minimum version. No other SDK versions are supported. diff --git a/lib/systems/default.nix b/lib/systems/default.nix index a6ceef2cc3a1..52383db0a36d 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -251,7 +251,7 @@ let 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 "11.3"; darwinMinVersion = final.darwinSdkVersion; darwinMinVersionVariable = if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET" diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix index c3547aae44ed..8f283c6bec54 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/default.nix @@ -12,30 +12,8 @@ let mkStub = callPackage ../apple-sdk/mk-stub.nix { } "11.0"; - - stdenvs = - { - stdenv = overrideSDK stdenv "11.0"; - } - // builtins.listToAttrs ( - map - (v: { - name = "llvmPackages_${v}"; - value = pkgs."llvmPackages_${v}" // { - stdenv = overrideSDK pkgs."llvmPackages_${v}".stdenv "11.0"; - }; - }) - [ - "12" - "13" - "14" - "15" - "16" - ] - ); in -stdenvs -// lib.genAttrs [ +lib.genAttrs [ "CLTools_Executables" "IOKit" "Libsystem" @@ -276,30 +254,17 @@ stdenvs "simd" ] mkStub; - callPackage = newScope ( - lib.optionalAttrs stdenv.hostPlatform.isDarwin ( - stdenvs // { inherit (pkgs.darwin.apple_sdk_11_0) rustPlatform; } - ) - ); - - 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; - }) - bindgenHook - ; - }; - - stdenv = overrideSDK stdenv "11.0"; - - xcodebuild = pkgs.xcodebuild; + inherit (pkgs) + callPackage + stdenv + llvmPackages_12 + llvmPackages_13 + llvmPackages_14 + llvmPackages_15 + llvmPackages_16 + rustPlatform + xcodebuild + ; version = "11.0"; } diff --git a/pkgs/stdenv/darwin/override-sdk.nix b/pkgs/stdenv/darwin/override-sdk.nix index 243b8e2633d7..482c11ce0cb2 100644 --- a/pkgs/stdenv/darwin/override-sdk.nix +++ b/pkgs/stdenv/darwin/override-sdk.nix @@ -9,33 +9,23 @@ stdenv: sdkVersion: let - newVersion = { - inherit (stdenv.hostPlatform) darwinMinVersion darwinSdkVersion; - } // (if lib.isAttrs sdkVersion then sdkVersion else { darwinSdkVersion = sdkVersion; }); - - inherit (newVersion) darwinMinVersion darwinSdkVersion; - - sdkMapping = { - "11.0" = pkgsHostTarget.apple-sdk_11; - "12.3" = pkgsHostTarget.apple-sdk_12; - }; - - minVersionHook = pkgsHostTarget.darwinMinVersionHook darwinMinVersion; - - resolvedSdk = - sdkMapping.${darwinSdkVersion} or (lib.throw '' - `overrideSDK` and `darwin.apple_sdk_11_0.callPackage` are deprecated. - Only the 11.0 and 12.3 SDKs are supported using them. Please use - the versioned `apple-sdk` variants to use other SDK versions. - - See the stdenv documentation for how to use `apple-sdk`. - ''); + darwinSdkVersion = + if lib.isAttrs sdkVersion then sdkVersion.darwinSdkVersion or "11.0" else sdkVersion; in +assert lib.assertMsg (darwinSdkVersion == "11.0" || darwinSdkVersion == "12.3") '' + `overrideSDK` and `darwin.apple_sdk_11_0.callPackage` are deprecated. + Only the 11.0 and 12.3 SDKs are supported using them. Please use + the versioned `apple-sdk` variants to use other SDK versions. + + See the stdenv documentation for how to use `apple-sdk`. +''; stdenv.override (old: { mkDerivationFromStdenv = extendMkDerivationArgs old (args: { buildInputs = args.buildInputs or [ ] - ++ lib.optional (stdenv.hostPlatform.darwinMinVersion != darwinMinVersion) minVersionHook - ++ lib.optional (stdenv.hostPlatform.darwinSdkVersion != darwinSdkVersion) resolvedSdk; + ++ lib.optional (darwinSdkVersion == "12.3") pkgsHostTarget.apple-sdk_12 + ++ lib.optional (sdkVersion ? darwinMinVersion) ( + pkgsHostTarget.darwinMinVersionHook sdkVersion.darwinMinVersion + ); }); }) diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index ab8d9c387b40..669e268b9001 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -66,12 +66,7 @@ makeScopeWithSplicing' { # macOS 12.3 SDK apple_sdk_12_3 = pkgs.callPackage ../os-specific/darwin/apple-sdk-12.3 { }; - # Pick an SDK - apple_sdk = { - "10.12" = apple_sdk_10_12; - "11.0" = apple_sdk_11_0; - }.${stdenv.hostPlatform.darwinSdkVersion} - or (throw "Unsupported sdk: ${stdenv.hostPlatform.darwinSdkVersion}"); + apple_sdk = apple_sdk_11_0; stubs = { inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0 apple_sdk_12_3; From 0757844d03ccbff1142c4227d43a30513069583f Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 12 Oct 2024 03:15:55 +0100 Subject: [PATCH 03/35] libsForQt5.qtbase: remove code for macOS < 11 --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 4ab855713ebc..c61ce503f4f5 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -4,7 +4,7 @@ , coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3 , which # darwin support -, apple-sdk_13, darwinMinVersionHook, xcbuild +, apple-sdk_13, xcbuild , dbus, fontconfig, freetype, glib, harfbuzz, icu, libdrm, libX11, libXcomposite , libXcursor, libXext, libXi, libXrender, libjpeg, libpng , libxcb @@ -39,13 +39,12 @@ let then "linux-generic-g++" else throw "Please add a qtPlatformCross entry for ${plat.config}"; - # Per https://doc.qt.io/qt-5/macos.html#supported-versions: deployment target = 10.13, build SDK = 13.x or 14.x. + # Per https://doc.qt.io/qt-5/macos.html#supported-versions: build SDK = 13.x or 14.x. # Despite advertising support for the macOS 14 SDK, the build system sets the maximum to 13 and complains # about 14, so we just use that. deploymentTarget = "10.13"; darwinVersionInputs = [ apple-sdk_13 - (darwinMinVersionHook deploymentTarget) ]; in @@ -166,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: ({ --replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath ' \ --replace-fail \ 'QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13' \ - 'QMAKE_MACOSX_DEPLOYMENT_TARGET = ${deploymentTarget}' + "QMAKE_MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET" '' else lib.optionalString libGLSupported '' sed -i mkspecs/common/linux.conf \ -e "/^QMAKE_INCDIR_OPENGL/ s|$|${lib.getDev libGL}/include|" \ @@ -235,10 +234,6 @@ stdenv.mkDerivation (finalAttrs: ({ ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' ] ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' ++ lib.optional stdenv.hostPlatform.isLinux "-DUSE_X11" - ++ lib.optionals (stdenv.hostPlatform.system == "x86_64-darwin") [ - # ignore "is only available on macOS 10.12.2 or newer" in obj-c code - "-Wno-error=unguarded-availability" - ] ++ lib.optionals withGtk3 [ ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' From 90c0ebfc8b49c8ab4215d0ffc5eca8bf7695106a Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 26 Oct 2024 12:22:53 +0100 Subject: [PATCH 04/35] gtk4: remove code for macOS < 11 --- pkgs/development/libraries/gtk/4.x.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index 8a79a06560fc..5ceaa2864086 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -53,8 +53,6 @@ , libexecinfo , broadwaySupport ? true , testers -, apple-sdk -, apple-sdk_10_15 , darwinMinVersionHook }: @@ -162,11 +160,6 @@ stdenv.mkDerivation (finalAttrs: { # Required for GSettings schemas at runtime. # Will be picked up by wrapGAppsHook4. gsettings-desktop-schemas - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (darwinMinVersionHook "10.15") - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin - && lib.versionOlder apple-sdk.version "10.15") [ - apple-sdk_10_15 ]; mesonFlags = [ From 995962f25af49863609f92249668da1f1b840ac5 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 12 Oct 2024 03:19:37 +0100 Subject: [PATCH 05/35] haskellPackages.network: remove code for macOS < 11 This reverts commit 2573d499bd7cfb3d1d1f52e20c5b8bf49eb5f7d8. --- pkgs/development/haskell-modules/configuration-darwin.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 844e38f9e4fa..846051126dd6 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -306,13 +306,6 @@ self: super: ({ __darwinAllowLocalNetworking = true; }); - # network requires `IP_RECVTOS`, which was added in 10.15. - network = - if lib.versionOlder (lib.getVersion pkgs.apple-sdk) "10.15" then - addBuildDepend pkgs.apple-sdk_10_15 super.network - else - super.network; - foldl = overrideCabal (drv: { postPatch = '' # This comment has been inserted, so the derivation hash changes, forcing From f3c863877b175288ec45ea78c1e041610a9b135e Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 18:50:44 +0100 Subject: [PATCH 06/35] apple-sdk_{10_12,10_13,10_14,10_15}: drop These can no longer be used now that the minimum is 11.3. --- .../metadata/apple-oss-lockfile.json | 712 ------------------ .../ap/apple-sdk/metadata/versions.json | 20 - pkgs/top-level/aliases.nix | 4 + pkgs/top-level/all-packages.nix | 4 - 4 files changed, 4 insertions(+), 736 deletions(-) diff --git a/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json b/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json index 66700bbc07ad..e68c2643ab7c 100644 --- a/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json +++ b/pkgs/by-name/ap/apple-sdk/metadata/apple-oss-lockfile.json @@ -1,716 +1,4 @@ { - "10.12.2": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-1mCJjZLBMIftcsKC7Ihhzi6LRS3u7kJzh9/dy6MY1Hg=", - "version": "60092.30.2" - }, - "IOAudioFamily": { - "hash": "sha256-5t3D44H/h0cUZqAjMi56BTbJD4o+R0xVdHJ1sZLYgNM=", - "version": "205.11" - }, - "IOBDStorageFamily": { - "hash": "sha256-4NpWcqfkp3UxhKKAwomDK3zxQ9DagyYFUVoUcrHo1Rg=", - "version": "18" - }, - "IOCDStorageFamily": { - "hash": "sha256-XOwdBFunLbwyasnTKQC6MRlXxGns07JvcAQc6AQ1Zt4=", - "version": "56" - }, - "IODVDStorageFamily": { - "hash": "sha256-bbGzqJnenEL9hRyKMBif/381/ETO+yNYHhlnXXWLne0=", - "version": "41.1" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-rhZdjNoZ3OuHVLClhe9tMQU6qJs3IOHEqJ5TaNRJRnM=", - "version": "424" - }, - "IOFireWireFamily": { - "hash": "sha256-adOI5uhd6QL4zpo4MK4ttmS1lcKseqmr68C1D/juGo0=", - "version": "465" - }, - "IOFireWireSBP2": { - "hash": "sha256-5UWldDuSyAnRYjgIKllY4VNbxtAUawrlRS46+8FnbPs=", - "version": "427" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-a/xnnR2dUSWVMyTlkxJPa7cWk20RHl0Zh2Ot2pSEkF0=", - "version": "252" - }, - "IOGraphics": { - "hash": "sha256-63XDVmEHu+KUdr06S7+RPi1BgLcAl4GZZRy+K96CvA0=", - "version": "513.1" - }, - "IOHIDFamily": { - "hash": "sha256-BUDj89w4DrnsIxJZNIx3ZJ85c22HMchIVhJI7xREWTM=", - "version": "870.31.1" - }, - "IOKitUser": { - "hash": "sha256-XJnOp5AtStXUim19GLev8MSM8iS5U8rRSnm7cNp/B80=", - "version": "1324.30.13" - }, - "IONetworkingFamily": { - "hash": "sha256-dL1wSu72uzAAoMdgSjitXgHviioVIGdkDXqwY6HT5/g=", - "version": "116.1.1" - }, - "IOSerialFamily": { - "hash": "sha256-ZcZ5F+a4u2AHThO5WyLn3/o42DR+YDBZKTy4P2EhHhk=", - "version": "91" - }, - "IOStorageFamily": { - "hash": "sha256-IjsG/lgdtW04WH/5rb1QAT563Oy4O5fUrTGuA1kBrkY=", - "version": "210.30.1" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-wyt5CJnNzk0MPC6pg2JAdiwIPxWFJsO9Yqa83vY+hLc=", - "version": "1158.30.7" - }, - "Libinfo": { - "hash": "sha256-3Mu9lOkaQx5gmNPXzr67FnZvKWmQhryIPsN6k95TU18=", - "version": "503.30.1" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-msGtbR53SHXjYN8i74gmkYWGkmqg+TcRO7TY/23XSFQ=", - "version": "165.20.1" - }, - "Librpcsvc": { - "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", - "version": "26" - }, - "Libsystem": { - "hash": "sha256-FwI2aD3wSwES/sKkr014BdFLfsKeEefgS0Pne1FGOp0=", - "version": "1238" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-Ya+ZO3bHNhQ+vZZx/lE7x+uMROHYWYKvm2ZZ1vClu3Q=", - "version": "57740.31.2" - }, - "architecture": { - "hash": "sha256-gHUfKWc1uahI/IATafY1ppPAWnYUghOEXWK2lknAfrQ=", - "version": "268" - }, - "configd": { - "hash": "sha256-i1UjnU7xBh7jCrGZxWMGrldzDrk2dDvjpthp/kq9OKo=", - "version": "888.30.2" - }, - "copyfile": { - "hash": "sha256-pth+37uTfuFY94HuA4b/5GleDjidAuXVsBEQBUa3xCE=", - "version": "138" - }, - "dtrace": { - "hash": "sha256-dK0N3l02241A5S1uvxZhqArHrTxd5Sd4JoAl6RBa8/8=", - "version": "209.20.4" - }, - "dyld": { - "hash": "sha256-wyVsmqYgKLdMKZsLOHzOLag+mBnH0kNS6XAv4zuNTT4=", - "version": "421.2" - }, - "eap8021x": { - "hash": "sha256-XSbzuNXyDJAADcnZed4Akmg1SK8P1IGrZitmhV3wzlo=", - "version": "246.30.1" - }, - "hfs": { - "hash": "sha256-7ByUP59FXmmrxC5yJYUQxrkgt/vY7vZMl5JPQ0HfoS8=", - "version": "366.30.3" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-hfXKQDRdgEDVyT+3v/EuQZyXNd0abD2tICYdQNfhtwY=", - "version": "67" - }, - "libdispatch": { - "hash": "sha256-tj4+6V4FL/XVON13UH71schElTm4/IKtPJH/yoUgRY0=", - "version": "703.30.5" - }, - "libmalloc": { - "hash": "sha256-q9zcUy8YTsRds6RYJMIUIY/MULQ19uKiNduMXP3D7hA=", - "version": "116.30.3" - }, - "libplatform": { - "hash": "sha256-k9Pd+TJCrNS7K100og+6bLAZjV/0VUTy8SIOsc+SE6Q=", - "version": "126.1.2" - }, - "libpthread": { - "hash": "sha256-FJaJO4lXIMAIwEmVF6mHE4ZZZoPI8ZIVuMKLojEsESE=", - "version": "218.30.1" - }, - "mDNSResponder": { - "hash": "sha256-LYDkkmgyfWKK6AMINXyrXo5kw7+lxUcz+4Ckq9175vA=", - "version": "765.30.11" - }, - "objc4": { - "hash": "sha256-WfhJo+/KPGr3/OuV5Kg2no48UR7VVVarh9TB3VFSCQ4=", - "version": "706" - }, - "ppp": { - "hash": "sha256-eW62wL8C1GZ2+5aN0dTPsdoEu6FWf+6XEYv8OiEeMfY=", - "version": "838" - }, - "removefile": { - "hash": "sha256-EJYU6eHggyRsezClEWkGJmgePIdtyF4rpFD4kSK5Czw=", - "version": "45" - }, - "xnu": { - "hash": "sha256-pkELzbsWPtm9H31LaRkaVjkQpPDxG9E93TNS+K9nqhE=", - "version": "3789.31.2" - } - }, - "10.13.2": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-3vx4HPlHP8PNi1GodeRh2iOEhyRBct3vX0Guc8060+I=", - "version": "60118.30.2" - }, - "IOAudioFamily": { - "hash": "sha256-UG09Dc+up5cJKDHPpCmo11IsBchqZ72hVBPx8y+1klw=", - "version": "206.5" - }, - "IOBDStorageFamily": { - "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", - "version": "19" - }, - "IOCDStorageFamily": { - "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", - "version": "58" - }, - "IODVDStorageFamily": { - "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", - "version": "42" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-4JS+oezknezxud2E2ojYdSx7A8Z9Q4rddetAoUMU1es=", - "version": "425" - }, - "IOFireWireFamily": { - "hash": "sha256-+FPlhMN2h1iCg1GAqH8+MwHG3GIs4DvvE3QGABX+3Rg=", - "version": "468" - }, - "IOFireWireSBP2": { - "hash": "sha256-5UWldDuSyAnRYjgIKllY4VNbxtAUawrlRS46+8FnbPs=", - "version": "427" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-a/xnnR2dUSWVMyTlkxJPa7cWk20RHl0Zh2Ot2pSEkF0=", - "version": "252" - }, - "IOGraphics": { - "hash": "sha256-E0wDkVmSeEcyO6L6OeWEQuZ0Ggh7MUkfqeQ9uLUEK/g=", - "version": "517.22" - }, - "IOHIDFamily": { - "hash": "sha256-9FhH53LyP1Yv2/afmr/lpNhl/GNFb/Yg+VpG5Ycg300=", - "version": "1035.30.15" - }, - "IOKitUser": { - "hash": "sha256-LebulFJ4KJ5Vbcjj6SC70cmed/0vhCVYo5qDxCw85SE=", - "version": "1445.31.1" - }, - "IONetworkingFamily": { - "hash": "sha256-gXGFCSn6JnHOVaRKhGXFYdvJBo/AGBMDrUdIcw/CwqI=", - "version": "124.30.1" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-Jo+0XlNi82KGksyrvUGyVPfmPMlTrDmZ75DT2lH66TY=", - "version": "218.30.1" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-js2xU5dMF5j209F9Cufuq5WzqcyNusbJDyuPpMgYEZU=", - "version": "1244.30.3" - }, - "Libinfo": { - "hash": "sha256-pVVLb8eOuLVc4HHGcgpl7dqT+Tg2xqKQIQroyLj5OEg=", - "version": "517.30.1" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-nsWWqelTEP4nPJI3vG897zpSOxYOgpm8TUVJ04MrWU4=", - "version": "172" - }, - "Librpcsvc": { - "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", - "version": "26" - }, - "Libsystem": { - "hash": "sha256-+VFJoiqEtXUcP8ERUxtrKwTWZmgdppr+0oPUxSgIF+c=", - "version": "1252" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-W3bSTDCjj2ftq0wbDp+Z8QfD6TpF4p0fLrVjx2AmvfY=", - "version": "58286.31.2" - }, - "architecture": { - "hash": "sha256-gHUfKWc1uahI/IATafY1ppPAWnYUghOEXWK2lknAfrQ=", - "version": "268" - }, - "configd": { - "hash": "sha256-1YGIbAES4OONFtC2xxXWbM7Htlz2kKtFUULWqBB6fz0=", - "version": "963.30.1" - }, - "copyfile": { - "hash": "sha256-CYTZwieSu1Fm9TLaaevfxDngAPRkEfewY+TgJrREed8=", - "version": "146.30.2" - }, - "dtrace": { - "hash": "sha256-sgLSbCp9tYZ7ws2jgxB3NaAk+ijsIbmybsi0gkbZjFQ=", - "version": "262" - }, - "dyld": { - "hash": "sha256-b1hM+iQl7ihRjHRL4Rcg5AHv5HSyKErVkTb+5KFF2P4=", - "version": "519.2.2" - }, - "eap8021x": { - "hash": "sha256-KZsnzH5JiLfzY3zjMAlJRPCGY5EioW6aDJnMAemZJUY=", - "version": "264.30.3" - }, - "hfs": { - "hash": "sha256-Ine8EFpW1kuNDn/r66abGyvYm+NSGI5TV3v/OlgyIME=", - "version": "407.30.1" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-hfXKQDRdgEDVyT+3v/EuQZyXNd0abD2tICYdQNfhtwY=", - "version": "67" - }, - "libdispatch": { - "hash": "sha256-rvsvtv9VncLxQHoURBBczrTaSgbw5827Qf2TxAPopqA=", - "version": "913.30.4" - }, - "libmalloc": { - "hash": "sha256-VM5jHQYqDkoGmrQ2UugTu+XOLjd1YPqdfddzQkKfhiY=", - "version": "140.1.1" - }, - "libplatform": { - "hash": "sha256-zQ3MYqQoMCsfgG6frwnG3LfKWwauTzgwhoADXVUiGR0=", - "version": "161.20.1" - }, - "libpthread": { - "hash": "sha256-6NLKbnBXikSfqz0ZWF6MOIq/bQK/CmfQNvkNXCU6lcw=", - "version": "301.30.1" - }, - "mDNSResponder": { - "hash": "sha256-anzilyXeGh8LL3cYvuLRdqGzhHUvSp9eILJWAltL18M=", - "version": "878.30.4" - }, - "objc4": { - "hash": "sha256-+4o+EzD0YQhgfTg/W9SbVDol7wWUIFxVAVTGg4OVfHQ=", - "version": "723" - }, - "ppp": { - "hash": "sha256-eUIFlYHsAPRrBS0TpTP1/TacaK8h/5QM2Xl1T46MdWc=", - "version": "847" - }, - "removefile": { - "hash": "sha256-EJYU6eHggyRsezClEWkGJmgePIdtyF4rpFD4kSK5Czw=", - "version": "45" - }, - "xnu": { - "hash": "sha256-x2k0KyNk4mIodXfYDHjaCKR1CsiE3HYBNN6p5SfGIMU=", - "version": "4570.31.3" - } - }, - "10.14.6": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-hqsLaS7LEPu8t/bNuV4VUUbMteCetf3/o8e2X0iQvOo=", - "version": "60118.250.2" - }, - "IOAudioFamily": { - "hash": "sha256-UG09Dc+up5cJKDHPpCmo11IsBchqZ72hVBPx8y+1klw=", - "version": "206.5" - }, - "IOBDStorageFamily": { - "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", - "version": "19" - }, - "IOCDStorageFamily": { - "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", - "version": "58" - }, - "IODVDStorageFamily": { - "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", - "version": "42" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-EXGpObJVC0b9X3xxEXJScDlM6xygmK3MoCbng21XCmg=", - "version": "426" - }, - "IOFireWireFamily": { - "hash": "sha256-a8zEWhwQTzgGKg75RBmDXb1pgJr602IxnPBTFkKEqSM=", - "version": "473" - }, - "IOFireWireSBP2": { - "hash": "sha256-lpYBTL9TzreyxJn4J3vfuXoWMH/4y8FnNKk5YiuDgHI=", - "version": "433" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-4Y+5+5cJtolSrM3AUnnhSBS3RrKXbg9Kh1ynmllOA2E=", - "version": "252.250.2" - }, - "IOGraphics": { - "hash": "sha256-QFT+h0gtc7SUf0HNciknG0aMOQXnsWCR25C04dgK1/A=", - "version": "530.66" - }, - "IOHIDFamily": { - "hash": "sha256-DpYcxGLvk10iz5TG2SO8R+5obEJv+zLK56RzA/pH0KA=", - "version": "1090.270.6" - }, - "IOKitUser": { - "hash": "sha256-QH2m6BCYtO2JDksH0TebrEldjjZdC4U9otVu/uUoyWY=", - "version": "1483.260.4" - }, - "IONetworkingFamily": { - "hash": "sha256-M01+Bhf7CTJMA7StjSRFW6ffq7Qf/IOh7aM+JI3ONe8=", - "version": "129.200.1" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-X6s/IyApMQ7zo1wO7IpIk1e94tSsmvvT+fZHThMWv5Y=", - "version": "218.260.1" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-mhhs8U/oZku9o2kqzLW4K8Xv9QbnKNBbBr+Q6NqC1vQ=", - "version": "1272.250.1" - }, - "Libinfo": { - "hash": "sha256-DUbyWZI+n3WvftlI7aj60CoEHb9y18H1+FYiYQroVEE=", - "version": "517.200.9" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-q0ns85I9Zwo5bZPN5JqjrJofY8/XLl+mbsRhyF1kx+o=", - "version": "172.200.21" - }, - "Librpcsvc": { - "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", - "version": "26" - }, - "Libsystem": { - "hash": "sha256-Lo4S7fsepuYlRtXGcVvNTAlx/soabjvKEUuiO09htNs=", - "version": "1252.250.1" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-uqSRU4Ft7+zMQ59FBS+Mu2JcWdbbuWP9/dFfo+Vkr5s=", - "version": "58286.270.3.0.1" - }, - "architecture": { - "hash": "sha256-WGUNtFSBu9AuefHVEO3uB/JpKEGAgGFX/zRaaW4eYbI=", - "version": "272.230.1" - }, - "configd": { - "hash": "sha256-Pg58INpZfdKXn1EPut2Kzghfjwxaz1Ex+u5KACA2O7g=", - "version": "963.270.3" - }, - "copyfile": { - "hash": "sha256-gbxGQ8Wjt20++Bf+BkZT/R5dpsCnRo8+qUcerv5m7V8=", - "version": "146.250.1" - }, - "dtrace": { - "hash": "sha256-ZbAaH2wmYlgLKtq0bpDoEInZiHMe5Bx84iUQC67ia0E=", - "version": "284.250.4" - }, - "dyld": { - "hash": "sha256-5wtx+4pSAcNEwcE024XwIRorS3ZW/qmvfkY7UGe75ho=", - "version": "655.1.1" - }, - "eap8021x": { - "hash": "sha256-9j+6Hw7w9wdLZxjdRwTACws2obg2/VCgl9ed4+Y4pPg=", - "version": "264.250.6" - }, - "hfs": { - "hash": "sha256-/yf6z0VJkw2pPnVst2qgnSZfO6x9ot/cWT7Aewo3IZ4=", - "version": "407.200.4" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-NHK+yc7M/wc6Sbk24LDejNjBrbcWIg9zrYHlnPXC/Yc=", - "version": "73" - }, - "libdispatch": { - "hash": "sha256-b0WqX3qX/qhUi2l63BrNvaVq167SuIgYGPid92MJ32U=", - "version": "1008.270.1" - }, - "libmalloc": { - "hash": "sha256-1ZvO0LGV4AkDSdtwqfPFgCUbpAVzfKS0msa58tL2WLA=", - "version": "166.251.2" - }, - "libplatform": { - "hash": "sha256-xQqCf+/DpHu/JMbmOpy6jl3np0H7/m1NKWZ21YWaerE=", - "version": "177.270.1" - }, - "libpthread": { - "hash": "sha256-+AuYgLTM5RO3+MbxeE86rPh9WbiTiAl2gHZOAaQRkec=", - "version": "330.250.2" - }, - "mDNSResponder": { - "hash": "sha256-SlrC3LIOndY1DVJ26bnuYQwpLhkV1PHAMJeaE3bMDI4=", - "version": "878.270.2" - }, - "objc4": { - "hash": "sha256-rzDiOE//rUnRyCHM/XUQs9IImKGIFN/0D0IZ7SeGp2s=", - "version": "756.2" - }, - "ppp": { - "hash": "sha256-a0zTwevtC+AAyLV/0+rX9VN5BXc2vaZGArz83VZtiWs=", - "version": "847.200.5" - }, - "removefile": { - "hash": "sha256-23+ivRTPKId9Is5NAwYmVgN7TX2+7v9NONs9u7DrGH4=", - "version": "45.200.2" - }, - "xnu": { - "hash": "sha256-ZRgj214Mmvvcji4OdzRjK/7Xtpz7r69SFmzSvtZNhNU=", - "version": "4903.270.47" - } - }, - "10.15.6": { - "CarbonHeaders": { - "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", - "version": "18.1" - }, - "CommonCrypto": { - "hash": "sha256-HKSRtTnJ6dH5j6Y+PRDQUcPyjwR70PEbRQu3hTM4G0A=", - "version": "60165.120.1" - }, - "IOAudioFamily": { - "hash": "sha256-5lcK8nyjayLBw9j4PPVs8TWwOWcpggKkSXefVGl2rfA=", - "version": "300.2" - }, - "IOBDStorageFamily": { - "hash": "sha256-aaS5jWPRX4be8d3Rigq+kXzi9Zwbr8dHcNgcIz0n66o=", - "version": "19" - }, - "IOCDStorageFamily": { - "hash": "sha256-U6v+Gj+IumU8Aha5+uf3yOU0Z4KMuBh7aXnJqiZ/abY=", - "version": "58" - }, - "IODVDStorageFamily": { - "hash": "sha256-JLp4xN0Rdb2VpuXtVTODYNqQthDEZk+g/lvHRwJHQB4=", - "version": "42" - }, - "IOFWDVComponents": { - "hash": "sha256-WkfkWnzRupEh20U7vjsTta89clhus6GTkOpXQWXw/bM=", - "version": "208" - }, - "IOFireWireAVC": { - "hash": "sha256-7H3WcZC/HuS9xsTNDWRqt+1JzUNK4ndvd4u2ru0GGRE=", - "version": "428" - }, - "IOFireWireFamily": { - "hash": "sha256-hLtd3d5qOsYdnGpMaTSipu9bOIYEHz2rKzNAoJai4dI=", - "version": "475" - }, - "IOFireWireSBP2": { - "hash": "sha256-pHY6okHHotfFjdNsLwRjQX7dWGolBelpD7MEDz4lafY=", - "version": "434" - }, - "IOFireWireSerialBusProtocolTransport": { - "hash": "sha256-Jb70fanuJTNV4IVoKMtMA66oVDR0I/h3JSIymhlKTQU=", - "version": "257" - }, - "IOGraphics": { - "hash": "sha256-sKnJ0MOhT+dFfmMD2gqYmySufh0I9vBI/swjqoCbSHc=", - "version": "576.1" - }, - "IOHIDFamily": { - "hash": "sha256-esiEGEiggFMR7rha6+dYaqiwGM+TlZtLBe8LF/PF0D8=", - "version": "1446.140.2" - }, - "IOKitUser": { - "hash": "sha256-rB5zfJwoBPMpqW5PDM6ppWW07Y2AGS3f0UzXdfPGYYE=", - "version": "1726.140.1" - }, - "IONetworkingFamily": { - "hash": "sha256-T+aDA++nubTHdPpfdAEm6077eJuzsQXHUDEbdlthVBQ=", - "version": "139.140.2" - }, - "IOSerialFamily": { - "hash": "sha256-wVS4QTx6MBOS0VrwyCZ3s5Usezwaf8rWzmNnfdDTXTU=", - "version": "93" - }, - "IOStorageFamily": { - "hash": "sha256-vyIN7oru2PN7C4a6RBJomlYs4NaYzmCTBEuWiSXG41M=", - "version": "238.120.1" - }, - "IOUSBFamily": { - "hash": "sha256-Z0E3TfKP49toYo1Fo9kElRap8CZ+mVDHy5RIexgJTpA=", - "version": "630.4.5" - }, - "Libc": { - "hash": "sha256-FAifkHs2Kls2ym9/M56o4u2UZfdTKCnqxRbTXOIHyz8=", - "version": "1353.100.2" - }, - "Libinfo": { - "hash": "sha256-syTH8dhWkSPgqRG7p528L7Xx1+ymmqHrCyhUykGhK9s=", - "version": "538" - }, - "Libm": { - "hash": "sha256-p4BndAag9d0XSMYWQ+c4myGv5qXbKx5E1VghudSbpTk=", - "version": "2026" - }, - "Libnotify": { - "hash": "sha256-7o4GNZde3MkCks2NJdNIXvvtMAOqGEA05M7S8o7j0XQ=", - "version": "241.100.2" - }, - "Librpcsvc": { - "hash": "sha256-8e8E9TkRTAep3/miyqhF/mSkNdlym12W+AVhXF94+Bg=", - "version": "26" - }, - "Libsystem": { - "hash": "sha256-RNkaoaRl6akbrgjagLd+ncZ2EAdjegIdy7Z/MINoTpc=", - "version": "1281.100.1" - }, - "OpenDirectory": { - "hash": "sha256-6fSl8PasCZSBfe0ftaePcBuSEO3syb6kK+mfDI6iR7A=", - "version": "146" - }, - "Security": { - "hash": "sha256-dlNTEVkgTl3po7ty2wjatGTANBwegpZxBX1ByneqKRU=", - "version": "59306.140.5" - }, - "architecture": { - "hash": "sha256-pIX9pEXE1Xjll9qwiWrMRwqw6G4g0isto/ALHsmkUSc=", - "version": "279" - }, - "configd": { - "hash": "sha256-nKFDfyH1gQtFyda6HBq3E7Tp5EI4O5n/9GYQEFhMIdE=", - "version": "1061.141.1" - }, - "copyfile": { - "hash": "sha256-nEfD/KUk7e32tw9buQYrsy/BAdAfgE9IObdV4nCm37M=", - "version": "166.40.1" - }, - "dtrace": { - "hash": "sha256-dgJ7om5efUQyc9tP6cBeSpahORqV5bzEDcxcVu4TaDg=", - "version": "338.100.1" - }, - "dyld": { - "hash": "sha256-YkFazM/cviJMwPVXHXP2irfgHtOueI2RNrMedWvkH0A=", - "version": "750.6" - }, - "eap8021x": { - "hash": "sha256-/FsmD4mk/kwsocK8x8Gsk3yOBW3pZLcGHxnNcogqjhY=", - "version": "292.40.2" - }, - "hfs": { - "hash": "sha256-vNo2Wd0n6tjG+xtA3OrwB/TOXvLxaLehEY/l9ZBS5Sw=", - "version": "522.100.5" - }, - "launchd": { - "hash": "sha256-8mW9bnuHmRXCx9py8Wy28C5b2QPICW0rlAps5njYa00=", - "version": "842.1.4" - }, - "libclosure": { - "hash": "sha256-A3QTD6bqUy8ahH/XlMuidYNvT92ufeVpwPsZh4ZzQdk=", - "version": "74" - }, - "libdispatch": { - "hash": "sha256-gd56s0C2dKbZoaGNXt3LBfXaEl5A744djFq3G9uoWws=", - "version": "1173.100.2" - }, - "libmalloc": { - "hash": "sha256-1VhkXY8m6vVQ4aaxICtHVQtXDHNV2CsY9UUst0AioMY=", - "version": "283.100.6" - }, - "libplatform": { - "hash": "sha256-Z4Lj9efT1bt6HMAMQvgMc33QdYzrBvieBjmw4W6H9YI=", - "version": "220.100.1" - }, - "libpthread": { - "hash": "sha256-ZHxqq1qVRXPL0psAX+5bcuA5D/FjJnIcm+ctTkTGBJA=", - "version": "416.100.3" - }, - "mDNSResponder": { - "hash": "sha256-CV3GBeO4Ly8/PbZ7Fq55diRzB00VsB2uTvjGo/tqf10=", - "version": "1096.100.3" - }, - "objc4": { - "hash": "sha256-AJwPTnjJMBbSFDppvKyx92RdfmbmwQOvPnU0E0mU+jU=", - "version": "787.1" - }, - "ppp": { - "hash": "sha256-DNmDigQqDKR1ghcn6GaKeDldp6thH2C6+uZKjC3EfkU=", - "version": "862.140.2" - }, - "removefile": { - "hash": "sha256-bkxiq7OEFtEFPwSBi4OxmpRyKWYgeMhnokFfS7RPUnU=", - "version": "48" - }, - "xnu": { - "hash": "sha256-Y/DTtpnT8JQZO5Ijr+tW0IrIOuECcJ+ZvFLCgwrFt2M=", - "version": "6153.141.1" - } - }, "11.3": { "CarbonHeaders": { "hash": "sha256-nIPXnLr21yVnpBhx9K5q3l/nPARA6JL/dED08MeyhP8=", diff --git a/pkgs/by-name/ap/apple-sdk/metadata/versions.json b/pkgs/by-name/ap/apple-sdk/metadata/versions.json index 608990bddd46..5a444c2c4eaa 100644 --- a/pkgs/by-name/ap/apple-sdk/metadata/versions.json +++ b/pkgs/by-name/ap/apple-sdk/metadata/versions.json @@ -1,24 +1,4 @@ { - "10.12": { - "url": "http://swcdn.apple.com/content/downloads/22/62/041-88607/wg8avdk0jo75k9a13gentz9stwqgrqmcv6/CLTools_SDK_OSX1012.pkg", - "version": "10.12.2", - "hash": "sha256-Jf2WIB9bY/rPwe0AOW3YWJY/6EqVe41yhezdTGOO3M8=" - }, - "10.13": { - "url": "http://swcdn.apple.com/content/downloads/33/36/041-90419-A_7JJ4H9ZHO2/xs88ob5wjz6riz7g6764twblnvksusg4ps/CLTools_SDK_macOS1013.pkg", - "version": "10.13.2", - "hash": "sha256-8nd55fiJLfRWABAbMaHXjp6i20RqupmKedwmhb3S0/A=" - }, - "10.14": { - "url": "http://swcdn.apple.com/content/downloads/41/57/061-26573-A_JMOA8GZGDR/lj8yrtu8dgs40fw9k8f5fkoviwkp0og6vs/CLTools_SDK_macOS1014.pkg", - "version": "10.14.6", - "hash": "sha256-NMNkycIl3AVZCw0ZpHNkaeYVS9LAZVSddHw5loL9dhk=" - }, - "10.15": { - "url": "https://swcdn.apple.com/content/downloads/50/51/071-29699-A_YC8SX0OHH3/7479xojqghsvgtnt3dxjpnxuz9sjpmbmds/CLTools_macOSLMOS_SDK.pkg", - "version": "10.15.6", - "hash": "sha256-mPJQC+v4yNiOCKLQfhidB2WH2MMclSCP1odvOoGdVPw=" - }, "11": { "url": "https://swcdn.apple.com/content/downloads/02/62/071-54303-A_EU2CL1YVT7/943i95dpeyi2ghlnj2mgyq3t202t5gf18b/CLTools_macOSNMOS_SDK.pkg", "version": "11.3", diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d84b67f44d01..d28db7363fe1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -110,6 +110,10 @@ mapAliases { ao = libfive; # Added 2024-10-11 apacheKafka_3_5 = throw "apacheKafka_2_8 through _3_5 have been removed from nixpkgs as outdated"; # Added 2024-06-13 antimicroX = throw "'antimicroX' has been renamed to/replaced by 'antimicrox'"; # Converted to throw 2024-10-17 + apple-sdk_10_12 = throw "apple-sdk_10_12 was removed as Nixpkgs no longer supports macOS 10.12; see the 25.05 release notes"; # Added 2024-10-27 + apple-sdk_10_13 = throw "apple-sdk_10_13 was removed as Nixpkgs no longer supports macOS 10.13; see the 25.05 release notes"; # Added 2024-10-27 + apple-sdk_10_14 = throw "apple-sdk_10_14 was removed as Nixpkgs no longer supprots macOS 10.14; see the 25.05 release notes"; # Added 2024-10-27 + apple-sdk_10_15 = throw "apple-sdk_10_15 was removed as Nixpkgs no longer supports macOS 10.15; see the 25.05 release notes"; # Added 2024-10-27 appthreat-depscan = dep-scan; # Added 2024-04-10 arcanist = throw "arcanist was removed as phabricator is not supported and does not accept fixes"; # Added 2024-06-07 aria = aria2; # Added 2024-03-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1f5740431c22..6018ed75c44d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11342,10 +11342,6 @@ with pkgs; ### DEVELOPMENT / LIBRARIES / DARWIN SDKS - apple-sdk_10_12 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "10.12"; }; - apple-sdk_10_13 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "10.13"; }; - apple-sdk_10_14 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "10.14"; }; - apple-sdk_10_15 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "10.15"; }; apple-sdk_11 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "11"; }; apple-sdk_12 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "12"; }; apple-sdk_13 = callPackage ../by-name/ap/apple-sdk/package.nix { darwinSdkMajorVersion = "13"; }; From 685ed87eccd31e58eceac312a9053c7a5314cfa8 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 26 Oct 2024 03:03:19 +0100 Subject: [PATCH 07/35] darwin.apple_sdk_10_12: drop --- pkgs/os-specific/darwin/apple-sdk/default.nix | 272 ------------------ pkgs/top-level/darwin-aliases.nix | 4 + pkgs/top-level/darwin-packages.nix | 5 +- 3 files changed, 5 insertions(+), 276 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-sdk/default.nix diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix deleted file mode 100644 index 388de3730380..000000000000 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ /dev/null @@ -1,272 +0,0 @@ -# Compatibility stubs for packages that used the old SDK frameworks. -# TODO(@reckenrode) Make these stubs warn after framework usage has been cleaned up in nixpkgs. -{ lib, callPackage }: - -let - mkStub = callPackage ./mk-stub.nix { } "10.12"; - - frameworks = lib.genAttrs [ - "AGL" - "AVFoundation" - "AVKit" - "Accelerate" - "Accounts" - "AddressBook" - "AppKit" - "AppKitScripting" - "AppleScriptKit" - "AppleScriptObjC" - "ApplicationServices" - "AudioToolbox" - "AudioUnit" - "AudioVideoBridging" - "Automator" - "CFNetwork" - "CalendarStore" - "Carbon" - "Cocoa" - "Collaboration" - "ContactsPersistence" - "CoreAudio" - "CoreAudioKit" - "CoreBluetooth" - "CoreData" - "CoreFoundation" - "CoreGraphics" - "CoreImage" - "CoreLocation" - "CoreMIDI" - "CoreMIDIServer" - "CoreMedia" - "CoreMediaIO" - "CoreServices" - "CoreSymbolication" - "CoreText" - "CoreVideo" - "CoreWLAN" - "DVDPlayback" - "DebugSymbols" - "DirectoryService" - "DiscRecording" - "DiscRecordingUI" - "DiskArbitration" - "DisplayServices" - "EventKit" - "ExceptionHandling" - "FWAUserLib" - "ForceFeedback" - "Foundation" - "GLKit" - "GLUT" - "GSS" - "GameCenter" - "GameController" - "GameKit" - "GameplayKit" - "Hypervisor" - "ICADevices" - "IMServicePlugIn" - "IOBluetooth" - "IOBluetoothUI" - "IOKit" - "IOSurface" - "ImageCaptureCore" - "ImageIO" - "InputMethodKit" - "InstallerPlugins" - "InstantMessage" - "JavaFrameEmbedding" - "JavaNativeFoundation" - "JavaRuntimeSupport" - "JavaScriptCore" - "JavaVM" - "Kerberos" - "Kernel" - "LDAP" - "LatentSemanticMapping" - "LocalAuthentication" - "MapKit" - "MediaAccessibility" - "MediaPlayer" - "MediaToolbox" - "Metal" - "MetalKit" - "ModelIO" - "MultitouchSupport" - "NetFS" - "OSAKit" - "OpenAL" - "OpenCL" - "OpenDirectory" - "OpenGL" - "PCSC" - "PreferencePanes" - "PubSub" - "QTKit" - "Quartz" - "QuartzCore" - "QuickLook" - "QuickTime" - "SceneKit" - "ScreenSaver" - "Scripting" - "ScriptingBridge" - "Security" - "SecurityFoundation" - "SecurityInterface" - "ServiceManagement" - "SkyLight" - "Social" - "SpriteKit" - "StoreKit" - "SyncServices" - "System" - "SystemConfiguration" - "TWAIN" - "Tcl" - "UIFoundation" - "VideoDecodeAcceleration" - "VideoToolbox" - "WebKit" - "vmnet" - ] mkStub; - - bareFrameworks = lib.genAttrs [ - "AGL" - "AVFoundation" - "AVKit" - "Accelerate" - "Accounts" - "AddressBook" - "AppKit" - "AppKitScripting" - "AppleScriptKit" - "AppleScriptObjC" - "ApplicationServices" - "AudioToolbox" - "AudioUnit" - "AudioVideoBridging" - "Automator" - "CFNetwork" - "CalendarStore" - "Carbon" - "Cocoa" - "Collaboration" - "CoreAudio" - "CoreAudioKit" - "CoreBluetooth" - "CoreData" - "CoreFoundation" - "CoreGraphics" - "CoreImage" - "CoreLocation" - "CoreMIDI" - "CoreMIDIServer" - "CoreMedia" - "CoreMediaIO" - "CoreServices" - "CoreText" - "CoreVideo" - "CoreWLAN" - "DVDPlayback" - "DirectoryService" - "DiscRecording" - "DiscRecordingUI" - "DiskArbitration" - "EventKit" - "ExceptionHandling" - "FWAUserLib" - "ForceFeedback" - "Foundation" - "GLKit" - "GLUT" - "GSS" - "GameCenter" - "GameController" - "GameKit" - "GameplayKit" - "Hypervisor" - "ICADevices" - "IMServicePlugIn" - "IOBluetooth" - "IOBluetoothUI" - "IOKit" - "IOSurface" - "ImageCaptureCore" - "ImageIO" - "InputMethodKit" - "InstallerPlugins" - "InstantMessage" - "JavaFrameEmbedding" - "JavaNativeFoundation" - "JavaRuntimeSupport" - "JavaScriptCore" - "JavaVM" - "Kerberos" - "Kernel" - "LDAP" - "LatentSemanticMapping" - "LocalAuthentication" - "MapKit" - "MediaAccessibility" - "MediaPlayer" - "MediaToolbox" - "Metal" - "MetalKit" - "ModelIO" - "NetFS" - "OSAKit" - "OpenAL" - "OpenCL" - "OpenDirectory" - "OpenGL" - "PCSC" - "PreferencePanes" - "PubSub" - "QTKit" - "Quartz" - "QuartzCore" - "QuickLook" - "QuickTime" - "SceneKit" - "ScreenSaver" - "Scripting" - "ScriptingBridge" - "Security" - "SecurityFoundation" - "SecurityInterface" - "ServiceManagement" - "Social" - "SpriteKit" - "StoreKit" - "SyncServices" - "System" - "SystemConfiguration" - "TWAIN" - "Tcl" - "VideoDecodeAcceleration" - "VideoToolbox" - "WebKit" - "vmnet" - ] mkStub; -in -{ - inherit bareFrameworks frameworks; - - libs = lib.genAttrs [ - "Xplugin" - "sandbox" - "simd" - "utmp" - "xpc" - ] mkStub; - - version = "10.12"; -} -// lib.genAttrs [ - "darwin-stubs" - "Libsystem" - "objc4" - "sdk" - "sdkRoot" -] mkStub diff --git a/pkgs/top-level/darwin-aliases.nix b/pkgs/top-level/darwin-aliases.nix index 6fafa5f487c4..7f3ea2edd35e 100644 --- a/pkgs/top-level/darwin-aliases.nix +++ b/pkgs/top-level/darwin-aliases.nix @@ -47,6 +47,10 @@ let in mapAliases ({ + ### A ### + + apple_sdk_10_12 = throw "darwin.apple_sdk_10_12 was removed as Nixpkgs no longer supports macOS 10.12; see the 25.05 release notes"; # Added 2024-10-27 + ### B ### builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06 diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 669e268b9001..5680bfee301a 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -57,9 +57,6 @@ makeScopeWithSplicing' { # Must use pkgs.callPackage to avoid infinite recursion. impure-cmds = pkgs.callPackage ../os-specific/darwin/impure-cmds { }; - # macOS 10.12 SDK - apple_sdk_10_12 = pkgs.callPackage ../os-specific/darwin/apple-sdk { }; - # macOS 11.0 SDK apple_sdk_11_0 = pkgs.callPackage ../os-specific/darwin/apple-sdk-11.0 { }; @@ -69,7 +66,7 @@ makeScopeWithSplicing' { apple_sdk = apple_sdk_11_0; stubs = { - inherit apple_sdk apple_sdk_10_12 apple_sdk_11_0 apple_sdk_12_3; + inherit apple_sdk apple_sdk_11_0 apple_sdk_12_3; libobjc = self.objc4; } // lib.genAttrs [ "CF" From fee73d8d33805d4af6d676288e1387b60003b6b5 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 18:50:44 +0100 Subject: [PATCH 08/35] apple-sdk: remove code for old SDKs --- .../by-name/ap/apple-sdk/common/fetch-sdk.nix | 4 ---- .../ap/apple-sdk/common/process-stubs.nix | 1 - .../ap/apple-sdk/common/rewrite-sdk-paths.nix | 18 ---------------- pkgs/by-name/ap/apple-sdk/package.nix | 21 ++++--------------- 4 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix diff --git a/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix b/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix index d96c27509dda..e1a2607c0b86 100644 --- a/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix +++ b/pkgs/by-name/ap/apple-sdk/common/fetch-sdk.nix @@ -27,11 +27,7 @@ fetchurl { mv "$downloadedFile" "$renamed" pbzx "$renamed" | cpio -idm - # SDKs are inconsistent about whether MacOSX.sdk or MacOSX.sdk is a symlink. src=Library/Developer/CommandLineTools/SDKs/MacOSX${lib.versions.majorMinor version}.sdk - if [ ! -d $src ]; then - src=Library/Developer/CommandLineTools/SDKs/MacOSX.sdk - fi # Remove unwanted binaries, man pages, and folders from the SDK. rm -rf $src/usr/bin $src/usr/share $src/System/Library/Perl diff --git a/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix index 840415d2e3b1..5a5cd345ec06 100644 --- a/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix +++ b/pkgs/by-name/ap/apple-sdk/common/process-stubs.nix @@ -24,7 +24,6 @@ self: super: { + '' echo "Removing the following dylibs from the libSystem reexported libraries list: ${lib.escapeShellArg (lib.concatStringsSep ", " removedDylibs)}" for libSystem in libSystem.B.tbd libSystem.B_asan.tbd; do - test ! -e usr/lib/$libSystem && continue # TODO: remove once the minimum SDK is 10.14 or newer. tapi stubify --filetype=tbd-v5 usr/lib/$libSystem -o usr/lib/$libSystem # tbd-v5 is a JSON-based format. jq --argjson libs ${lib.escapeShellArg (builtins.toJSON removedDylibs)} ' if .libraries then diff --git a/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix b/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix deleted file mode 100644 index 0eca6b8836b3..000000000000 --- a/pkgs/by-name/ap/apple-sdk/common/rewrite-sdk-paths.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, sdkVersion }: - -let - name = "MacOSX${lib.versions.majorMinor sdkVersion}.sdk"; -in -self: super: { - # Rewrite the stubs to point to dylibs in the SDK instead of at system locations. This is needed for umbrella - # frameworks in older SDKs, which don’t also embed their stubs. - buildPhase = - super.buildPhase or "" - + '' - echo "Rewriting stubs to reference the SDK location in the store" - find . -name '*.tbd' -type f -exec sed -E \ - -e "/^install-name/n; s|( \\|'\\|\"\\|\\[)/usr/|\1$sdkpath/${name}/usr/|g" \ - -e "/^install-name/n; s|( \\|'\\|\"\\|\\[)/System/|\1$sdkpath/${name}/System/|g" \ - -i {} \; - ''; -} diff --git a/pkgs/by-name/ap/apple-sdk/package.nix b/pkgs/by-name/ap/apple-sdk/package.nix index 31017a6a9ae5..779ed45260ec 100644 --- a/pkgs/by-name/ap/apple-sdk/package.nix +++ b/pkgs/by-name/ap/apple-sdk/package.nix @@ -9,12 +9,8 @@ in substitute, # Specifies the major version used for the SDK. Uses `hostPlatform.darwinSdkVersion` by default. - darwinSdkMajorVersion ? ( - if lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11" then - lib.versions.majorMinor stdenv.hostPlatform.darwinSdkVersion - else - lib.versions.major stdenv.hostPlatform.darwinSdkVersion - ), + darwinSdkMajorVersion ? lib.versions.major stdenv.hostPlatform.darwinSdkVersion, + # Enabling bootstrap disables propagation. Defaults to `false` (meaning to propagate certain packages and `xcrun`) # except in stage0 of the Darwin stdenv bootstrap. enableBootstrap ? stdenv.name == "bootstrap-stage0-stdenv-darwin", @@ -48,11 +44,6 @@ let (callPackage ./common/propagate-inputs.nix { }) (callPackage ./common/propagate-xcrun.nix { }) ] - # Older SDKs do not include the libraries re-exported from umbrella frameworks in the umbrellas’ stubs, which causes - # link failures for those libraries unless their paths have been rewritten to point to the store. - ++ lib.optionals (lib.versionOlder sdkVersion "11.0") [ - (callPackage ./common/rewrite-sdk-paths.nix { inherit sdkVersion; }) - ] # This has to happen last. ++ [ (callPackage ./common/run-build-phase-hooks.nix { }) @@ -97,9 +88,7 @@ stdenvNoCC.mkDerivation ( mkdir -p "$sdkpath" cp -rd . "$sdkpath/${sdkName}" - ${lib.optionalString (lib.versionAtLeast finalAttrs.version "11.0") '' - ln -s "${sdkName}" "$sdkpath/MacOSX${sdkMajor}.sdk" - ''} + ln -s "${sdkName}" "$sdkpath/MacOSX${sdkMajor}.sdk" ln -s "${sdkName}" "$sdkpath/MacOSX.sdk" runHook postInstall @@ -116,9 +105,7 @@ stdenvNoCC.mkDerivation ( homepage = "https://developer.apple.com"; maintainers = lib.teams.darwin.members; platforms = lib.platforms.darwin; - badPlatforms = - lib.optionals (lib.versionAtLeast sdkVersion "10.15") [ lib.systems.inspect.patterns.is32bit ] - ++ lib.optionals (lib.versionOlder sdkVersion "11.0") [ lib.systems.inspect.patterns.isAarch ]; + badPlatforms = [ lib.systems.inspect.patterns.is32bit ]; }; }) ) From c00c40ba8b994305961b1263255252b5194b588b Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:40:34 +0100 Subject: [PATCH 09/35] stdenv/darwin: remove code for old SDKs --- pkgs/stdenv/darwin/default.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 2dfb34e40372..ab8eae632978 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -28,14 +28,7 @@ assert crossSystem == localSystem; let inherit (localSystem) system; - sdkMajorVersion = - let - inherit (localSystem) darwinSdkVersion; - in - if lib.versionOlder darwinSdkVersion "11" then - lib.versions.majorMinor darwinSdkVersion - else - lib.versions.major darwinSdkVersion; + sdkMajorVersion = lib.versions.major localSystem.darwinSdkVersion; commonImpureHostDeps = [ "/bin/sh" From 98d5c93e0afc2f03a768b7ff638e594b48a8f191 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:07:05 +0100 Subject: [PATCH 10/35] llvmPackages.compiler-rt: remove code for macOS < 11 --- .../llvm/common/compiler-rt/default.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 9ec3a2ddcbd6..b6b2d6d39755 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -8,7 +8,6 @@ , monorepoSrc ? null , runCommand , apple-sdk -, apple-sdk_10_13 , cmake , ninja , python3 @@ -47,14 +46,6 @@ let baseName = "compiler-rt"; pname = baseName + lib.optionalString (haveLibc) "-libc"; - # Sanitizers require 10.13 or newer. Instead of disabling them for most x86_64-darwin users, - # build them with a newer SDK and the default (10.12) deployment target. - apple-sdk' = - if lib.versionOlder (lib.getVersion apple-sdk) "10.13" then - apple-sdk_10_13.override { enableBootstrap = true; } - else - apple-sdk.override { enableBootstrap = true; }; - src' = if monorepoSrc != null then runCommand "${baseName}-src-${version}" {} ('' mkdir -p "$out" @@ -80,10 +71,7 @@ stdenv.mkDerivation ({ ++ [ python3 libllvm.dev ]; buildInputs = lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders - ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include - # Adding the bootstrap SDK to `buildInputs` on static builds propagates it, breaking `xcrun`. - # This can be removed once the minimum SDK >10.12 on x86_64-darwin. - ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isStatic) [ apple-sdk' ]; + ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include; env = { NIX_CFLAGS_COMPILE = toString ([ @@ -148,7 +136,7 @@ stdenv.mkDerivation ({ # Darwin support, so force it to be enabled during the first stage of the compiler-rt bootstrap. "-DCOMPILER_RT_HAS_G_FLAG=ON" ] ++ [ - "-DDARWIN_macosx_CACHED_SYSROOT=${apple-sdk'.sdkroot}" + "-DDARWIN_macosx_CACHED_SYSROOT=${apple-sdk.sdkroot}" "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=${lib.versions.majorMinor (lib.getVersion apple-sdk)}" "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}" "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}" From 4963ea1eaa2c25a56c05095eeaad245e1ca6e341 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:45:28 +0100 Subject: [PATCH 11/35] llvmPackages.lldb: remove code for macOS < 11 --- .../lldb/cpu_subtype_arm64e_replacement.patch | 12 ---------- .../compilers/llvm/common/default.nix | 24 +------------------ .../compilers/llvm/common/lldb.nix | 10 -------- 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch diff --git a/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch b/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch deleted file mode 100644 index 20d35c9f3ea9..000000000000 --- a/pkgs/development/compilers/llvm/13/lldb/cpu_subtype_arm64e_replacement.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/source/Host/macosx/objcxx/HostInfoMacOSX.mm ---- a/source/Host/macosx/objcxx/HostInfoMacOSX.mm -+++ b/source/Host/macosx/objcxx/HostInfoMacOSX.mm -@@ -233,7 +233,7 @@ void HostInfoMacOSX::ComputeHostArchitectureSupport(ArchSpec &arch_32, - len = sizeof(is_64_bit_capable); - ::sysctlbyname("hw.cpu64bit_capable", &is_64_bit_capable, &len, NULL, 0); - -- if (cputype == CPU_TYPE_ARM64 && cpusubtype == CPU_SUBTYPE_ARM64E) { -+ if (cputype == CPU_TYPE_ARM64 && cpusubtype == ((cpu_subtype_t) 2)) { // CPU_SUBTYPE_ARM64E is not available in the macOS 10.12 headers - // The arm64e architecture is a preview. Pretend the host architecture - // is arm64. - cpusubtype = CPU_SUBTYPE_ARM64_ALL; diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 7f7aa868d14c..e7d3a20e1f3f 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -264,12 +264,6 @@ let path = ../12; } ]; - "lldb/cpu_subtype_arm64e_replacement.patch" = [ - { - after = "13"; - path = ../13; - } - ]; "lldb/resource-dir.patch" = [ { before = "16"; @@ -697,23 +691,7 @@ let ++ lib.optional (lib.versionOlder metadata.release_version "14") ( metadata.getVersionFile "lldb/gnu-install-dirs.patch" ) - ++ lib.optional (lib.versionAtLeast metadata.release_version "14") ./lldb/gnu-install-dirs.patch - # This is a stopgap solution if/until the macOS SDK used for x86_64 is - # updated. - # - # The older 10.12 SDK used on x86_64 as of this writing has a `mach/machine.h` - # header that does not define `CPU_SUBTYPE_ARM64E` so we replace the one use - # of this preprocessor symbol in `lldb` with its expansion. - # - # See here for some context: - # https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132 - # - # Patch is applied for >= 14 as the versions below are broken anyways. - ++ lib.optional ( - lib.versionAtLeast metadata.release_version "14" - && stdenv.targetPlatform.isDarwin - && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0" - ) (metadata.getVersionFile "lldb/cpu_subtype_arm64e_replacement.patch"); + ++ lib.optional (lib.versionAtLeast metadata.release_version "14") ./lldb/gnu-install-dirs.patch; } // lib.optionalAttrs (lib.versions.major metadata.release_version == "16") { src = callPackage ( diff --git a/pkgs/development/compilers/llvm/common/lldb.nix b/pkgs/development/compilers/llvm/common/lldb.nix index 1e2233790738..3fc17e9143ad 100644 --- a/pkgs/development/compilers/llvm/common/lldb.nix +++ b/pkgs/development/compilers/llvm/common/lldb.nix @@ -24,8 +24,6 @@ , patches ? [ ] , enableManpages ? false , devExtraCmakeFlags ? [ ] -, apple-sdk_11 -, darwinMinVersionHook , ... }: @@ -93,14 +91,6 @@ stdenv.mkDerivation (rec { (lib.getLib libclang) ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.bootstrap_cmds - ] - ++ lib.optionals - ( - stdenv.targetPlatform.isDarwin - && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "11.0" - ) [ - apple-sdk_11 - (darwinMinVersionHook "10.15") ]; hardeningDisable = [ "format" ]; From b600d09aa151b20c481ce58d38e5109172009733 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:45:28 +0100 Subject: [PATCH 12/35] llvmPackages.libcxx: remove code for macOS < 11 --- .../0001-darwin-10.12-mbstate_t-fix.patch | 31 ------- .../compilers/llvm/common/default.nix | 85 ++++++------------- 2 files changed, 27 insertions(+), 89 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/18/libcxx/0001-darwin-10.12-mbstate_t-fix.patch diff --git a/pkgs/development/compilers/llvm/18/libcxx/0001-darwin-10.12-mbstate_t-fix.patch b/pkgs/development/compilers/llvm/18/libcxx/0001-darwin-10.12-mbstate_t-fix.patch deleted file mode 100644 index 29942f8ed03d..000000000000 --- a/pkgs/development/compilers/llvm/18/libcxx/0001-darwin-10.12-mbstate_t-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9c1cb26c1dd3f92d1c1177e548107d2cd3c5e616 Mon Sep 17 00:00:00 2001 -From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> -Date: Fri, 23 Feb 2024 22:58:58 +0000 -Subject: [PATCH] darwin 10.12 mbstate_t fix - -https://github.com/llvm/llvm-project/issues/64226 - -removes space from -https://github.com/macports/macports-ports/raw/acd8acb171f1658596ed1cf25da48d5b932e2d19/lang/llvm-17/files/0042-mbstate_t-not-defined.patch -so it applies cleanly ---- - libcxx/include/__mbstate_t.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libcxx/include/__mbstate_t.h b/libcxx/include/__mbstate_t.h -index bfa6d61..5f51112 100644 ---- a/libcxx/include/__mbstate_t.h -+++ b/libcxx/include/__mbstate_t.h -@@ -42,6 +42,9 @@ - #elif __has_include() - # include // works on most Unixes - #elif __has_include() -+# if __has_include() -+# include -+# endif - # include // works on Darwin - #elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next() - # include_next // fall back to the C standard provider of mbstate_t --- -2.43.0 - diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index e7d3a20e1f3f..33e4d3c998dd 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -167,12 +167,6 @@ let path = ../15; } ]; - "libcxx/0001-darwin-10.12-mbstate_t-fix.patch" = [ - { - after = "18"; - path = ../18; - } - ]; "libunwind/gnu-install-dirs.patch" = [ { before = "17"; @@ -1083,62 +1077,37 @@ let libcxx = callPackage ./libcxx ( { - patches = - lib.optionals (lib.versionOlder metadata.release_version "16") ( - lib.optional (lib.versions.major metadata.release_version == "15") - # See: - # - https://reviews.llvm.org/D133566 - # - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432 - # !!! Drop in LLVM 16+ - ( - fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch"; - hash = "sha256-B07vHmSjy5BhhkGSj3e1E0XmMv5/9+mvC/k70Z29VwY="; - } - ) - ++ [ - (substitute { - src = ./libcxxabi/wasm.patch; - substitutions = [ - "--replace-fail" - "/cmake/" - "/llvm/cmake/" - ]; - }) - ] - ++ lib.optional stdenv.hostPlatform.isMusl (substitute { - src = ./libcxx/libcxx-0001-musl-hacks.patch; + patches = lib.optionals (lib.versionOlder metadata.release_version "16") ( + lib.optional (lib.versions.major metadata.release_version == "15") + # See: + # - https://reviews.llvm.org/D133566 + # - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432 + # !!! Drop in LLVM 16+ + ( + fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch"; + hash = "sha256-B07vHmSjy5BhhkGSj3e1E0XmMv5/9+mvC/k70Z29VwY="; + } + ) + ++ [ + (substitute { + src = ./libcxxabi/wasm.patch; substitutions = [ "--replace-fail" - "/include/" - "/libcxx/include/" + "/cmake/" + "/llvm/cmake/" ]; }) - ) - ++ - lib.optional - ( - lib.versions.major metadata.release_version == "17" - && stdenv.hostPlatform.isDarwin - && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" - ) - # https://github.com/llvm/llvm-project/issues/64226 - ( - fetchpatch { - name = "0042-mbstate_t-not-defined.patch"; - url = "https://github.com/macports/macports-ports/raw/acd8acb171f1658596ed1cf25da48d5b932e2d19/lang/llvm-17/files/0042-mbstate_t-not-defined.patch"; - hash = "sha256-jo+DYA6zuSv9OH3A0bYwY5TlkWprup4OKQ7rfK1WHBI="; - } - ) - ++ - lib.optional - ( - lib.versionAtLeast metadata.release_version "18" - && stdenv.hostPlatform.isDarwin - && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" - ) - # https://github.com/llvm/llvm-project/issues/64226 - (metadata.getVersionFile "libcxx/0001-darwin-10.12-mbstate_t-fix.patch"); + ] + ++ lib.optional stdenv.hostPlatform.isMusl (substitute { + src = ./libcxx/libcxx-0001-musl-hacks.patch; + substitutions = [ + "--replace-fail" + "/include/" + "/libcxx/include/" + ]; + }) + ); stdenv = if stdenv.hostPlatform.isDarwin then overrideCC darwin.bootstrapStdenv buildLlvmTools.clangWithLibcAndBasicRt From e38106815e4e8177b196ddffe2f6dc639c446ea4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 21:58:41 +0100 Subject: [PATCH 13/35] ld64: remove code for macOS < 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to make `-DPRIVATE` unconditional, as it’s required for a XNU header definition that is only used on `x86_64-darwin`, but was coincidentally getting set by a now‐obsolete compatibility shim. --- pkgs/by-name/ld/ld64/meson.build | 47 ++++---------------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/pkgs/by-name/ld/ld64/meson.build b/pkgs/by-name/ld/ld64/meson.build index 84468e6f9938..c9068b75d026 100644 --- a/pkgs/by-name/ld/ld64/meson.build +++ b/pkgs/by-name/ld/ld64/meson.build @@ -25,48 +25,6 @@ openssl = dependency('openssl', version : '>=3.0') xar = cc.find_library('xar') -# Feature tests - -# macOS 10.12 does not support `DISPATCH_APPLY_AUTO`. Fortunately, `DISPATCH_APPLY_CURRENT_ROOT_QUEUE` has the -# same value and was repurposed in subsequent releases as `DISPATCH_APPLY_AUTO`. -dispatch_apply_auto_test = ''' -#include -int main(int argc, char* argv[]) { - dispatch_queue_t queue = DISPATCH_APPLY_AUTO; - return 0; -} -''' -if not cc.compiles( - dispatch_apply_auto_test, - args : '-Wno-unused-command-line-argument', - name : 'supports DISPATCH_APPLY_AUTO', -) - add_project_arguments( - '-include', 'dispatch/private.h', - '-DDISPATCH_APPLY_AUTO=DISPATCH_APPLY_CURRENT_ROOT_QUEUE', - '-DPRIVATE', # The required API is private on the 10.12 SDK. - language: ['c', 'cpp'], - ) -endif - -# The return type of `dispatch_get_global_queue` was changed in 10.14. -# Use the older type if the SDK does not support it. -dispatch_queue_global_test = ''' -#include -int main(int argc, char* argv[]) { - dispatch_queue_global_t queue = dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0); - return 0; -} -''' -if not cc.compiles( - dispatch_queue_global_test, - args : '-Wno-unused-command-line-argument', - name : 'supports dispatch_queue_global_t', -) - add_project_arguments('-Ddispatch_queue_global_t=dispatch_queue_t', language : ['c', 'cpp']) -endif - - # Generated files compile_stubs_h = custom_target( @@ -143,6 +101,11 @@ ld64 = executable( dependencies : [libtapi, openssl, xar], include_directories : incdirs, install : true, + cpp_args : [ + # Required for `_COMM_PAGE_CPU_CAPABILITIES64` in + # on `x86_64-darwin` + '-DPRIVATE', + ], # These linker flags mirror those used in a release build of the Xcode project. # See: https://github.com/apple-oss-distributions/ld64/blob/47f477cb721755419018f7530038b272e9d0cdea/ld64.xcodeproj/project.pbxproj#L1292-L1299. link_args : [ From fa10b9c7f8ab7fba2f285fac32de362fb6924533 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 26 Oct 2024 22:40:52 +0100 Subject: [PATCH 14/35] ld64: use the SDK source release packages --- pkgs/by-name/ld/ld64/package.nix | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index ce63bfad5e0d..074e92daa725 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -5,6 +5,7 @@ fetchFromGitHub, fetchurl, apple-sdk, + apple-sdk_14, cctools, darwin, libtapi, @@ -32,23 +33,11 @@ let hash = "sha256-0ybVcwHuGEdThv0PPjYQc3SW0YVOyrM3/L9zG/l1Vtk="; }; - dyld = fetchFromGitHub { - owner = "apple-oss-distributions"; - repo = "dyld"; - rev = "dyld-1162"; - hash = "sha256-uyFg8QnnP6NWv5lAOTCiFZ0SnFOA/aO/kpjkyvILVsk="; - }; + dyld = apple-sdk_14.sourceRelease "dyld"; libdispatchPrivate = apple-sdk.sourceRelease "libdispatch"; - # First version with all the required definitions. This is used in preference to darwin.xnu to make it easier - # to support Linux and because the version of darwin.xnu available on x86_64-darwin in the 10.12 SDK is too old. - xnu = fetchFromGitHub { - owner = "apple-oss-distributions"; - repo = "xnu"; - rev = "xnu-6153.11.26"; - hash = "sha256-dcnGcp7bIjQxeAn5pXt+mHSYEXb2Ad9Smhd/WUG4kb4="; - }; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "ld64-deps-private-headers"; @@ -167,15 +156,12 @@ stdenv.mkDerivation (finalAttrs: { python3 ]; - buildInputs = - [ - libtapi - llvm - openssl - xar - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.dyld ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ libdispatch ]; + buildInputs = [ + libtapi + llvm + openssl + xar + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libdispatch ]; # Note for overrides: ld64 cannot be built as a debug build because of UB in its iteration implementations, # which trigger libc++ debug assertions due to trying to take the address of the first element of an emtpy vector. From af82e115592a7290bdbf8c9fbfed3fa783f384d0 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 20:07:39 +0100 Subject: [PATCH 15/35] cctools: remove code for macOS < 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As with ld64, flags added as part of macOS 10.12 compatibility shims (in this case `-undefined dynamic_lookup`) were inadvertently fixing the build. The Xcode project links `otool-classic` and `strip` against `libc++`; why it was previously working on AArch64 without linking against it or passing `-undefined dynamic_lookup`, I can’t fathom. --- ...sat-compatability-with-the-10.12-SDK.patch | 50 ------------------- pkgs/by-name/cc/cctools/meson.build | 20 ++------ pkgs/by-name/cc/cctools/package.nix | 9 +--- 3 files changed, 4 insertions(+), 75 deletions(-) delete mode 100644 pkgs/by-name/cc/cctools/0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch diff --git a/pkgs/by-name/cc/cctools/0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch b/pkgs/by-name/cc/cctools/0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch deleted file mode 100644 index 4abe9ee863aa..000000000000 --- a/pkgs/by-name/cc/cctools/0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 989ba5e30cefa0dd8990da158661713c4a21c0fe Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Thu, 11 Apr 2024 18:05:34 -0400 -Subject: [PATCH 3/6] Fix utimensat compatability with the 10.12 SDK - ---- - include/compat.h | 3 +++ - libstuff/writeout.c | 2 +- - misc/lipo.c | 2 +- - 3 files changed, 5 insertions(+), 2 deletions(-) - create mode 100644 include/compat.h - -diff --git a/include/compat.h b/include/compat.h -new file mode 100644 -index 0000000..8b1b866 ---- /dev/null -+++ b/include/compat.h -@@ -0,0 +1,3 @@ -+#pragma once -+#include -+extern int utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); -diff --git a/libstuff/writeout.c b/libstuff/writeout.c -index f904caa..03fa535 100644 ---- a/libstuff/writeout.c -+++ b/libstuff/writeout.c -@@ -297,7 +297,7 @@ no_throttle: - * have been zeroed out when the library was created. writeout - * will not zero out the modification time in the filesystem. - */ -- if (__builtin_available(macOS 10.12, *)) { -+ if (__builtin_available(macOS 10.13, *)) { - struct timespec times[2] = {0}; - memcpy(×[0], &toc_timespec, sizeof(struct timespec)); - memcpy(×[1], &toc_timespec, sizeof(struct timespec)); -diff --git a/misc/lipo.c b/misc/lipo.c -index 04a3eca..887c049 100644 ---- a/misc/lipo.c -+++ b/misc/lipo.c -@@ -607,7 +607,7 @@ unknown_flag: - if(close(fd) == -1) - system_fatal("can't close output file: %s",output_file); - #ifndef __OPENSTEP__ -- if (__builtin_available(macOS 10.12, *)) { -+ if (__builtin_available(macOS 10.13, *)) { - time_result = utimensat(AT_FDCWD, output_file, - output_times, 0); - } --- -2.45.2 - diff --git a/pkgs/by-name/cc/cctools/meson.build b/pkgs/by-name/cc/cctools/meson.build index c2261d98c958..bfb4f06285d7 100644 --- a/pkgs/by-name/cc/cctools/meson.build +++ b/pkgs/by-name/cc/cctools/meson.build @@ -28,26 +28,11 @@ target_prefix = get_option('target_prefix') # Dependencies cc = meson.get_compiler('c') +libcxx = cc.find_library('c++') libcodedirectory = cc.find_library('codedirectory') libprunetrie = cc.find_library('prunetrie') -# Feature tests -# Add compatibility header for Darwin SDKs that don’t define `utimensat`. -utimensat_test = ''' -#include -#include -int main(int argc, char* argv[]) { - utimensat(AT_FDCWD, NULL, NULL, 0); - return 0; -} -''' -if host_machine.system() == 'darwin' and not cc.compiles(utimensat_test, name : 'supports utimensat') - add_project_arguments('-include', 'compat.h', language : 'c') - add_project_link_arguments('-undefined', 'dynamic_lookup', language : 'c') -endif - - incdirs = include_directories('include') # Static libraries @@ -454,6 +439,7 @@ install_man('man/nmedit.1') otool = executable( f'@target_prefix@otool', c_args : ['-DEFI_SUPPORT'], + dependencies : [libcxx], include_directories : incdirs, install : true, link_with : [libstuff], @@ -553,7 +539,7 @@ install_man('man/strings.1') strip = executable( f'@target_prefix@strip', c_args : ['-DTRIE_SUPPORT'], - dependencies : [libcodedirectory, libprunetrie], + dependencies : [libcxx, libcodedirectory, libprunetrie], include_directories : incdirs, install : true, link_with : [libstuff], diff --git a/pkgs/by-name/cc/cctools/package.nix b/pkgs/by-name/cc/cctools/package.nix index 0368a3c4a985..be2e3898cf75 100644 --- a/pkgs/by-name/cc/cctools/package.nix +++ b/pkgs/by-name/cc/cctools/package.nix @@ -5,7 +5,6 @@ buildPackages, ld64, llvm, - memstreamHook, meson, ninja, openssl, @@ -73,9 +72,6 @@ stdenv.mkDerivation (finalAttrs: { ./0001-Fix-build-issues-with-misc-redo_prebinding.c.patch # Use libcd_is_blob_a_linker_signature as defined in the libcodedirectory.h header ./0002-Rely-on-libcd_is_blob_a_linker_signature.patch - # cctools uses availability checks for `utimensat`, but it checks the wrong version. - # Also, provide a definition to avoid implicit function definition errors. - ./0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch # Use the nixpkgs clang’s path as the prefix. ./0004-Use-nixpkgs-clang-with-the-assembler-driver.patch # Make sure cctools can find ld64 in the store @@ -102,9 +98,6 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace misc/libtool.c \ --subst-var-by targetPrefix '${targetPrefix}' - # The version of this file distributed with cctools defines several CPU types missing from the 10.12 SDK. - ln -s machine-cctools.h include/mach/machine.h - # Use libxar from nixpkgs for cctool_src in misc/nm.c otool/print_bitcode.c; do substituteInPlace $cctool_src \ @@ -130,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ ld64 llvm - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; + ]; mesonBuildType = "release"; From 937529bb5178df7221fc4cabcb5faee558bae31e Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 21:50:14 +0100 Subject: [PATCH 16/35] gcc: remove code for macOS < 11 --- .../compilers/gcc/common/pre-configure.nix | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index 9e1764eae916..6e22a59d5792 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -32,42 +32,6 @@ lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export GFORTRAN_FOR_TARGET=${pkgsBuildTarget.gfortran}/bin/${stdenv.targetPlatform.config}-gfortran '' -# NOTE 2020/3/18: This environment variable prevents configure scripts from -# detecting the presence of aligned_alloc on Darwin. There are many facts that -# collectively make this fix necessary: -# - Nix uses a fixed set of standard library headers on all MacOS systems, -# regardless of their actual version. (Nix uses version 10.12 headers.) -# - Nix uses the native standard library binaries for the build system. That -# means the standard library binaries may not exactly match the standard -# library headers. -# - The aligned_alloc procedure is present in MacOS 10.15 (Catalina), but not -# in earlier versions. Therefore on Catalina systems, aligned_alloc is -# linkable (i.e. present in the binary libraries) but not present in the -# headers. -# - Configure scripts detect a procedure's existence by checking whether it is -# linkable. They do not check whether it is present in the headers. -# - GCC throws an error during compilation because aligned_alloc is not -# defined in the headers---even though the linker can see it. -# -# This fix would not be necessary if ANY of the above were false: -# - If Nix used native headers for each different MacOS version, aligned_alloc -# would be in the headers on Catalina. -# - If Nix used the same library binaries for each MacOS version, aligned_alloc -# would not be in the library binaries. -# - If Catalina did not include aligned_alloc, this wouldn't be a problem. -# - If the configure scripts looked for header presence as well as -# linkability, they would see that aligned_alloc is missing. -# - If GCC allowed implicit declaration of symbols, it would not fail during -# compilation even if the configure scripts did not check header presence. -# -+ lib.optionalString (buildPlatform.isDarwin) '' - export build_configargs=ac_cv_func_aligned_alloc=no -'' + lib.optionalString (hostPlatform.isDarwin) '' - export host_configargs=ac_cv_func_aligned_alloc=no -'' + lib.optionalString (targetPlatform.isDarwin) '' - export target_configargs=ac_cv_func_aligned_alloc=no -'' - # In order to properly install libgccjit on macOS Catalina, strip(1) # upon installation must not remove external symbols, otherwise the # install step errors with "symbols referenced by indirect symbol From 63a7b4f14364ba09933c38af0ec462e87d8482fa Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:22:18 +0100 Subject: [PATCH 17/35] python3: remove code for macOS < 11 --- pkgs/development/interpreters/python/cpython/default.nix | 4 ---- pkgs/stdenv/darwin/default.nix | 2 -- 2 files changed, 6 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 20c7c0c145ef..61bf21b99e2d 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -25,7 +25,6 @@ # platform-specific dependencies , bash -, apple-sdk_11 , darwin , windows @@ -178,9 +177,6 @@ let bluez ] ++ optionals enableFramework [ darwin.apple_sdk.frameworks.Cocoa - ] ++ optionals stdenv.hostPlatform.isDarwin [ - # Work around for ld64 crashes on x86_64-darwin. Remove once 11.0 becomes the default. - apple-sdk_11 ] ++ optionals stdenv.hostPlatform.isMinGW [ windows.dlfcn windows.mingw_w64_pthreads diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index ab8eae632978..63050dd3f423 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -669,8 +669,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check self = self.python3-bootstrap; pythonAttr = "python3-bootstrap"; enableLTO = false; - # Workaround for ld64 crashes on x86_64-darwin. Remove after 11.0 is made the default. - inherit (prevStage) apple-sdk_11; }; scons = super.scons.override { python3Packages = self.python3.pkgs; }; From b937adc202be021c546a7095d77a9eb9eb0f5dd4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 18/35] darwin.IOKitTools: remove code for macOS < 11 --- .../apple-source-releases/IOKitTools/package.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/IOKitTools/package.nix b/pkgs/os-specific/darwin/apple-source-releases/IOKitTools/package.nix index 21426257fe35..7d3077b10e4e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/IOKitTools/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/IOKitTools/package.nix @@ -1,7 +1,6 @@ { lib, - apple-sdk_11, - darwinMinVersionHook, + apple-sdk, mkAppleDerivation, ncurses, pkg-config, @@ -9,8 +8,8 @@ }: let - iokitUser = apple-sdk_11.sourceRelease "IOKitUser"; - xnu = apple-sdk_11.sourceRelease "xnu"; + iokitUser = apple-sdk.sourceRelease "IOKitUser"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "IOKitTools-deps-private-headers"; @@ -52,9 +51,7 @@ mkAppleDerivation { nativeBuildInputs = [ pkg-config ]; buildInputs = [ - apple-sdk_11 - apple-sdk_11.privateFrameworksHook - (darwinMinVersionHook "11.0") + apple-sdk.privateFrameworksHook ncurses ]; From 7b3dd230da3f734ec334bb3c638f766e86ce44cc Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 19/35] darwin.adv_cmds: remove code for macOS < 11 --- .../adv_cmds/meson.build.in | 9 +---- .../adv_cmds/meson.options | 1 - .../adv_cmds/package.nix | 20 ++-------- ...ck-to-task_read_pid-on-older-systems.patch | 38 ------------------- pkgs/stdenv/darwin/default.nix | 6 --- 5 files changed, 5 insertions(+), 69 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.options delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/adv_cmds/patches/0001-Fall-back-to-task_read_pid-on-older-systems.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.build.in index 69b7d270f17b..66fa5116bf0d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.build.in @@ -4,8 +4,6 @@ # Project settings project('adv_cmds', 'c', 'cpp', version : '@version@') -sdk_version = get_option('sdk_version') - # Dependencies cc = meson.get_compiler('c') @@ -190,8 +188,7 @@ install_man('ps/ps.1') executable( 'stty', - build_by_default : sdk_version.version_compare('>=11.3'), - install : sdk_version.version_compare('>=11.3'), + install : true, sources : [ 'stty/cchar.c', 'stty/gfmt.c', @@ -202,9 +199,7 @@ executable( 'stty/util.c', ], ) -if sdk_version.version_compare('>=11.3') - install_man('stty/stty.1') -endif +install_man('stty/stty.1') executable( 'tabs', diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.options b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.options deleted file mode 100644 index 8c4ce874c64c..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/meson.options +++ /dev/null @@ -1 +0,0 @@ -option('sdk_version', type : 'string') diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/package.nix index 646351716678..f994ab88d029 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/package.nix @@ -1,7 +1,6 @@ { lib, apple-sdk, - apple-sdk_11, bison, flex, libxo, @@ -12,9 +11,9 @@ }: let - Libc = apple-sdk_11.sourceRelease "Libc"; - libplatform = apple-sdk_11.sourceRelease "libplatform"; - xnu = apple-sdk_11.sourceRelease "xnu"; + Libc = apple-sdk.sourceRelease "Libc"; + libplatform = apple-sdk.sourceRelease "libplatform"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "adv_cmds-deps-private-headers"; @@ -41,11 +40,6 @@ mkAppleDerivation { xcodeHash = "sha256-2p/JyMPw6acHphvzkaJXPXGwxCUEoxryCejww5kPHvQ="; - patches = [ - # Use older API when running on systems prior to 11.3. - ./patches/0001-Fall-back-to-task_read_pid-on-older-systems.patch - ]; - postPatch = '' # Meson generators require using @BASENAME@ in the output. substituteInPlace mklocale/lex.l \ @@ -67,8 +61,6 @@ mkAppleDerivation { env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include"; buildInputs = [ - # Use the 11.3 SDK because CMake depends on adv_cmds.ps, so it can’t simply be omitted when using an older SDK. - apple-sdk_11 libxo ncurses ]; @@ -79,12 +71,6 @@ mkAppleDerivation { pkg-config ]; - mesonFlags = [ - # Even though adv_cmds is built with a newer SDK, the default SDK is still the deployment target. - # Don’t build packages that use newer APIs unnecessarily. - (lib.mesonOption "sdk_version" (lib.getVersion apple-sdk)) - ]; - postInstall = '' moveToOutput bin/ps "$ps" ln -s "$ps/bin/ps" "$out/bin/ps" diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/patches/0001-Fall-back-to-task_read_pid-on-older-systems.patch b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/patches/0001-Fall-back-to-task_read_pid-on-older-systems.patch deleted file mode 100644 index 8e5f344f6490..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/patches/0001-Fall-back-to-task_read_pid-on-older-systems.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c05a83d29349c6ae2fd8084a48ea51c8e8bf23f2 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Sun, 18 Aug 2024 10:29:16 -0400 -Subject: [PATCH] Fall back to `task_read_pid` on older systems - ---- - ps/tasks.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/ps/tasks.c b/ps/tasks.c -index d2fcb07..068c985 100644 ---- a/ps/tasks.c -+++ b/ps/tasks.c -@@ -25,8 +25,6 @@ - #include - #include - --extern kern_return_t task_read_for_pid(task_port_t task, pid_t pid, task_port_t *target); -- - #define STATE_MAX 7 - - int -@@ -98,7 +96,11 @@ int get_task_info (KINFO *ki) - ki->state = STATE_MAX; - - pid = KI_PROC(ki)->p_pid; -- error = task_read_for_pid(mach_task_self(), pid, &ki->task); -+ if (__builtin_available(macos 11.3, *)) { -+ error = task_read_for_pid(mach_task_self(), pid, &ki->task); -+ } else { -+ error = task_for_pid(mach_task_self(), pid, &ki->task); -+ } - if (error != KERN_SUCCESS) { - #ifdef DEBUG - mach_error("Error calling task_read_for_pid()", error); --- -2.44.1 - diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 63050dd3f423..46157f4385d3 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -681,12 +681,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check postLinkSignHook = prevStage.darwin.postLinkSignHook.override { inherit (selfDarwin) sigtool; }; - adv_cmds = superDarwin.adv_cmds.override { - # Break an infinite recursion between CMake and libtapi. CMake requires adv_cmds.ps, and adv_cmds - # requires a newer SDK that requires libtapi to build, which requires CMake. - inherit (prevStage) apple-sdk_11; - }; - # Rewrap binutils with the real libSystem binutils = superDarwin.binutils.override { inherit (self) coreutils; From c579058789780f869e7377916a8688ceace8f2a2 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 20/35] darwin.copyfile: remove code for macOS < 11 --- .../darwin/apple-source-releases/copyfile/package.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix b/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix index 3382128b0e91..1edde5a1d8c6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/copyfile/package.nix @@ -1,16 +1,12 @@ { lib, apple-sdk, - apple-sdk_10_13, - apple-sdk_11, mkAppleDerivation, stdenvNoCC, }: let - # The 10.12 SDK doesn’t have the files needed in the same places or possibly at all. - # Just use the 11.x SDK to make things easier. - xnu = apple-sdk_11.sourceRelease "xnu"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "copyfile-deps-private-headers"; @@ -90,9 +86,5 @@ mkAppleDerivation { env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include"; - buildInputs = lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "10.13") [ - (apple-sdk_10_13.override { enableBootstrap = true; }) - ]; - meta.description = "Darwin file copying library"; } From 7dca57603c6ab0d706c38a5392a5306825b1c84b Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 21/35] darwin.diskdev_cmds: remove code for macOS < 11 --- .../diskdev_cmds/meson.build.in | 1 - .../apple-source-releases/diskdev_cmds/package.nix | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/meson.build.in index 719f602ec60d..00270488507a 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/meson.build.in @@ -110,7 +110,6 @@ executable( '-DMNT_STRICTATIME=0x80000000', # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/attr.h#L300 '-DVOL_CAP_FMT_SEALED=0x02000000', - '-D_DARWIN_USE_64_BIT_INODE=1', # Needed with older SDKs to ensure 64-bit `struct statfs`. ], dependencies : [ apfs, libdisk ], include_directories : [ 'edt_fstab', 'fsck.tproj', 'mount_flags_dir' ], diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/package.nix index 9487eb189c85..edc71e50e868 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/package.nix @@ -1,7 +1,6 @@ { lib, apple-sdk, - apple-sdk_11, libutil, mkAppleDerivation, removefile, @@ -9,8 +8,8 @@ }: let - Libc = apple-sdk_11.sourceRelease "Libc"; - xnu = apple-sdk_11.sourceRelease "xnu"; + Libc = apple-sdk.sourceRelease "Libc"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "diskdev_cmds-deps-private-headers"; @@ -55,13 +54,6 @@ mkAppleDerivation { '' substituteInPlace mount.tproj/mount.c \ --replace-fail 'sysctlbyname ("vfs.generic.apfs.rosp", &is_rosp, &rospsize, NULL, NULL);' 'sysctlbyname ("vfs.generic.apfs.rosp", &is_rosp, &rospsize, NULL, 0);' - '' - # The first reserved uint32 is used for the extended flags on 11.0 and newer, and - # only use sysexit_np when the version is 10.14 or newer. - + lib.optionalString (lib.versionOlder (lib.getVersion apple-sdk) "11.0") '' - substituteInPlace mount.tproj/mount.c \ - --replace-fail 'sfp->f_flags_ext' 'sfp->f_reserved[0]' \ - --replace-fail 'sysexit == -1' '__builtin_available(macOS 10.14, *) && sysexit == -1' ''; env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include"; From ab0a6abbf9b66573f1c58104272662b7a4a448e0 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 22/35] darwin.file_cmds: remove code for macOS < 11 --- .../file_cmds/meson.build.in | 66 +--------- .../file_cmds/package.nix | 42 ++----- ...tions-of-missing-APIs-for-older-SDKs.patch | 113 ------------------ 3 files changed, 13 insertions(+), 208 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/file_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/meson.build.in index 170f9ac24243..7fc7ed7d901f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/meson.build.in @@ -13,7 +13,6 @@ cc = meson.get_compiler('c') core_foundation = dependency('appleframeworks', modules : 'CoreFoundation') -libbsd = dependency('libbsd-overlay', required : false) bzip2 = dependency('bzip2') xz = dependency('liblzma') libxo = dependency('libxo') @@ -24,34 +23,6 @@ removefile = cc.find_library('removefile') libutil = cc.find_library('util') -# Compatibility tests -utimensat_test = ''' -#include -#include -#include -int main(int argc, char* argv[]) { - return utimensat(AT_FDCWD, NULL, NULL, 0); -} -''' - -rpmatch_test = ''' -#include -int main(int argc, char* argv[]) { - return rpmatch("NO"); -} -''' - -has_utimensat = cc.compiles(utimensat_test, name : 'supports utimensat') -utimensat_c_args = has_utimensat ? [ ] : [ '-include', 'time_compat.h', '-I' + meson.source_root() + '/compat' ] -utimensat_sources = has_utimensat ? [ ] : [ 'compat/time_compat.c' ] - -has_rpmatch = cc.compiles(rpmatch_test, name : 'supports rpmatch') -rpmatch_c_args = has_rpmatch ? [ ] : [ '-include', 'rpmatch_compat.h', '-I' + meson.source_root() + '/compat' ] -rpmatch_sources = has_rpmatch ? [ ] : [ 'compat/rpmatch_compat.c' ] - -compat_link_args = not (has_utimensat and has_rpmatch) ? [ '-Wl,-undefined,dynamic_lookup' ] : [ ] - - # Binaries executable( 'chflags', @@ -107,14 +78,10 @@ install_man('cksum/sum.1') executable( 'compress', - c_args : [ utimensat_c_args, rpmatch_c_args ], install : true, - link_args : compat_link_args, sources: [ 'compress/compress.c', 'compress/zopen.c', - utimensat_sources, - rpmatch_sources, ] ) install_man('compress/compress.1') @@ -130,18 +97,11 @@ install_man('compress/zopen.3') executable( 'cp', - c_args : [ - utimensat_c_args, - rpmatch_c_args, - ], dependencies : [ copyfile ], install : true, - link_args : compat_link_args, sources: [ 'cp/cp.c', 'cp/utils.c', - utimensat_sources, - rpmatch_sources, ] ) install_man('cp/cp.1') @@ -213,13 +173,10 @@ install_symlink( executable( 'install-bin', # Meson reserves the name “install”, so use a different name and rename in install phase. - c_args : utimensat_c_args, dependencies : [ copyfile ], install : true, - link_args : compat_link_args, sources: [ 'install/xinstall.c', - utimensat_sources, ], ) install_man('install/install.1') @@ -260,7 +217,7 @@ executable( # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/stat.h#L520 '-DSF_DATALESS=0x40000000', ], - dependencies : [ libbsd, libutil ], + dependencies : [ libutil ], install : true, sources: [ 'ls/cmp.c', @@ -297,17 +254,6 @@ install_man('mknod/mknod.8') executable( 'mtree', - # Define these flags for the 10.12 SDK assuming that users on older systems can’t encounter dataless files. - c_args : [ - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/stat.h#L520 - '-DSF_DATALESS=0x40000000', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/resource.h#L598 - '-DIOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES=3', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/resource.h#L640 - '-DIOPOL_MATERIALIZE_DATALESS_FILES_OFF=1', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/attr.h#L562 - '-DATTR_CMNEXT_LINKID=0x00000010', - ], dependencies : [ core_foundation, removefile ], install : true, sources: [ @@ -328,14 +274,10 @@ install_man('mtree/mtree.8') executable( 'mv', - c_args : [ utimensat_c_args, rpmatch_c_args ], dependencies : [ copyfile ], install : true, - link_args : compat_link_args, sources: [ 'mv/mv.c', - utimensat_sources, - rpmatch_sources, ], ) install_man('mv/mv.1') @@ -375,13 +317,10 @@ install_man('pax/pax.1') executable( 'rm', - c_args : rpmatch_c_args, dependencies : [ removefile ], install : true, - link_args : compat_link_args, sources: [ 'rm/rm.c', - rpmatch_sources, ], ) install_man('rm/rm.1') @@ -424,12 +363,9 @@ install_man('stat/readlink.1') executable( 'touch', - c_args : utimensat_c_args, install : true, - link_args : compat_link_args, sources: [ 'touch/touch.c', - utimensat_sources, ], ) install_man('touch/touch.1') diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/package.nix index a4751bf0757a..93b578b1c008 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/package.nix @@ -1,11 +1,9 @@ { lib, apple-sdk, - apple-sdk_11, bzip2, copyfile, less, - libbsd, libutil, libxo, mkAppleDerivation, @@ -20,12 +18,9 @@ let Libc = apple-sdk.sourceRelease "Libc"; Libinfo = apple-sdk.sourceRelease "Libinfo"; - - # The 10.12 SDK doesn’t have the files needed in the same places or possibly at all. - # Just use the 11.0 SDK to make things easier. - CommonCrypto = apple-sdk_11.sourceRelease "CommonCrypto"; - libplatform = apple-sdk_11.sourceRelease "libplatform"; - xnu = apple-sdk_11.sourceRelease "xnu"; + CommonCrypto = apple-sdk.sourceRelease "CommonCrypto"; + libplatform = apple-sdk.sourceRelease "libplatform"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "file_cmds-deps-private-headers"; @@ -46,9 +41,6 @@ let install -D -t "$out/include/System/sys" \ '${xnu}/bsd/sys/fsctl.h' - # Needed by older private headers. - touch "$out/include/CrashReporterClient.h" - mkdir -p "$out/include/apfs" # APFS group is 'J' per https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/vfs/vfs_fsevents.c#L1054 cat < "$out/include/apfs/apfs_fsctl.h" @@ -64,11 +56,6 @@ let #define APFSIOC_XDSTREAM_OBJ_ID _IOWR('J', 53, struct xdstream_obj_id) EOF - # Prevent an error when using the old availability headers from the 10.12 SDK. - substituteInPlace "$out/include/CommonCrypto/CommonDigestSPI.h" \ - --replace-fail 'API_DEPRECATED(CC_DIGEST_DEPRECATION_WARNING, macos(10.4, 10.13), ios(5.0, 11.0))' "" \ - --replace-fail 'API_DEPRECATED(CC_DIGEST_DEPRECATION_WARNING, macos(10.4, 10.15), ios(5.0, 13.0))' "" - cat < "$out/include/sys/types.h" #pragma once #include @@ -108,26 +95,21 @@ mkAppleDerivation { ./patches/0001-Add-missing-extern-unix2003_compat-to-ls.patch # Add missing conditional to avoid using private APFS APIs that we lack headers for using. ./patches/0002-Add-missing-ifdef-for-private-APFS-APIs.patch - # Add implementations of missing functions for older SDKs - ./patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch ]; nativeBuildInputs = [ pkg-config ]; env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include"; - buildInputs = - [ - bzip2 - copyfile - libutil - libxo - removefile - xz - zlib - ] - # ls needs strtonum, which requires the 11.0 SDK. - ++ lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "11.0") [ libbsd ]; + buildInputs = [ + bzip2 + copyfile + libutil + libxo + removefile + xz + zlib + ]; postInstall = '' HOST_PATH='${lib.getBin shell_cmds}/bin' patchShebangs --host "$out/bin" diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch deleted file mode 100644 index d54ac1fbd295..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 9d21ed4cb6b56966a7962227a33c0e1986996cb1 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Sun, 8 Sep 2024 09:46:49 -0400 -Subject: [PATCH 3/3] Add implementations of missing APIs for older SDKs - ---- - compat/rpmatch_compat.c | 10 ++++++++++ - compat/rpmatch_compat.h | 6 ++++++ - compat/time_compat.c | 38 ++++++++++++++++++++++++++++++++++++++ - compat/time_compat.h | 16 ++++++++++++++++ - 4 files changed, 70 insertions(+) - create mode 100644 compat/rpmatch_compat.c - create mode 100644 compat/rpmatch_compat.h - create mode 100644 compat/time_compat.c - create mode 100644 compat/time_compat.h - -diff --git a/compat/rpmatch_compat.c b/compat/rpmatch_compat.c -new file mode 100644 -index 0000000..8eb99c3 ---- /dev/null -+++ b/compat/rpmatch_compat.c -@@ -0,0 +1,10 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#include "rpmatch_compat.h" -+ -+#include -+ -+int rpmatch(const char *response) { -+ return response != NULL && (response[0] == 'y' || response[0] == 'Y'); -+} -diff --git a/compat/rpmatch_compat.h b/compat/rpmatch_compat.h -new file mode 100644 -index 0000000..a13b64b ---- /dev/null -+++ b/compat/rpmatch_compat.h -@@ -0,0 +1,6 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#pragma once -+ -+extern int rpmatch(const char *response); -diff --git a/compat/time_compat.c b/compat/time_compat.c -new file mode 100644 -index 0000000..becf778 ---- /dev/null -+++ b/compat/time_compat.c -@@ -0,0 +1,38 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#include "time_compat.h" -+ -+#define futimens gzip_futimens -+#include "gzip/futimens.c" -+#undef futimens -+ -+#include -+#include -+ -+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 -+extern int utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); -+extern int futimens(int fd, const struct timespec times[_Nullable 2]); -+#endif -+ -+int compat_utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags) { -+ if (__builtin_available(macOS 10.13, *)) { -+ return utimensat(dirfd, pathname, times, flags); -+ } else { -+ int fd = openat(dirfd, pathname, flags); -+ if (fd == -1) { return -1; } -+ -+ int retval = compat_futimens(fd, times); -+ if (close(fd) == -1) { return -1; } -+ -+ return retval; -+ } -+} -+ -+int compat_futimens(int fd, const struct timespec times[_Nullable 2]) { -+ if (__builtin_available(macOS 10.13, *)) { -+ return futimens(fd, times); -+ } else { -+ return gzip_futimens(fd, times); -+ } -+} -diff --git a/compat/time_compat.h b/compat/time_compat.h -new file mode 100644 -index 0000000..f07a7ed ---- /dev/null -+++ b/compat/time_compat.h -@@ -0,0 +1,16 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#pragma once -+ -+#include -+ -+// https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/stat.h#L578-L579 -+#define UTIME_NOW -1 -+#define UTIME_OMIT -2 -+ -+#define utimensat compat_utimensat -+#define futimens compat_futimens -+ -+extern int compat_utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); -+extern int compat_futimens(int fd, const struct timespec times[_Nullable 2]); --- -2.46.0 - From 1b30d9b9f0eeacfda4e0984bf8603f78864867e6 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 23/35] darwin.libpcap: remove code for macOS < 11 --- .../darwin/apple-source-releases/libpcap/package.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/libpcap/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libpcap/package.nix index 223dc3858a94..0cc81e440070 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libpcap/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libpcap/package.nix @@ -1,6 +1,5 @@ { lib, - apple-sdk_11, apple-sdk_15, bison, bluez, @@ -110,8 +109,6 @@ mkAppleDerivation { flex ] ++ lib.optionals withBluez [ bluez.dev ]; - buildInputs = [ apple-sdk_11 ]; - meta = { description = "Packet Capture Library (with Apple modifications)"; mainProgram = "pcap-config"; From ba01760b21f9c9af04d3cd287c94992680ab8fce Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 24/35] darwin.libresolv: remove code for macOS < 11 --- .../apple-source-releases/libresolv/package.nix | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/libresolv/package.nix b/pkgs/os-specific/darwin/apple-source-releases/libresolv/package.nix index 8bfdeb6bfa27..285ee3b616e3 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libresolv/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libresolv/package.nix @@ -1,15 +1,15 @@ { lib, - apple-sdk_11, + apple-sdk, mkAppleDerivation, }: let - configd = apple-sdk_11.sourceRelease "configd"; - Libinfo = apple-sdk_11.sourceRelease "Libinfo"; + configd = apple-sdk.sourceRelease "configd"; + Libinfo = apple-sdk.sourceRelease "Libinfo"; # `arpa/nameser_compat.h` is included in the Libc source release instead of libresolv. - Libc = apple-sdk_11.sourceRelease "Libc"; + Libc = apple-sdk.sourceRelease "Libc"; in mkAppleDerivation { releaseName = "libresolv"; @@ -27,13 +27,6 @@ mkAppleDerivation { ln -s "$NIX_BUILD_TOP/$sourceRoot/nameser.h" "$sourceRoot/arpa/nameser.h" ''; - # Remove unsupported availability annotations to support SDK without updated availability headers. - postPatch = '' - substituteInPlace dns_util.h \ - --replace-fail 'API_DEPRECATED_BEGIN("dns_util is deprecated.", macos(10.0, 13.0), ios(1.0, 16.0), watchos(1.0, 9.0), tvos(1.0, 16.0))' "" \ - --replace-fail API_DEPRECATED_END "" - ''; - env.NIX_CFLAGS_COMPILE = "-I${configd}/dnsinfo -I${Libinfo}/lookup.subproj"; postInstall = '' From 5cf94b53c865ceaaf0c7a111c423cdce460fb6bd Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 25/35] darwin.mail_cmds: remove code for macOS < 11 --- .../mail_cmds/meson.build.in | 19 --- .../mail_cmds/package.nix | 9 -- ...tions-of-missing-APIs-for-older-SDKs.patch | 113 ------------------ 3 files changed, 141 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/mail_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/meson.build.in index cacd64bb7b55..b4f4f9556a1a 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/meson.build.in @@ -9,28 +9,10 @@ project('mail_cmds', 'c', version : '@version@') cc = meson.get_compiler('c') -# Compatibility tests -utimensat_test = ''' -#include -#include -#include -int main(int argc, char* argv[]) { - return utimensat(AT_FDCWD, NULL, NULL, 0); -} -''' - -has_utimensat = cc.compiles(utimensat_test, name : 'supports utimensat') -utimensat_c_args = has_utimensat ? [ ] : [ '-include', 'time_compat.h', '-I' + meson.source_root() + '/compat' ] -utimensat_sources = has_utimensat ? [ ] : [ 'compat/time_compat.c' ] - -compat_link_args = not has_utimensat ? [ '-Wl,-undefined,dynamic_lookup' ] : [ ] - # Binaries executable( 'mail', - c_args : utimensat_c_args, install : true, - link_args : compat_link_args, sources : [ 'mail/cmd1.c', 'mail/cmd2.c', @@ -55,7 +37,6 @@ executable( 'mail/v7.local.c', 'mail/vars.c', 'mail/version.c', - utimensat_sources, ], ) install_man('mail/mail.1') diff --git a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/package.nix index b4bbf77a21d9..b29e711251d6 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/package.nix @@ -16,14 +16,5 @@ mkAppleDerivation { xcodeHash = "sha256-6rBflDgQkqWDc8XPLgKIO703bMamg2QlhUnP71hBX3I="; - patches = [ - # Add implementations of missing functions for older SDKs - ./patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch - ]; - - postPatch = '' - cp '${file_cmds.src}/gzip/futimens.c' compat/futimens.c - ''; - meta.description = "Traditional mail command for Darwin"; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch b/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch deleted file mode 100644 index 7838aa2b7fe9..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/mail_cmds/patches/0003-Add-implementations-of-missing-APIs-for-older-SDKs.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 9d21ed4cb6b56966a7962227a33c0e1986996cb1 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Sun, 8 Sep 2024 09:46:49 -0400 -Subject: [PATCH 3/3] Add implementations of missing APIs for older SDKs - ---- - compat/rpmatch_compat.c | 10 ++++++++++ - compat/rpmatch_compat.h | 6 ++++++ - compat/time_compat.c | 38 ++++++++++++++++++++++++++++++++++++++ - compat/time_compat.h | 16 ++++++++++++++++ - 4 files changed, 70 insertions(+) - create mode 100644 compat/rpmatch_compat.c - create mode 100644 compat/rpmatch_compat.h - create mode 100644 compat/time_compat.c - create mode 100644 compat/time_compat.h - -diff --git a/compat/rpmatch_compat.c b/compat/rpmatch_compat.c -new file mode 100644 -index 0000000..8eb99c3 ---- /dev/null -+++ b/compat/rpmatch_compat.c -@@ -0,0 +1,10 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#include "rpmatch_compat.h" -+ -+#include -+ -+int rpmatch(const char *response) { -+ return response != NULL && (response[0] == 'y' || response[0] == 'Y'); -+} -diff --git a/compat/rpmatch_compat.h b/compat/rpmatch_compat.h -new file mode 100644 -index 0000000..a13b64b ---- /dev/null -+++ b/compat/rpmatch_compat.h -@@ -0,0 +1,6 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#pragma once -+ -+extern int rpmatch(const char *response); -diff --git a/compat/time_compat.c b/compat/time_compat.c -new file mode 100644 -index 0000000..becf778 ---- /dev/null -+++ b/compat/time_compat.c -@@ -0,0 +1,38 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#include "time_compat.h" -+ -+#define futimens gzip_futimens -+#include "compat/futimens.c" -+#undef futimens -+ -+#include -+#include -+ -+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300 -+extern int utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); -+extern int futimens(int fd, const struct timespec times[_Nullable 2]); -+#endif -+ -+int compat_utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags) { -+ if (__builtin_available(macOS 10.13, *)) { -+ return utimensat(dirfd, pathname, times, flags); -+ } else { -+ int fd = openat(dirfd, pathname, flags); -+ if (fd == -1) { return -1; } -+ -+ int retval = compat_futimens(fd, times); -+ if (close(fd) == -1) { return -1; } -+ -+ return retval; -+ } -+} -+ -+int compat_futimens(int fd, const struct timespec times[_Nullable 2]) { -+ if (__builtin_available(macOS 10.13, *)) { -+ return futimens(fd, times); -+ } else { -+ return gzip_futimens(fd, times); -+ } -+} -diff --git a/compat/time_compat.h b/compat/time_compat.h -new file mode 100644 -index 0000000..f07a7ed ---- /dev/null -+++ b/compat/time_compat.h -@@ -0,0 +1,16 @@ -+// SPDX-License-Identifier: APSL-2.0 -+// utimensat written by Randy Eckenrode © 2024 -+ -+#pragma once -+ -+#include -+ -+// https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/stat.h#L578-L579 -+#define UTIME_NOW -1 -+#define UTIME_OMIT -2 -+ -+#define utimensat compat_utimensat -+#define futimens compat_futimens -+ -+extern int compat_utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags); -+extern int compat_futimens(int fd, const struct timespec times[_Nullable 2]); --- -2.46.0 - From 6ec624cba0d218fa9e99a364fce7f8c2652c2357 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 26/35] darwin.network_cmds: remove code for macOS < 11 --- .../darwin/apple-source-releases/network_cmds/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/package.nix index d9b115db5742..58defd296f18 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/network_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/network_cmds/package.nix @@ -1,6 +1,6 @@ { lib, - apple-sdk_11, + apple-sdk, developer_cmds, fetchurl, libpcap, @@ -67,7 +67,7 @@ let }; }; - xnu = apple-sdk_11.sourceRelease "xnu"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "network_cmds-deps-private-headers"; @@ -449,7 +449,6 @@ mkAppleDerivation { ]; buildInputs = [ - apple-sdk_11 libpcap libresolv openssl From da2128cb405f9f517e68a36973f4a92b08de35fb Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 27/35] darwin.patch_cmds: remove code for macOS < 11 --- .../darwin/apple-source-releases/patch_cmds/meson.build.in | 4 ---- .../darwin/apple-source-releases/patch_cmds/package.nix | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/meson.build.in index 731c60420a12..9d657d702b7d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/meson.build.in @@ -8,7 +8,6 @@ project('patch_cmds', 'c', version : '@version@') # Dependencies cc = meson.get_compiler('c') -libbsd = dependency('libbsd-overlay', required : false) libutil = cc.find_library('util') @@ -30,7 +29,6 @@ install_man('cmp/cmp.1') executable( 'diff', - dependencies : [ libbsd ], include_directories : 'diff', install : true, sources : [ @@ -79,7 +77,6 @@ install_man('diffstat/diffstat.1') executable( 'patch', - dependencies : [ libbsd ], include_directories : 'patch', install : true, sources : [ @@ -96,7 +93,6 @@ install_man('patch/patch.1') executable( 'sdiff', - dependencies : [ libbsd ], include_directories : 'sdiff', install : true, sources : [ diff --git a/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/package.nix index 8f1f213ae5c4..86eaba2136e5 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/patch_cmds/package.nix @@ -1,7 +1,6 @@ { lib, apple-sdk, - libbsd, libutil, mkAppleDerivation, pkg-config, @@ -19,10 +18,7 @@ mkAppleDerivation { nativeBuildInputs = [ pkg-config ]; - buildInputs = - [ libutil ] - # diff, patch, and sdiff need `strtonum`, which requires the 11.0 SDK. - ++ lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "11.0") [ libbsd ]; + buildInputs = [ libutil ]; meta = { description = "BSD patch commands for Darwin"; From 94bc3e473a8bf61579908d5e00e1f6268b634709 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 28/35] darwin.removefile: remove code for macOS < 11 --- .../apple-source-releases/removefile/meson.build.in | 9 --------- .../darwin/apple-source-releases/removefile/package.nix | 6 +----- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/removefile/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/removefile/meson.build.in index 672a15a40b8e..ad3f05939d5b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/removefile/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/removefile/meson.build.in @@ -14,15 +14,6 @@ library( 'removefile', c_args : [ '-D__DARWIN_NOW_CANCELABLE=1', - # Define these flags for the 10.12 SDK assuming that users on older systems can’t encounter dataless files. - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/stat.h#L520 - '-DSF_DATALESS=0x40000000', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/resource.h#L598 - '-DIOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES=3', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/resource.h#L640 - '-DIOPOL_MATERIALIZE_DATALESS_FILES_OFF=1', - # https://github.com/apple-oss-distributions/xnu/blob/94d3b452840153a99b38a3a9659680b2a006908e/bsd/sys/attr.h#L562 - # '-DATTR_CMNEXT_LINKID=0x00000010', ], install : true, sources : [ diff --git a/pkgs/os-specific/darwin/apple-source-releases/removefile/package.nix b/pkgs/os-specific/darwin/apple-source-releases/removefile/package.nix index b5163b6b4d95..ab9f28605b5a 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/removefile/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/removefile/package.nix @@ -1,15 +1,11 @@ { apple-sdk, - apple-sdk_10_13, - apple-sdk_11, mkAppleDerivation, stdenvNoCC, }: let - # The 10.12 SDK doesn’t have the files needed in the same places or possibly at all. - # Just use the 11.x SDK to make things easier. - xnu = apple-sdk_11.sourceRelease "xnu"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "removefile-deps-private-headers"; From bd002ebb74ef301a8fabd89ea1a7ef5f821167f2 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 29/35] darwin.shell_cmds: remove code for macOS < 11 --- .../shell_cmds/meson.build.in | 3 - .../shell_cmds/package.nix | 62 ++++++------------- 2 files changed, 18 insertions(+), 47 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/meson.build.in index 33612f0cd1f9..d3582b5013f3 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/meson.build.in @@ -15,7 +15,6 @@ host_cxx = meson.get_compiler('cpp') # pam = cc.find_library('pam') -libbsd = dependency('libbsd-overlay', required : false) libedit = dependency('libedit') libresolv = host_cc.find_library('resolv') libsbuf = host_cc.find_library('sbuf') @@ -259,7 +258,6 @@ endforeach executable( 'lockf', - dependencies : [ libbsd ], install : true, sources : [ 'lockf/lockf.c' ], ) @@ -415,7 +413,6 @@ install_man('who/who.1') executable( 'xargs', - dependencies : [ libbsd ], include_directories : 'xargs', install : true, sources : [ diff --git a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/package.nix index 98c83c1b6306..9d8cd9be2e53 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/shell_cmds/package.nix @@ -4,7 +4,6 @@ bison, clang, fetchurl, - libbsd, libedit, libresolv, libsbuf, @@ -17,15 +16,6 @@ let # nohup requires vproc_priv.h from launchd launchd = apple-sdk.sourceRelease "launchd"; - - oldTime_c = fetchurl { - url = "https://github.com/apple-oss-distributions/shell_cmds/raw/shell_cmds-207.11.1/time/time.c"; - hash = "sha256-f7aRwIaKq6r37jpw0V+1Z/sZs5Rm7vy2S774HNBnwmY="; - }; - oldTime_1 = fetchurl { - url = "https://github.com/apple-oss-distributions/shell_cmds/raw/shell_cmds-207.11.1/time/time.1"; - hash = "sha256-ZIbNJPHLQVGq2tdUB6j0DEp9Hie+XUZkfuQm676Vpwc="; - }; in mkAppleDerivation { releaseName = "shell_cmds"; @@ -37,31 +27,18 @@ mkAppleDerivation { xcodeHash = "sha256-26N7AZV/G+ryc2Nu1v91rEdb1a6jDpnj6t5rzEG2YA4="; - postPatch = - '' - # Fix `mktemp` templates - substituteInPlace sh/mkbuiltins \ - --replace-fail '-t ka' '-t ka.XXXXXX' - substituteInPlace sh/mktokens \ - --replace-fail '-t ka' '-t ka.XXXXXX' + postPatch = '' + # Fix `mktemp` templates + substituteInPlace sh/mkbuiltins \ + --replace-fail '-t ka' '-t ka.XXXXXX' + substituteInPlace sh/mktokens \ + --replace-fail '-t ka' '-t ka.XXXXXX' - # Update `/etc/locate.rc` paths to point to the store. - for path in locate/locate/locate.updatedb.8 locate/locate/locate.rc locate/locate/updatedb.sh; do - substituteInPlace $path --replace-fail '/etc/locate.rc' "$out/etc/locate.rc" - done - '' - # Use an older version of `time.c` that’s compatible with the 10.12 SDK. - + lib.optionalString (lib.versionOlder (lib.getVersion apple-sdk) "10.13") '' - cp '${oldTime_c}' time/time.c - cp '${oldTime_1}' time/time.1 - '' - + lib.optionalString (lib.versionOlder (lib.getVersion apple-sdk) "11.0") '' - # `rpmatch` was added in 11.0, so revert it to a simpler check on older SDKs. - substituteInPlace find/misc.c \ - --replace-fail 'return (rpmatch(resp) == 1);' "return (resp[0] == 'y');" - # Add missing header for older SDKs. - sed -e '1i #include ' -i w/proc_compare.c - ''; + # Update `/etc/locate.rc` paths to point to the store. + for path in locate/locate/locate.updatedb.8 locate/locate/locate.rc locate/locate/updatedb.sh; do + substituteInPlace $path --replace-fail '/etc/locate.rc' "$out/etc/locate.rc" + done + ''; env.NIX_CFLAGS_COMPILE = "-I${launchd}/liblaunch"; @@ -72,16 +49,13 @@ mkAppleDerivation { pkg-config ]; - buildInputs = - [ - libedit - libresolv - libsbuf - libutil - libxo - ] - # xargs needs `strtonum`, which was added in 11.0. - ++ lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "11.0") [ libbsd ]; + buildInputs = [ + libedit + libresolv + libsbuf + libutil + libxo + ]; postInstall = '' # Patch the shebangs to use `sh` from shell_cmds. From 1c0adeb5d45bb2afa4124ff464136fe6f9e2cf8d Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 30/35] darwin.system_cmds: remove code for macOS < 11 We need to pull in an additional XNU header for a tool we are now able to build. --- .../system_cmds/meson.build.in | 49 +++++++------------ .../system_cmds/package.nix | 8 ++- ...lability-checks-to-vm_purgeable_stat.patch | 42 ---------------- 3 files changed, 20 insertions(+), 79 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/system_cmds/patches/0001-Add-availability-checks-to-vm_purgeable_stat.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/meson.build.in index 1d6647869cc6..f12b3fe41b92 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/meson.build.in @@ -76,17 +76,14 @@ install_man('accton/accton.8') executable( 'arch', - build_by_default : sdk_version.version_compare('>=11'), dependencies : [ core_foundation ], - install : sdk_version.version_compare('>=11'), + install : true, sources : 'arch/arch.c', ) -if sdk_version.version_compare('>=11') - install_man( - 'arch/arch.1', - 'arch/machine.1', - ) -endif +install_man( + 'arch/arch.1', + 'arch/machine.1', +) executable( 'at', @@ -192,8 +189,8 @@ install_man('fs_usage/fs_usage.1') executable( 'gcore', # Requires XPC private APIs - build_by_default : false and sdk_version.version_compare('>=11'), - install : false and sdk_version.version_compare('>=11'), + build_by_default : false, + install : false, sources : [ 'gcore/convert.c', 'gcore/corefile.c', @@ -359,13 +356,10 @@ install_man('mkfile/mkfile.8') executable( 'mslutil', - build_by_default : sdk_version.version_compare('>=10.13'), - install : sdk_version.version_compare('>=10.13'), + install : true, sources : 'mslutil/mslutil.c', ) -if sdk_version.version_compare('>=10.13') - install_man('mslutil/mslutil.1') -endif +install_man('mslutil/mslutil.1') executable( 'newgrp', @@ -495,8 +489,8 @@ executable('shutdown', executable( 'stackshot', # Requires private entitlements - build_by_default : false and sdk_version.version_compare('>=10.13'), - install : false and sdk_version.version_compare('>=10.13'), + build_by_default : false, + install : false, sources : 'stackshot/stackshot.c', ) # No man pages for `stackshot`. @@ -520,13 +514,10 @@ install_man( executable( 'taskpolicy', - build_by_default : sdk_version.version_compare('>=11'), - install : sdk_version.version_compare('>=11'), + install : true, sources : 'taskpolicy/taskpolicy.c', ) -if sdk_version.version_compare('>=11') - install_man('taskpolicy/taskpolicy.8') -endif +install_man('taskpolicy/taskpolicy.8') executable( 'vifs', @@ -546,13 +537,10 @@ executable( install_man('vipw/vipw.8') executable('vm_purgeable_stat', - build_by_default : sdk_version.version_compare('>=11'), - install : sdk_version.version_compare('>=11'), + install : true, sources : 'vm_purgeable_stat/vm_purgeable_stat.c', ) -if sdk_version.version_compare('>=11') - install_man('vm_purgeable_stat/vm_purgeable_stat.1') -endif +install_man('vm_purgeable_stat/vm_purgeable_stat.1') executable( 'vm_stat', @@ -593,18 +581,15 @@ install_man('zic/zic.8') executable( 'zlog', - build_by_default : sdk_version.version_compare('>=11'), c_args : '-DKERN_NOT_FOUND=56', dependencies : [ core_foundation, core_symbolication ], - install : sdk_version.version_compare('>=11'), + install : true, sources : [ 'zlog/SymbolicationHelper.c', 'zlog/zlog.c', ], ) -if sdk_version.version_compare('>=11') - install_man('zlog/zlog.1') -endif +install_man('zlog/zlog.1') executable( 'zprint', diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/package.nix index b7239730e283..f4d1b83f8c29 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/package.nix @@ -51,6 +51,9 @@ let chmod -R u+w "$out/include/dispatch" find "$out/include/dispatch" -name '*.h' -exec sed -i {} -e 's/, bridgeos([^)]*)//g' \; + install -D -t "$out/include/System/i386" \ + '${xnu}/osfmk/i386/cpu_capabilities.h' + install -D -t "$out/include/kern" \ '${xnu}/osfmk/kern/debug.h' @@ -81,11 +84,6 @@ mkAppleDerivation { xcodeHash = "sha256-gdtn3zNIneZKy6+X0mQ51CFVLNM6JQYLbd/lotG5/Tw="; - patches = [ - # Use availability checks to fall back to older APIs on older macOS versions. - ./patches/0001-Add-availability-checks-to-vm_purgeable_stat.patch - ]; - postPatch = '' # Replace hard-coded, impure system paths with the output path in the store. sed -e "s|PATH=[^;]*|PATH='$out/bin'|" -i "pagesize/pagesize.sh" diff --git a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/patches/0001-Add-availability-checks-to-vm_purgeable_stat.patch b/pkgs/os-specific/darwin/apple-source-releases/system_cmds/patches/0001-Add-availability-checks-to-vm_purgeable_stat.patch deleted file mode 100644 index 08e5b68cad8f..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/system_cmds/patches/0001-Add-availability-checks-to-vm_purgeable_stat.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 18a676bc44a8bc24374ab35a258a18049b56b6d4 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Mon, 2 Sep 2024 21:46:34 -0400 -Subject: [PATCH] Add availability checks to vm_purgeable_stat - ---- - vm_purgeable_stat/vm_purgeable_stat.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/vm_purgeable_stat/vm_purgeable_stat.c b/vm_purgeable_stat/vm_purgeable_stat.c -index 330704d..9d9041b 100644 ---- a/vm_purgeable_stat/vm_purgeable_stat.c -+++ b/vm_purgeable_stat/vm_purgeable_stat.c -@@ -88,7 +88,11 @@ int get_task_from_pid(int pid, task_t *task) - fprintf(stderr, "%s\n", PRIV_ERR_MSG); - return -1; - } -- kr = task_inspect_for_pid(mach_task_self(), pid, task); -+ if (__builtin_available(macOS 11.3, *)) { -+ kr = task_inspect_for_pid(mach_task_self(), pid, task); -+ } else { -+ kr = task_for_pid(mach_task_self(), pid, task); -+ } - if (kr != KERN_SUCCESS) { - fprintf(stderr, "Failed to get task port for pid: %d\n", pid); - return -1; -@@ -128,7 +132,11 @@ int get_system_tasks(task_array_t *tasks, mach_msg_type_number_t *count) - vm_deallocate(mach_task_self(), (vm_address_t)psets, (vm_size_t)psetCount * sizeof(mach_port_t)); - - /* convert the processor-set-priv to a list of tasks for the processor set */ -- ret = processor_set_tasks_with_flavor(pset_priv, TASK_FLAVOR_INSPECT, tasks, count); -+ if (__builtin_available(macOS 11.0, *)) { -+ ret = processor_set_tasks_with_flavor(pset_priv, TASK_FLAVOR_INSPECT, tasks, count); -+ } else { -+ ret = processor_set_tasks(pset_priv, tasks, count); -+ } - if (ret != KERN_SUCCESS) { - fprintf(stderr, "processor_set_tasks_with_flavor() failed: %s\n", mach_error_string(ret)); - return -1; --- -2.44.1 - From 377c3ff76b3f7d24220d530646afc6928d4152b1 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 31/35] darwin.text_cmds: remove code for macOS < 11 --- .../text_cmds/meson.build.in | 5 +- .../text_cmds/package.nix | 22 ++------ ...ability-check-for-__collate_lookup_l.patch | 54 ------------------- 3 files changed, 5 insertions(+), 76 deletions(-) delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/text_cmds/patches/0001-Use-availability-check-for-__collate_lookup_l.patch diff --git a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/meson.build.in b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/meson.build.in index 6f89b31236b4..c77ea6ef4ffe 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/meson.build.in +++ b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/meson.build.in @@ -18,7 +18,6 @@ fs = import('fs') cc = meson.get_compiler('c') bzip2 = dependency('bzip2') -libbsd = dependency('libbsd-overlay', required : false) libmd = dependency('libmd') libresolv = cc.find_library('resolv') libutil = cc.find_library('util') @@ -81,7 +80,6 @@ install_man('cat/cat.1') executable( 'col', - dependencies : [ libbsd ], install : true, sources : [ 'col/col.c', @@ -316,7 +314,7 @@ executable( executable( 'split', - dependencies : [ libbsd, libutil ], + dependencies : [ libutil ], install : true, sources : [ 'split/split.c' ], ) @@ -366,7 +364,6 @@ executable( executable( 'uniq', - dependencies : [ libbsd ], install : true, sources : [ 'uniq/uniq.c' ], ) diff --git a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/package.nix b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/package.nix index e97ca8081b75..95867cad1186 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/package.nix @@ -1,10 +1,8 @@ { lib, apple-sdk, - apple-sdk_11, apple-sdk_13, bzip2, - libbsd, libmd, libresolv, libutil, @@ -22,11 +20,9 @@ let Libc = apple-sdk.sourceRelease "Libc"; Libc_13 = apple-sdk_13.sourceRelease "Libc"; - # The 10.12 SDK doesn’t have the files needed in the same places or possibly at all. - # Just use the 11.0 SDK to make things easier. - CommonCrypto = apple-sdk_11.sourceRelease "CommonCrypto"; - libplatform = apple-sdk_11.sourceRelease "libplatform"; - xnu = apple-sdk_11.sourceRelease "xnu"; + CommonCrypto = apple-sdk.sourceRelease "CommonCrypto"; + libplatform = apple-sdk.sourceRelease "libplatform"; + xnu = apple-sdk.sourceRelease "xnu"; privateHeaders = stdenvNoCC.mkDerivation { name = "text_cmds-deps-private-headers"; @@ -40,12 +36,6 @@ let '${xnu}/libkern/os/base_private.h' install -D -t "$out/include/CommonCrypto" \ '${CommonCrypto}/include/Private/CommonDigestSPI.h' - - # Prevent an error when using the old availability headers from the 10.12 SDK. - substituteInPlace "$out/include/CommonCrypto/CommonDigestSPI.h" \ - --replace-fail 'API_DEPRECATED(CC_DIGEST_DEPRECATION_WARNING, macos(10.4, 10.13), ios(5.0, 11.0))' "" \ - --replace-fail 'API_DEPRECATED(CC_DIGEST_DEPRECATION_WARNING, macos(10.4, 10.15), ios(5.0, 13.0))' "" - touch "$out/include/CrashReporterClient.h" # Needed by older SDK `os/assumes.h` ''; }; in @@ -59,10 +49,6 @@ mkAppleDerivation { xcodeHash = "sha256-dZ+yJyfflhmUyx3gitRXC115QxS87SGC4/HjMa199Ts="; - patches = lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "11.0") [ - ./patches/0001-Use-availability-check-for-__collate_lookup_l.patch - ]; - postPatch = '' # Improve compatiblity with libmd in nixpkgs. @@ -102,7 +88,7 @@ mkAppleDerivation { ncurses xz zlib - ] ++ lib.optionals (lib.versionOlder (lib.getVersion apple-sdk) "11.0") [ libbsd ]; + ]; postInstall = '' # Patch the shebangs to use `sh` from shell_cmds. diff --git a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/patches/0001-Use-availability-check-for-__collate_lookup_l.patch b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/patches/0001-Use-availability-check-for-__collate_lookup_l.patch deleted file mode 100644 index 55d24e5e27e6..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/patches/0001-Use-availability-check-for-__collate_lookup_l.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 11ad41c2d3af88b5cf85d4bc2f5388b65e5ff347 Mon Sep 17 00:00:00 2001 -From: Randy Eckenrode -Date: Mon, 16 Sep 2024 12:42:59 -0400 -Subject: [PATCH] Use availability check for __collate_lookup_l - ---- - tr/str.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/tr/str.c b/tr/str.c -index 6a79df2..8226abe 100644 ---- a/tr/str.c -+++ b/tr/str.c -@@ -69,6 +69,7 @@ static void genseq(STR *); - * Using libc internal function __collate_lookup_l for character - * equivalence - */ -+void __collate_lookup(const __darwin_wchar_t *, int *, int *, int *); - void __collate_lookup_l(const __darwin_wchar_t *, int *, int *, int *, - locale_t); - /* -@@ -255,7 +256,13 @@ genequiv(STR *s) - */ - int tprim, tsec; - int len; -- __collate_lookup_l(s->equiv, &len, &tprim, &tsec, LC_GLOBAL_LOCALE); -+ if (__builtin_available(macOS 11.0, *)) { -+ __collate_lookup_l(s->equiv, &len, &tprim, &tsec, LC_GLOBAL_LOCALE); -+ } else { -+ locale_t old = uselocale(LC_GLOBAL_LOCALE); -+ __collate_lookup(s->equiv, &len, &tprim, &tsec); -+ uselocale(old); -+ } - - if (tprim != -1) { - for (p = 1, i = 1; i < NCHARS_SB; i++) { -@@ -270,7 +277,13 @@ genequiv(STR *s) - * perform lookup of primary weight and fill cache - */ - int csec; -- __collate_lookup_l((__darwin_wchar_t *)&i, &len, &cprim, &csec, LC_GLOBAL_LOCALE); -+ if (__builtin_available(macOS 11.0, *)) { -+ __collate_lookup_l((__darwin_wchar_t *)&i, &len, &cprim, &csec, LC_GLOBAL_LOCALE); -+ } else { -+ locale_t old = uselocale(LC_GLOBAL_LOCALE); -+ __collate_lookup((__darwin_wchar_t *)&i, &len, &cprim, &csec); -+ uselocale(old); -+ } - collation_weight_cache[i] = cprim; - } - --- -2.46.0 - From 082b0535df73f898344701a09010ee232c717e2c Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:09:03 +0100 Subject: [PATCH 32/35] darwin.top: remove code for macOS < 11 --- .../os-specific/darwin/apple-source-releases/top/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/top/package.nix b/pkgs/os-specific/darwin/apple-source-releases/top/package.nix index f08b9efce1a2..35737d5f748b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/top/package.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/top/package.nix @@ -1,5 +1,5 @@ { - apple-sdk_11, + apple-sdk, fetchpatch2, libutil, mkAppleDerivation, @@ -8,7 +8,7 @@ }: let - xnu = apple-sdk_11.sourceRelease "xnu"; + xnu = apple-sdk.sourceRelease "xnu"; in mkAppleDerivation { releaseName = "top"; @@ -33,7 +33,6 @@ mkAppleDerivation { ''; buildInputs = [ - apple-sdk_11 libutil ncurses ]; From c7a0002b0b64c54ea0c28a7f75a3da263d0452b4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:48:10 +0100 Subject: [PATCH 33/35] nixVersions.{nix_2_24,git}: remove code for macOS < 11 --- pkgs/tools/package-management/nix/default.nix | 27 +++---------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 1a3ac948c0b5..22cb06f0a03d 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -9,7 +9,6 @@ , fetchpatch , fetchpatch2 , runCommand -, overrideSDK , buildPackages , Security @@ -210,22 +209,13 @@ in lib.makeExtensible (self: ({ self_attribute_name = "nix_2_23"; }; - nix_2_24 = (common { + nix_2_24 = common { version = "2.24.10"; hash = "sha256-XdeVy1/d6DEIYb3nOA6JIYF4fwMKNxtwJMgT3pHi+ko="; self_attribute_name = "nix_2_24"; - }).override (lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { - # Fix the following error with the default x86_64-darwin SDK: - # - # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer - # - # Despite the use of the 10.13 deployment target here, the aligned - # allocation function Clang uses with this setting actually works - # all the way back to 10.6. - stdenv = overrideSDK stdenv { darwinMinVersion = "10.13"; }; - }); + }; - git = (common rec { + git = common rec { version = "2.25.0"; suffix = "pre20241101_${lib.substring 0 8 src.rev}"; src = fetchFromGitHub { @@ -235,16 +225,7 @@ in lib.makeExtensible (self: ({ hash = "sha256-E1Sp0JHtbD1CaGO3UbBH6QajCtOGqcrVfPSKL0n63yo="; }; self_attribute_name = "git"; - }).override (lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) { - # Fix the following error with the default x86_64-darwin SDK: - # - # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer - # - # Despite the use of the 10.13 deployment target here, the aligned - # allocation function Clang uses with this setting actually works - # all the way back to 10.6. - stdenv = overrideSDK stdenv { darwinMinVersion = "10.13"; }; - }); + }; latest = self.nix_2_24; From 726bfb7ca487492ebd31a2a390986ff274e6feba Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:34:18 +0100 Subject: [PATCH 34/35] memstream{,Hook}: drop --- pkgs/by-name/hy/hyx/package.nix | 4 +- pkgs/by-name/no/notemap/package.nix | 3 -- pkgs/by-name/te/telescope/package.nix | 3 +- pkgs/by-name/ti/tintin/package.nix | 4 +- pkgs/by-name/ut/util-linux/package.nix | 4 +- pkgs/by-name/xf/xfitter/package.nix | 4 +- .../libraries/memstream/default.nix | 48 ------------------- .../libraries/memstream/setup-hook.sh | 6 --- .../python-modules/pymupdf/default.nix | 3 +- pkgs/tools/misc/timidity/default.nix | 5 +- pkgs/top-level/aliases.nix | 2 + pkgs/top-level/all-packages.nix | 6 --- 12 files changed, 11 insertions(+), 81 deletions(-) delete mode 100644 pkgs/development/libraries/memstream/default.nix delete mode 100644 pkgs/development/libraries/memstream/setup-hook.sh diff --git a/pkgs/by-name/hy/hyx/package.nix b/pkgs/by-name/hy/hyx/package.nix index e41f9bbfceb2..a33f619af291 100644 --- a/pkgs/by-name/hy/hyx/package.nix +++ b/pkgs/by-name/hy/hyx/package.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, memstreamHook }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "hyx"; @@ -14,8 +14,6 @@ stdenv.mkDerivation rec { --replace "-Wl,-z,relro,-z,now -fpic -pie" "" ''; - buildInputs = lib.optional (stdenv.system == "x86_64-darwin") memstreamHook; - installPhase = '' install -vD hyx $out/bin/hyx ''; diff --git a/pkgs/by-name/no/notemap/package.nix b/pkgs/by-name/no/notemap/package.nix index 0611665d6618..040f26752b51 100644 --- a/pkgs/by-name/no/notemap/package.nix +++ b/pkgs/by-name/no/notemap/package.nix @@ -3,7 +3,6 @@ , fetchzip , pkg-config , libressl -, memstreamHook }: stdenv.mkDerivation rec { @@ -21,8 +20,6 @@ stdenv.mkDerivation rec { buildInputs = [ libressl - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - memstreamHook ]; meta = { diff --git a/pkgs/by-name/te/telescope/package.nix b/pkgs/by-name/te/telescope/package.nix index 801cae0b123c..7f1f23d07ad4 100644 --- a/pkgs/by-name/te/telescope/package.nix +++ b/pkgs/by-name/te/telescope/package.nix @@ -9,7 +9,6 @@ , ncurses , autoreconfHook , buildPackages -, memstreamHook }: stdenv.mkDerivation rec { @@ -39,7 +38,7 @@ stdenv.mkDerivation rec { libgrapheme libressl ncurses - ] ++ lib.optional stdenv.hostPlatform.isDarwin memstreamHook; + ]; configureFlags = [ "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" diff --git a/pkgs/by-name/ti/tintin/package.nix b/pkgs/by-name/ti/tintin/package.nix index 6f56512b1da2..a5959098d8aa 100644 --- a/pkgs/by-name/ti/tintin/package.nix +++ b/pkgs/by-name/ti/tintin/package.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, lib, zlib, pcre -, memorymappingHook, memstreamHook +, memorymappingHook , gnutls }: @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ zlib pcre gnutls ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook memstreamHook ]; + ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook ]; preConfigure = '' cd src diff --git a/pkgs/by-name/ut/util-linux/package.nix b/pkgs/by-name/ut/util-linux/package.nix index 6afae4dcc963..1e6569a44dc6 100644 --- a/pkgs/by-name/ut/util-linux/package.nix +++ b/pkgs/by-name/ut/util-linux/package.nix @@ -14,7 +14,6 @@ , installShellFiles , writeSupport ? stdenv.hostPlatform.isLinux , shadowSupport ? stdenv.hostPlatform.isLinux -, memstreamHook , gitUpdater }: @@ -90,8 +89,7 @@ stdenv.mkDerivation rec { ++ lib.optionals pamSupport [ pam ] ++ lib.optionals capabilitiesSupport [ libcap_ng ] ++ lib.optionals ncursesSupport [ ncurses ] - ++ lib.optionals systemdSupport [ systemd ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ]; + ++ lib.optionals systemdSupport [ systemd ]; doCheck = false; # "For development purpose only. Don't execute on production system!" diff --git a/pkgs/by-name/xf/xfitter/package.nix b/pkgs/by-name/xf/xfitter/package.nix index e509f3a005f7..d6d1705054b8 100644 --- a/pkgs/by-name/xf/xfitter/package.nix +++ b/pkgs/by-name/xf/xfitter/package.nix @@ -18,7 +18,7 @@ , qcdnum , root , zlib -, memorymappingHook, memstreamHook +, memorymappingHook }: stdenv.mkDerivation rec { @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { buildInputs = [ apfel blas ceres-solver lhapdf lapack libyaml root qcdnum gsl yaml-cpp zlib ] ++ lib.optionals ("5" == lib.versions.major root.version) [ apfelgrid applgrid ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook memstreamHook ] + ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook ] ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc ; diff --git a/pkgs/development/libraries/memstream/default.nix b/pkgs/development/libraries/memstream/default.nix deleted file mode 100644 index 7877718e6d35..000000000000 --- a/pkgs/development/libraries/memstream/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ lib, stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "memstream"; - version = "0.1"; - - src = fetchurl { - url = "https://piumarta.com/software/memstream/memstream-${version}.tar.gz"; - sha256 = "0kvdb897g7nyviaz72arbqijk2g2wa61cmi3l5yh48rzr49r3a3a"; - }; - - postPatch = '' - substituteInPlace Makefile \ - --replace-fail 'cc' '$(CC)' - ''; - - dontConfigure = true; - - postBuild = '' - $AR rcs libmemstream.a memstream.o - ''; - - doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - checkPhase = '' - runHook preCheck - - ./test | grep "This is a test of memstream" - - runHook postCheck - ''; - - installPhase = '' - runHook preInstall - - install -D libmemstream.a "$out"/lib/libmemstream.a - install -D memstream.h "$out"/include/memstream.h - - runHook postInstall - ''; - - meta = with lib; { - homepage = "https://www.piumarta.com/software/memstream/"; - description = "memstream.c is an implementation of the POSIX function open_memstream() for BSD and BSD-like operating systems"; - license = licenses.mit; - maintainers = with maintainers; [ veprbl ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/libraries/memstream/setup-hook.sh b/pkgs/development/libraries/memstream/setup-hook.sh deleted file mode 100644 index 09aabe748841..000000000000 --- a/pkgs/development/libraries/memstream/setup-hook.sh +++ /dev/null @@ -1,6 +0,0 @@ -useMemstream () { - export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-include memstream.h"; - export NIX_LDFLAGS="${NIX_LDFLAGS-}${NIX_LDFLAGS:+ }-lmemstream"; -} - -postHooks+=(useMemstream) diff --git a/pkgs/development/python-modules/pymupdf/default.nix b/pkgs/development/python-modules/pymupdf/default.nix index 0b30312c480e..1271cd8a0b21 100644 --- a/pkgs/development/python-modules/pymupdf/default.nix +++ b/pkgs/development/python-modules/pymupdf/default.nix @@ -19,7 +19,6 @@ jbig2dec, libjpeg_turbo, gumbo, - memstreamHook, # dependencies mupdf, @@ -75,7 +74,7 @@ buildPythonPackage rec { jbig2dec libjpeg_turbo gumbo - ] ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ]; + ]; propagatedBuildInputs = [ mupdf-cxx ]; diff --git a/pkgs/tools/misc/timidity/default.nix b/pkgs/tools/misc/timidity/default.nix index f41d3b34971a..1ad1a0682b81 100644 --- a/pkgs/tools/misc/timidity/default.nix +++ b/pkgs/tools/misc/timidity/default.nix @@ -3,7 +3,6 @@ , fetchurl , nixosTests , pkg-config -, memstreamHook , CoreAudio , libobjc , libjack2 @@ -31,9 +30,7 @@ stdenv.mkDerivation rec { ./configure-compat.patch ]; - nativeBuildInputs = [ pkg-config ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ memstreamHook ]; - + nativeBuildInputs = [ pkg-config ]; buildInputs = [ libjack2 ncurses diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d28db7363fe1..eedc995e5431 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -765,6 +765,8 @@ mapAliases { mcomix3 = mcomix; # Added 2022-06-05 mdt = md-tui; # Added 2024-09-03 meme = throw "'meme' has been renamed to/replaced by 'meme-image-generator'"; # Converted to throw 2024-10-17 + memstream = throw "memstream has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 + memstreamHook = throw "memstream has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 mhwaveedit = throw "'mkwaveedit' has been removed due to lack of maintenance upstream. Consider using 'audacity' or 'tenacity' instead"; microcodeAmd = microcode-amd; # Added 2024-09-08 microcodeIntel = microcode-intel; # Added 2024-09-08 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6018ed75c44d..08afcabfe14d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10360,12 +10360,6 @@ with pkgs; propagatedBuildInputs = [ memorymapping ]; } ../development/libraries/memorymapping/setup-hook.sh; - memstream = callPackage ../development/libraries/memstream { }; - memstreamHook = makeSetupHook { - name = "memstream-hook"; - propagatedBuildInputs = [ memstream ]; - } ../development/libraries/memstream/setup-hook.sh; - mergerfs = callPackage ../tools/filesystems/mergerfs { }; mergerfs-tools = callPackage ../tools/filesystems/mergerfs/tools.nix { }; From 874d326aca331ec8580fddba3e559ce15ba091c4 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:37:01 +0100 Subject: [PATCH 35/35] memorymapping{,Hook}: drop --- pkgs/applications/science/physics/crystfel/default.nix | 3 --- pkgs/by-name/ti/tintin/package.nix | 4 +--- pkgs/by-name/xf/xfitter/package.nix | 2 -- pkgs/development/compilers/chicken/5/overrides.nix | 4 +--- pkgs/development/python-modules/rdkit/default.nix | 3 +-- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/all-packages.nix | 6 ------ 7 files changed, 5 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/science/physics/crystfel/default.nix b/pkgs/applications/science/physics/crystfel/default.nix index a8f2b65b669f..5c29d9b6f4d5 100644 --- a/pkgs/applications/science/physics/crystfel/default.nix +++ b/pkgs/applications/science/physics/crystfel/default.nix @@ -31,7 +31,6 @@ , gtk3 , gdk-pixbuf , argp-standalone -, memorymappingHook , withGui ? true , withBitshuffle ? true }: @@ -211,8 +210,6 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withGui [ gtk3 gdk-pixbuf ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ argp-standalone - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ - memorymappingHook ] ++ lib.optionals withBitshuffle [ hdf5-external-filter-plugins ]; diff --git a/pkgs/by-name/ti/tintin/package.nix b/pkgs/by-name/ti/tintin/package.nix index a5959098d8aa..3dc7884f1f67 100644 --- a/pkgs/by-name/ti/tintin/package.nix +++ b/pkgs/by-name/ti/tintin/package.nix @@ -1,5 +1,4 @@ { stdenv, fetchFromGitHub, lib, zlib, pcre -, memorymappingHook , gnutls }: @@ -14,8 +13,7 @@ stdenv.mkDerivation rec { hash = "sha256-AfWw9CMBAzTTsrZXDEoOdpvUofIQfLCW7hRgSb7LB00="; }; - buildInputs = [ zlib pcre gnutls ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook ]; + buildInputs = [ zlib pcre gnutls ]; preConfigure = '' cd src diff --git a/pkgs/by-name/xf/xfitter/package.nix b/pkgs/by-name/xf/xfitter/package.nix index d6d1705054b8..86dcd3d809d4 100644 --- a/pkgs/by-name/xf/xfitter/package.nix +++ b/pkgs/by-name/xf/xfitter/package.nix @@ -18,7 +18,6 @@ , qcdnum , root , zlib -, memorymappingHook }: stdenv.mkDerivation rec { @@ -40,7 +39,6 @@ stdenv.mkDerivation rec { buildInputs = [ apfel blas ceres-solver lhapdf lapack libyaml root qcdnum gsl yaml-cpp zlib ] ++ lib.optionals ("5" == lib.versions.major root.version) [ apfelgrid applgrid ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook ] ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc ; diff --git a/pkgs/development/compilers/chicken/5/overrides.nix b/pkgs/development/compilers/chicken/5/overrides.nix index ec465aa8d783..7519fa3852c8 100644 --- a/pkgs/development/compilers/chicken/5/overrides.nix +++ b/pkgs/development/compilers/chicken/5/overrides.nix @@ -106,9 +106,7 @@ in plot = addToBuildInputs pkgs.plotutils; postgresql = addToBuildInputsWithPkgConfig pkgs.postgresql; rocksdb = addToBuildInputs pkgs.rocksdb_8_3; - scheme2c-compatibility = old: - addToNativeBuildInputs (lib.optionals (stdenv.system == "x86_64-darwin") [ pkgs.memorymappingHook ]) - (addPkgConfig old); + scheme2c-compatibility = addPkgConfig; sdl-base = old: ((addToPropagatedBuildInputsWithPkgConfig pkgs.SDL old) // # needed for sdl-config to be in PATH diff --git a/pkgs/development/python-modules/rdkit/default.nix b/pkgs/development/python-modules/rdkit/default.nix index ec98f19c271f..fd66dd16cb90 100644 --- a/pkgs/development/python-modules/rdkit/default.nix +++ b/pkgs/development/python-modules/rdkit/default.nix @@ -17,7 +17,6 @@ numpy, pandas, pillow, - memorymappingHook, }: let external = { @@ -96,7 +95,7 @@ buildPythonPackage rec { eigen inchi maeparser - ] ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memorymappingHook ]; + ]; dependencies = [ numpy diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index eedc995e5431..ae1d95d0365c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -765,6 +765,8 @@ mapAliases { mcomix3 = mcomix; # Added 2022-06-05 mdt = md-tui; # Added 2024-09-03 meme = throw "'meme' has been renamed to/replaced by 'meme-image-generator'"; # Converted to throw 2024-10-17 + memorymapping = throw "memorymapping has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 + memorymappingHook = throw "memorymapping has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 memstream = throw "memstream has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 memstreamHook = throw "memstream has been removed, as it was only useful on old macOS versions that are no longer supported"; # Added 2024-10-05 mhwaveedit = throw "'mkwaveedit' has been removed due to lack of maintenance upstream. Consider using 'audacity' or 'tenacity' instead"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 08afcabfe14d..243711d6e4a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10354,12 +10354,6 @@ with pkgs; mediastreamer-openh264 = callPackage ../development/libraries/mediastreamer/msopenh264.nix { }; - memorymapping = callPackage ../development/libraries/memorymapping { }; - memorymappingHook = makeSetupHook { - name = "memorymapping-hook"; - propagatedBuildInputs = [ memorymapping ]; - } ../development/libraries/memorymapping/setup-hook.sh; - mergerfs = callPackage ../tools/filesystems/mergerfs { }; mergerfs-tools = callPackage ../tools/filesystems/mergerfs/tools.nix { };