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