summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/kimageannotator/default.nix
blob: 5e5b080b772704146132228c4050f6e0c2c82d61 (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
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  qttools,
  qtbase,
  qtsvg,
  kcolorpicker,
}:

let
  isQt6 = lib.versions.major qtbase.version == "6";
in
stdenv.mkDerivation rec {
  pname = "kimageannotator";
  version = "0.7.2";

  src = fetchFromGitHub {
    owner = "ksnip";
    repo = "kImageAnnotator";
    rev = "v${version}";
    hash = "sha256-SKNNsBXmaS0ZnbMP7cKSfr+MM+ICdvYQ0k2h5s9SDcE=";
  };

  nativeBuildInputs = [
    cmake
    qttools
  ];
  buildInputs = [
    qtbase
    qtsvg
  ];
  propagatedBuildInputs = [ kcolorpicker ];

  cmakeFlags = [
    (lib.cmakeBool "BUILD_WITH_QT6" isQt6)
    (lib.cmakeBool "BUILD_SHARED_LIBS" true)
  ];

  # Library only
  dontWrapQtApps = true;

  meta = {
    description = "Tool for annotating images";
    homepage = "https://github.com/ksnip/kImageAnnotator";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ fliegendewurst ];
    platforms = lib.platforms.linux;
  };
}