1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 qttools,
7 qtbase,
8 qtsvg,
9 kcolorpicker,
10}:
11
12let
13 isQt6 = lib.versions.major qtbase.version == "6";
14in
15stdenv.mkDerivation rec {
16 pname = "kimageannotator";
17 version = "0.7.1";
18
19 src = fetchFromGitHub {
20 owner = "ksnip";
21 repo = "kImageAnnotator";
22 rev = "v${version}";
23 hash = "sha256-LFou8gTF/XDBLNQbA4uurYJHQl7yOTKe2OGklUsmPrg=";
24 };
25
26 nativeBuildInputs = [
27 cmake
28 qttools
29 ];
30 buildInputs = [
31 qtbase
32 qtsvg
33 ];
34 propagatedBuildInputs = [ kcolorpicker ];
35
36 cmakeFlags = [
37 (lib.cmakeBool "BUILD_WITH_QT6" isQt6)
38 (lib.cmakeBool "BUILD_SHARED_LIBS" true)
39 ];
40
41 # Library only
42 dontWrapQtApps = true;
43
44 meta = with lib; {
45 description = "Tool for annotating images";
46 homepage = "https://github.com/ksnip/kImageAnnotator";
47 license = licenses.lgpl3Plus;
48 maintainers = with maintainers; [ fliegendewurst ];
49 platforms = platforms.linux;
50 };
51}