From 85bd7b3bce73d8af44460e6b2f62c537eba9e64b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Dec 2024 19:03:42 +0100 Subject: [PATCH] materialize: fix build on darwin --- pkgs/by-name/ma/materialize/package.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ma/materialize/package.nix b/pkgs/by-name/ma/materialize/package.nix index 725644309926..f52fb40e64fe 100644 --- a/pkgs/by-name/ma/materialize/package.nix +++ b/pkgs/by-name/ma/materialize/package.nix @@ -12,10 +12,12 @@ pkg-config, darwin, -# buildInputs + # buildInputs libclang, openssl, rdkafka, + apple-sdk_11, + darwinMinVersionHook, }: let @@ -134,11 +136,17 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; - buildInputs = [ - libclang - openssl - rdkafka - ]; + buildInputs = + [ + libclang + openssl + rdkafka + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer + apple-sdk_11 + (darwinMinVersionHook "10.13") + ]; # the check phase requires linking with rocksdb which can be a problem since # the rust rocksdb crate is not updated very often.