haskellPackages.network: fix build on x86_64-darwin

This commit is contained in:
Randy Eckenrode 2024-09-30 08:45:53 -04:00
parent e694240f77
commit 2573d499bd
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9

View File

@ -300,6 +300,13 @@ self: super: ({
__darwinAllowLocalNetworking = true;
});
# network requires `IP_RECVTOS`, which was added in 10.15.
network =
if lib.versionOlder (lib.getVersion pkgs.apple-sdk) "10.15" then
addBuildDepend pkgs.apple-sdk_10_15 super.network
else
super.network;
foldl = overrideCabal (drv: {
postPatch = ''
# This comment has been inserted, so the derivation hash changes, forcing