darwin.AvailabilityVersions: remove workaround

The patch adding support for `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__`
to clang has been backported to all versions of clang in nixpkgs (except
for clang 12), allowing this workaround to be dropped.
This commit is contained in:
Randy Eckenrode
2024-10-10 16:23:04 -04:00
parent 129a959fad
commit 8e7056cc07
@@ -84,14 +84,6 @@ mkAppleDerivation (finalAttrs: {
"$out/libexec/make_symbol_aliasing.sh" \$threshold "\$dest/include/sys/_symbol_aliasing.h"
# __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ is only defined by clang 17+, so define it for older versions.
${lib.getExe gnused} -E '/#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED/{
i#ifndef __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
i#define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
i#endif
}' \\
-i "\$dest/include/AvailabilityInternal.h"
# Remove macros from newer SDKs because they can confuse some programs about the SDK version.
declare -a versionParts=(\''${threshold//./ })
if [ "\''${versionParts[0]}" == "10" ]; then