2021-08-05 21:33:18 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2021-10-28 06:52:43 +00:00
|
|
|
, fetchpatch
|
2021-08-05 21:33:18 +00:00
|
|
|
, qtbase
|
|
|
|
, cmake
|
|
|
|
, qttools
|
|
|
|
, qtsvg
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "flameshot";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.10.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-11-03 02:18:15 +00:00
|
|
|
owner = "flameshot-org";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "flameshot";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-rZUiaS32C77tFJmEkw/9MGbVTVscb6LOCyWaWO5FyR4=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
patches = [
|
2021-12-19 01:06:50 +00:00
|
|
|
# Use absolute install path for `Exec=` in the desktop file.
|
|
|
|
# This is required since KWin relies on absolute paths in `Exec=` to find a process'
|
|
|
|
# corresponding desktop file and check if it's allowed to take screenshot.
|
2021-10-28 06:52:43 +00:00
|
|
|
# Should be removed when the next release comes out.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/flameshot-org/flameshot/commit/1031980ed1e62d24d7f719998b7951d48801e3fa.patch";
|
|
|
|
sha256 = "sha256-o8Zz/bBvitXMDFt5rAfubiUPOx+EQ+ITgrfnFM3dFjE=";
|
|
|
|
})
|
|
|
|
# Fix autostart write path.
|
|
|
|
# Should be removed when the next release comes out.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/flameshot-org/flameshot/commit/7977cbb52c2d785abd0d85d9df5991e8f7cae441.patch";
|
|
|
|
sha256 = "sha256-wWa9Y+4flBiggOMuX7KQyL+q3f2cALGeQBGusX2x6sk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
nativeBuildInputs = [ cmake qttools qtsvg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ qtbase ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Powerful yet simple to use screenshot software";
|
2020-11-21 19:51:51 +00:00
|
|
|
homepage = "https://github.com/flameshot-org/flameshot";
|
2021-10-28 06:52:43 +00:00
|
|
|
maintainers = with maintainers; [ scode oxalica ];
|
2021-07-21 07:28:18 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|