about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-darwin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-darwin.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-darwin.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix
index 3159f3b31536..1c432ce3c937 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
@@ -324,6 +331,10 @@ self: super: ({
   # Tests fail on macOS https://github.com/mrkkrp/zip/issues/112
   zip = dontCheck super.zip;
 
+  snap = super.snap.overrideAttrs (drv: {
+    __darwinAllowLocalNetworking = true;
+  });
+
   warp = super.warp.overrideAttrs (drv: {
     __darwinAllowLocalNetworking = true;
   });
@@ -356,7 +367,7 @@ self: super: ({
     '';
   }) super.di-core;
 
-} // lib.optionalAttrs pkgs.stdenv.isAarch64 {  # aarch64-darwin
+} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 {  # aarch64-darwin
 
   # Workarounds for justStaticExecutables on aarch64-darwin. Since dead code
   # elimination barely works on aarch64-darwin, any package that has a
@@ -426,7 +437,7 @@ self: super: ({
   rivet-adaptor-postgresql = dontCheck super.rivet-adaptor-postgresql;
   tmp-proc-postgres = dontCheck super.tmp-proc-postgres;
 
-} // lib.optionalAttrs pkgs.stdenv.isx86_64 {  # x86_64-darwin
+} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isx86_64 {  # x86_64-darwin
 
   # tests appear to be failing to link or something:
   # https://hydra.nixos.org/build/174540882/nixlog/9