about summary refs log tree commit diff
path: root/pkgs/servers/mail/mailpit
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2023-11-17 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2023-11-17 04:20:00 +0000
commit0b119a2d3c95dc87e9f66f2010deebbf0387ecca (patch)
tree7b9b7493880b020e36d6645afa4e74bf0ccc624f /pkgs/servers/mail/mailpit
parent255ff0f5e98e6dc8e7bd8f0d21315f865833de79 (diff)
mailpit: fix build on darwin
Diffstat (limited to 'pkgs/servers/mail/mailpit')
-rw-r--r--pkgs/servers/mail/mailpit/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/servers/mail/mailpit/default.nix b/pkgs/servers/mail/mailpit/default.nix
index baf15dce13e9d..cfc71d0c24a4f 100644
--- a/pkgs/servers/mail/mailpit/default.nix
+++ b/pkgs/servers/mail/mailpit/default.nix
@@ -34,6 +34,12 @@ let
       hash = "sha256-r4yv2qImIlNMPJagz5i1sxqBDnFAucc2kDUmjGktM6A=";
     };
 
+    env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) {
+      # Make sure libc++ uses `posix_memalign` instead of `aligned_alloc` on x86_64-darwin.
+      # Otherwise, nodejs would require the 11.0 SDK and macOS 10.15+.
+      NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300";
+    };
+
     nativeBuildInputs = [ nodejs python3 libtool npmHooks.npmConfigHook ];
 
     buildPhase = ''