2019-08-01 07:36:51 +01:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, qtbase, qmake, qttools, qtsvg }:
|
2018-01-21 06:47:57 +00:00
|
|
|
|
2019-02-06 08:27:05 +00:00
|
|
|
# To use `flameshot gui`, you will also need to put flameshot in `services.dbus.packages`
|
|
|
|
# in configuration.nix so that the daemon gets launched properly:
|
|
|
|
#
|
|
|
|
# services.dbus.packages = [ pkgs.flameshot ];
|
|
|
|
# environment.systemPackages = [ pkgs.flameshot ];
|
2019-08-01 07:36:51 +01:00
|
|
|
mkDerivation rec {
|
|
|
|
pname = "flameshot";
|
2018-12-15 05:01:54 +00:00
|
|
|
version = "0.6.0";
|
2018-01-21 06:47:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lupoDharkael";
|
|
|
|
repo = "flameshot";
|
|
|
|
rev = "v${version}";
|
2018-12-15 05:01:54 +00:00
|
|
|
sha256 = "193szslh55v44jzxzx5g9kxhl8p8di7vbcnxlid4acfidhnvgazm";
|
2018-01-21 06:47:57 +00:00
|
|
|
};
|
|
|
|
|
2019-02-06 08:27:05 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools qtsvg ];
|
|
|
|
buildInputs = [ qtbase ];
|
|
|
|
|
|
|
|
qmakeFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# flameshot.pro assumes qmake is being run in a git checkout.
|
|
|
|
git() { echo ${version}; }
|
|
|
|
export -f git
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/share/dbus-1/services/org.dharkael.Flameshot.service \
|
|
|
|
--replace "/usr/local" "$out"
|
|
|
|
'';
|
|
|
|
|
2018-01-21 06:47:57 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-08-01 07:36:51 +01:00
|
|
|
meta = with lib; {
|
2018-01-21 06:47:57 +00:00
|
|
|
description = "Powerful yet simple to use screenshot software";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/lupoDharkael/flameshot";
|
2018-01-21 06:47:57 +00:00
|
|
|
maintainers = [ maintainers.scode ];
|
2019-08-01 07:36:51 +01:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
2018-01-21 06:47:57 +00:00
|
|
|
};
|
|
|
|
}
|