diff --git a/pkgs/applications/graphics/qscreenshot/default.nix b/pkgs/applications/graphics/qscreenshot/default.nix index 6a47760082e0..efbab2e04bbb 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/"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e9a86c76ec7..51e07a510367 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35159,10 +35159,7 @@ with pkgs; qsampler = libsForQt5.callPackage ../applications/audio/qsampler { }; - qscreenshot = callPackage ../applications/graphics/qscreenshot { - inherit (darwin.apple_sdk.frameworks) Carbon; - qt = qt4; - }; + qscreenshot = libsForQt5.callPackage ../applications/graphics/qscreenshot { }; qsstv = qt5.callPackage ../applications/radio/qsstv { };