summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/llm-git/default.nix
blob: 957a54581de68ad759450738035671affd04a190 (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  click,
  deepmerge,
  pyyaml,
  rich,
  pygments,
  llm,
  llm-git,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-asyncio,
  pytest-httpx,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
  pname = "llm-git";
  version = "0.2.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "OttoAllmendinger";
    repo = "llm-git";
    tag = "v${version}";
    hash = "sha256-LcIsJPQgZ4gj2t7sSa0Wu35WHWYyquZZTS/UxojH+XU=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    click
    deepmerge
    llm
    pyyaml
    rich
    pygments
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    writableTmpDirAsHomeHook
  ];

  pythonImportsCheck = [ "llm_git" ];

  passthru.tests = llm.mkPluginTest llm-git;

  meta = {
    description = "AI-powered Git commands for the LLM CLI tool";
    homepage = "https://github.com/OttoAllmendinger/llm-git";
    changelog = "https://github.com/OttoAllmendinger/llm-git/releases/tag/${version}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ philiptaron ];
  };
}