darwin.libresolv: remove code for macOS < 11

This commit is contained in:
Emily
2024-11-18 00:14:01 +00:00
parent 1b30d9b9f0
commit ba01760b21
@@ -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 = ''