summary refs log tree commit diff
path: root/pkgs/applications/graphics/qscreenshot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/qscreenshot/default.nix')
-rw-r--r--pkgs/applications/graphics/qscreenshot/default.nix37
1 files changed, 24 insertions, 13 deletions
diff --git a/pkgs/applications/graphics/qscreenshot/default.nix b/pkgs/applications/graphics/qscreenshot/default.nix
index 6a47760082e..efbab2e04bb 100644
--- a/pkgs/applications/graphics/qscreenshot/default.nix
+++ b/pkgs/applications/graphics/qscreenshot/default.nix
@@ -1,23 +1,34 @@
-{ lib, stdenv, fetchurl, dos2unix, which, qt, Carbon }:
+{ stdenv
+, lib
+, fetchgit
+, dos2unix
+, qtbase
+, qttools
+, qtx11extras
+, wrapQtAppsHook
+, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "qscreenshot";
-  version = "1.0";
+  version = "unstable-2021-10-18";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/qscreenshot/qscreenshot-${version}-src.tar.gz";
-    sha256 = "1spj5fg2l8p5bk81xsv6hqn1kcrdiy54w19jsfb7g5i94vcb1pcx";
+  src = fetchgit {
+    url = "https://git.code.sf.net/p/qscreenshot/code";
+    rev = "e340f06ae2f1a92a353eaa68e103d1c840adc12d";
+    sha256 = "0mdiwn74vngiyazr3lq72f3jnv5zw8wyd2dw6rik6dbrvfs69jig";
   };
 
-  buildInputs = [ dos2unix which qt ]
-    ++ lib.optional stdenv.isDarwin Carbon;
-
-  # Remove carriage returns that cause /bin/sh to abort
-  preConfigure = ''
-    dos2unix configure
-    sed -i "s|lrelease-qt4|lrelease|" src/src.pro
-  '';
+  preConfigure = "cd qScreenshot";
 
+  nativeBuildInputs = [
+    cmake
+    qttools
+    wrapQtAppsHook
+  ];
+  buildInputs = [
+    qtbase
+    qtx11extras
+  ];
   meta = with lib; {
     description = "Simple creation and editing of screenshots";
     homepage = "https://sourceforge.net/projects/qscreenshot/";