diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-01-03 23:56:25 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-01-03 23:56:25 +0100 |
commit | 42c16cd10ab5504132711f250d1ee63fea2d2689 (patch) | |
tree | 06f238f5b8968fba8fbb35885fc0decb06933d75 /pkgs/servers/search | |
parent | 34031ce8f5b6ebd03447c2515243789d8a1fde17 (diff) |
qdrant: fix build on darwin
Diffstat (limited to 'pkgs/servers/search')
-rw-r--r-- | pkgs/servers/search/qdrant/default.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index f23fa34b87bed..e7df375495a07 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -8,6 +8,7 @@ , rust-jemalloc-sys , nix-update-script , Security +, SystemConfiguration }: rustPlatform.buildRustPackage rec { @@ -30,17 +31,24 @@ rustPlatform.buildRustPackage rec { }; }; - # Needed to get openssl-sys to use pkg-config. - OPENSSL_NO_VENDOR = 1; - buildInputs = [ openssl rust-jemalloc-sys - ] ++ lib.optionals stdenv.isDarwin [ Security ]; + ] ++ lib.optionals stdenv.isDarwin [ + Security + SystemConfiguration + ]; nativeBuildInputs = [ protobuf rustPlatform.bindgenHook pkg-config ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-faligned-allocation"; + env = { + # Needed to get openssl-sys to use pkg-config. + OPENSSL_NO_VENDOR = 1; + } // lib.optionalAttrs stdenv.cc.isClang { + NIX_CFLAGS_COMPILE = "-faligned-allocation"; + # Work around https://github.com/NixOS/nixpkgs/issues/166205. + NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; + }; passthru = { updateScript = nix-update-script { }; |