summaryrefslogtreecommitdiff
path: root/pkgs/by-name/ve/vectorcode/package.nix
blob: 51d941d15c08c79ab0cb8d72901219020d21ca5e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
  lib,
  python3Packages,
  fetchFromGitHub,
  versionCheckHook,

  lspSupport ? true,
}:

python3Packages.buildPythonApplication rec {
  pname = "vectorcode";
  version = "0.5.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Davidyz";
    repo = "VectorCode";
    tag = version;
    hash = "sha256-paFUgPf8zTtMli0qh2bXjnmny2bDQxDwWE03yn0rWUY=";
  };

  build-system = with python3Packages; [
    pdm-backend
  ];

  dependencies =
    with python3Packages;
    [
      chromadb
      httpx
      numpy
      pathspec
      psutil
      pygments
      sentence-transformers
      shtab
      tabulate
      transformers
      tree-sitter
      tree-sitter-language-pack
    ]
    ++ lib.optionals lspSupport optional-dependencies.lsp;

  optional-dependencies = with python3Packages; {
    intel = [
      openvino
      optimum
    ];
    legacy = [
      numpy
      torch
      transformers
    ];
    lsp = [
      lsprotocol
      pygls
    ];
    mcp = [
      mcp
      pydantic
    ];
  };

  pythonImportsCheck = [ "vectorcode" ];

  nativeCheckInputs =
    [
      versionCheckHook
    ]
    ++ (with python3Packages; [
      mcp
      pygls
      pytestCheckHook
    ]);
  versionCheckProgramArg = "version";

  disabledTests = [
    # Require internet access
    "test_get_embedding_function"
    "test_get_embedding_function_fallback"
  ];

  meta = {
    description = "Code repository indexing tool to supercharge your LLM experience";
    homepage = "https://github.com/Davidyz/VectorCode";
    changelog = "https://github.com/Davidyz/VectorCode/releases/tag/${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
    mainProgram = "vectorcode";
  };
}