biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / search / qdrant / default.nix
blob801887103ec4f30f9e45bf55a091dad15aac091e
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , protobuf
5 , stdenv
6 , pkg-config
7 , openssl
8 , rust-jemalloc-sys
9 , nix-update-script
10 , Security
11 , SystemConfiguration
14 rustPlatform.buildRustPackage rec {
15   pname = "qdrant";
16   version = "1.7.4";
18   src = fetchFromGitHub {
19     owner = "qdrant";
20     repo = "qdrant";
21     rev = "refs/tags/v${version}";
22     sha256 = "sha256-BgsLmE50mGmB5fcUjov8wcAHRTKMYaoyoXjSUyIddlc=";
23   };
25   patches = [
26     ./1.7.4-CVE-2024-3078.patch
27   ];
29   cargoLock = {
30     lockFile = ./Cargo.lock;
31     outputHashes = {
32       "quantization-0.1.0" = "sha256-ggVqJiftu0nvyEM0dzsH0JqIc/Z1XILyUSKiJHeuuZs=";
33       "tonic-0.9.2" = "sha256-ZlcDUZy/FhxcgZE7DtYhAubOq8DMSO17T+TCmXar1jE=";
34       "wal-0.1.2" = "sha256-nBGwpphtj+WBwL9TmWk7qXiEqlIWkgh/2V9uProqhMk=";
35     };
36   };
38   buildInputs = [
39     openssl
40     rust-jemalloc-sys
41   ] ++ lib.optionals stdenv.isDarwin [
42     Security
43     SystemConfiguration
44   ];
46   nativeBuildInputs = [ protobuf rustPlatform.bindgenHook pkg-config ];
48   env = {
49     # Needed to get openssl-sys to use pkg-config.
50     OPENSSL_NO_VENDOR = 1;
51   } // lib.optionalAttrs stdenv.cc.isClang {
52     NIX_CFLAGS_COMPILE = "-faligned-allocation";
53   };
55   passthru = {
56     updateScript = nix-update-script { };
57   };
59   meta = with lib; {
60     description = "Vector Search Engine for the next generation of AI applications";
61     longDescription = ''
62       Expects a config file at config/config.yaml with content similar to
63       https://github.com/qdrant/qdrant/blob/master/config/config.yaml
64     '';
65     homepage = "https://github.com/qdrant/qdrant";
66     license = licenses.asl20;
67     maintainers = with maintainers; [ dit7ya ];
68   };