summaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/qodeassist-plugin/default.nix
blob: 29cf2d04facf88220297722e5fd91135e9ba40fb (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
{
  stdenv,
  lib,
  fetchFromGitHub,
  runCommand,
  cmake,
  pkg-config,
  qttools,
  ninja,
  cups,
  curl,
  libGL,
  qtbase,
  qt5compat,
  qtcreator,
  vulkan-headers,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "qodeassist-plugin";
  version = "0.9.11";

  src = fetchFromGitHub {
    owner = "Palm1r";
    repo = "QodeAssist";
    tag = "v${finalAttrs.version}";
    hash = "sha256-8GU19EWxwxHyjmSVBzTiz5qTrQr5WhLpWowispKUSyQ=";
  };

  dontWrapQtApps = true;

  nativeBuildInputs = [
    cmake
    pkg-config
    ninja
    (qttools.override { withClang = true; })
  ];

  buildInputs = [
    cups
    curl
    libGL
    qtbase
    qt5compat
    qtcreator
    vulkan-headers
  ];

  outputs = [ "out" ];

  cmakeFlags = [ ];

  installPhase = "mkdir -p $out; cp -R lib $out/";

  passthru.tests = {
    test-version = runCommand "${finalAttrs.pname}-test" { } ''
      QT_QPA_PLATFORM="offscreen" ${
        lib.getExe (qtcreator.withPackages [ finalAttrs.finalPackage ])
      } --version > $out
      cat $out | grep 'qodeassist ${finalAttrs.version}'
    '';
  };

  meta = {
    description = "AI-powered coding assistant plugin for Qt Creator";
    longDescription = ''
      QodeAssist is an AI-powered coding assistant plugin for Qt Creator.
      It provides intelligent code completion and suggestions for C++ and QML,
      leveraging large language models through local providers like Ollama.
      Enhance your coding productivity with context-aware AI assistance directly
      in your Qt development environment.
    '';
    homepage = "https://github.com/Palm1r/QodeAssist";
    license = lib.licenses.gpl3Only;
    maintainers = [ lib.maintainers.zatm8 ];
    platforms = qtcreator.meta.platforms;
  };
})