Instead of providing separate SDK frameworks and libraries, they are bundled together in an SDK that can be used with xcrun and the xcbuild package.
The SDK includes everything you need to build applications. It also propagates certain packages automatically (libiconv, libresolv, and libsbuf). It is no longer necessary to include these conditionally on Darwin.
The stdenv provides a default SDK (the unversioned apple-sdk package). A different SDK can be used to change the SDK in use by adding it to your buildInputs (see the stdenv documentation for more details).
Some examples of the migration are:
Removing the following from packages when using the default (unversioned) SDK, as it is now in the Darwin stdenv
This means the migration should be limited to "leaf" packages (packages without packages that depend on it), or changes that will already cause rebuilds like updating
Issue description
As introduced in https://github.com/NixOS/nixpkgs/pull/346043 and explained fully in https://discourse.nixos.org/t/the-darwin-sdks-have-been-updated/55295, nixpkgs has a new way of handling the Darwin SDK.
As a TL;DR:
Some examples of the migration are:
apple-sdk_${version}
patternSteps to reproduce
You can
grep
for usages of the SDK and it's components tree-wide:For example, to find files using it in
pkgs/by-name
:You may also want to search for specific components, i.e.:
Technical details
Some caution should be taken during the migration: