Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

43 lines
946 B
Nix

{
lib,
apple-sdk,
mkAppleDerivation,
}:
let
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.sourceRelease "Libc";
in
mkAppleDerivation {
releaseName = "libresolv";
outputs = [
"out"
"dev"
"man"
];
xcodeHash = "sha256-yHNa6cpI3T4R/iakeHmL6S/c9p+VpYR4fudv2UXUpnY=";
postUnpack = ''
mkdir -p "$sourceRoot/arpa"
ln -s "$NIX_BUILD_TOP/$sourceRoot/nameser.h" "$sourceRoot/arpa/nameser.h"
'';
env.NIX_CFLAGS_COMPILE = "-I${configd}/dnsinfo -I${Libinfo}/lookup.subproj";
postInstall = ''
mkdir -p "$out/include/arpa"
ln -s ../nameser.h "$out/include/arpa"
cp ${Libc}/include/arpa/nameser_compat.h "$out/include/arpa"
'';
meta = {
description = "Libresolv implementation for Darwin";
license = lib.licenses.apple-psl10;
};
}