qdrant: fix build on darwin

This commit is contained in:
Weijia Wang 2024-01-03 23:56:25 +01:00
parent 34031ce8f5
commit 42c16cd10a
2 changed files with 14 additions and 6 deletions

View File

@ -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 { };

View File

@ -12513,7 +12513,7 @@ with pkgs;
qarte = libsForQt5.callPackage ../applications/video/qarte { };
qdrant = darwin.apple_sdk_11_0.callPackage ../servers/search/qdrant {
inherit (darwin.apple_sdk_11_0.frameworks) Security;
inherit (darwin.apple_sdk_11_0.frameworks) Security SystemConfiguration;
};
qlcplus = libsForQt5.callPackage ../applications/misc/qlcplus { };