nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fastembed,
5 fetchFromGitHub,
6 grpcio,
7 grpcio-tools,
8 httpx,
9 numpy,
10 poetry-core,
11 portalocker,
12 pydantic,
13 pytest-asyncio,
14 pytestCheckHook,
15 urllib3,
16}:
17
18buildPythonPackage rec {
19 pname = "qdrant-client";
20 version = "1.16.2";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "qdrant";
25 repo = "qdrant-client";
26 tag = "v${version}";
27 hash = "sha256-sOZDQmwiTz3lZ1lR0xJDxMmNc5QauWLJV5Ida2INibY=";
28 };
29
30 build-system = [ poetry-core ];
31
32 pythonRelaxDeps = [
33 "portalocker"
34 ];
35
36 dependencies = [
37 grpcio
38 grpcio-tools
39 httpx
40 numpy
41 portalocker
42 pydantic
43 urllib3
44 ]
45 ++ httpx.optional-dependencies.http2;
46
47 pythonImportsCheck = [ "qdrant_client" ];
48
49 nativeCheckInputs = [
50 pytestCheckHook
51 pytest-asyncio
52 ];
53
54 # Tests require network access
55 doCheck = false;
56
57 optional-dependencies = {
58 fastembed = [ fastembed ];
59 };
60
61 meta = {
62 description = "Python client for Qdrant vector search engine";
63 homepage = "https://github.com/qdrant/qdrant-client";
64 changelog = "https://github.com/qdrant/qdrant-client/releases/tag/${src.tag}";
65 license = lib.licenses.mit;
66 maintainers = with lib.maintainers; [ happysalada ];
67 };
68}