about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/kimageannotator
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/kimageannotator')
-rw-r--r--nixpkgs/pkgs/development/libraries/kimageannotator/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix b/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix
index ce1be1d18062..e32247a488a3 100644
--- a/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix
+++ b/nixpkgs/pkgs/development/libraries/kimageannotator/default.nix
@@ -1,18 +1,29 @@
-{ lib, mkDerivation, fetchFromGitHub, cmake, qtbase, kcolorpicker, qttools }:
+{ lib, stdenv, fetchFromGitHub, cmake, qttools, qtbase, qtsvg, kcolorpicker }:
 
-mkDerivation rec {
+let
+  isQt6 = lib.versions.major qtbase.version == "6";
+in stdenv.mkDerivation rec {
   pname = "kimageannotator";
-  version = "0.6.1";
+  version = "0.7.0";
 
   src = fetchFromGitHub {
     owner = "ksnip";
     repo = "kImageAnnotator";
     rev = "v${version}";
-    sha256 = "sha256-lNoYAJ5yTC5H0gWPVkBGhLroRhFCPyC1DsVBy0IrqL4=";
+    hash = "sha256-Dq9CM/D3nA7MaY9rfwqF/UAw/+1ptKLf3P8jhFdngKk=";
   };
 
   nativeBuildInputs = [ cmake qttools ];
-  buildInputs = [ qtbase kcolorpicker ];
+  buildInputs = [ qtbase qtsvg ];
+  propagatedBuildInputs = [ kcolorpicker ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "BUILD_WITH_QT6" isQt6)
+    (lib.cmakeBool "BUILD_SHARED_LIBS" true)
+  ];
+
+  # Library only
+  dontWrapQtApps = true;
 
   meta = with lib; {
     description = "Tool for annotating images";