From 73bd4afeffe9962ad07f2e865e87839c031690e4 Mon Sep 17 00:00:00 2001 From: emaryn Date: Sun, 23 Feb 2025 01:58:03 +0800 Subject: [PATCH] qdrant: refactor --- pkgs/servers/search/qdrant/default.nix | 30 +++++++++++--------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index e86b1d85ac72..2b1d6deade5f 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { owner = "qdrant"; repo = "qdrant"; tag = "v${version}"; - sha256 = "sha256-q99roKqeC8lra29gyJertJLnVNFvKRFZ2agREvHZx6k="; + hash = "sha256-q99roKqeC8lra29gyJertJLnVNFvKRFZ2agREvHZx6k="; }; cargoLock = { @@ -31,6 +31,12 @@ rustPlatform.buildRustPackage rec { }; }; + nativeBuildInputs = [ + protobuf + rustPlatform.bindgenHook + pkg-config + ]; + buildInputs = [ openssl @@ -41,29 +47,19 @@ rustPlatform.buildRustPackage rec { SystemConfiguration ]; - nativeBuildInputs = [ - protobuf - rustPlatform.bindgenHook - pkg-config - ]; + # Needed to get openssl-sys to use pkg-config. + env.OPENSSL_NO_VENDOR = 1; - env = { - # Needed to get openssl-sys to use pkg-config. - OPENSSL_NO_VENDOR = 1; - }; + passthru.updateScript = nix-update-script { }; - passthru = { - updateScript = nix-update-script { }; - }; - - meta = with lib; { + meta = { description = "Vector Search Engine for the next generation of AI applications"; longDescription = '' Expects a config file at config/config.yaml with content similar to https://github.com/qdrant/qdrant/blob/master/config/config.yaml ''; homepage = "https://github.com/qdrant/qdrant"; - license = licenses.asl20; - maintainers = with maintainers; [ dit7ya ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ dit7ya ]; }; }