From 2573d499bd7cfb3d1d1f52e20c5b8bf49eb5f7d8 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 30 Sep 2024 08:45:53 -0400 Subject: [PATCH] haskellPackages.network: fix build on x86_64-darwin --- pkgs/development/haskell-modules/configuration-darwin.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 6e7f7ef47b87..e931a60ada41 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -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