Fixes#297765
The `postFetch` step was broken in several ways:
1. It attempts to unpack the archive, but this has already been done before reaching this step.
2. It unpacks the file `$downloadedFile`, but this file no longer exists because it's been moved to `$renamed`.
Additionally, since (1) neither directory `src/opendirectory` nor `src/OpenDirectory` are used for anything, and (2) it's not clear whether Nix produces different hashes depending on file system case sensitivity, the chosen solution is to just remove both these two directories for now. If later a file from either directory is needed, an investigation needs to be done on how Nix hashes archives with clashing names on case insensitive file systems.
Based on the derivation from xcbuild.sdk. apple_sdk.sdkRoot provides
version plists and a hook that passes them automatically to the compiler
as `-isysroot`. This is needed to correctly set the SDK version in
compiled binaries. Otherwise, clang will infer the SDK version to be the
same as the deployment target, which is usually not what you want.
- Only link `libexec` when using cctools-port. cctools-llvm does not
have a `libexec` folder;
- Use `as` provided by cctools-llvm, which is already using the
clang-integrated assembler on both platforms; and
- Clean up inconsistent use of `builtins`.
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
- Update to the latest available version from Apple;
- Use Meson because dealing with xcbuild is too much trouble; and
- Conditionally build certain programs when newer SDKs are available.
`zlog` in darwin.system_cmds requires the CoreSymbolication framework.
This change does two things:
- Adds a patch with the required missing symbols; and
- Uses the stubs to create `CoreSymbolication.framework`.
Co-authored-by: a-n-n-a-l-e-e <150648636+a-n-n-a-l-e-e@users.noreply.github.com>