about summary refs log tree commit diff
path: root/pkgs/tools/misc/flameshot
diff options
context:
space:
mode:
authoroxalica <oxalicc@pm.me>2021-10-23 22:49:42 +0800
committerRobert Helgesson <robert@rycee.net>2021-10-24 08:46:47 +0200
commit910e1eab7161b60f8e18e2df984e115c0b28fa33 (patch)
tree70522377133b29ae961e880b81fb70d536336f95 /pkgs/tools/misc/flameshot
parenta37334b1ddb367e728267fe1e24a18d8920d6f36 (diff)
flameshot: fix desktop Exec path and autostart directory location
Diffstat (limited to 'pkgs/tools/misc/flameshot')
-rw-r--r--pkgs/tools/misc/flameshot/default.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/pkgs/tools/misc/flameshot/default.nix b/pkgs/tools/misc/flameshot/default.nix
index e2e066fd89035..7605c92bf438b 100644
--- a/pkgs/tools/misc/flameshot/default.nix
+++ b/pkgs/tools/misc/flameshot/default.nix
@@ -1,6 +1,7 @@
 { mkDerivation
 , lib
 , fetchFromGitHub
+, fetchpatch
 , qtbase
 , cmake
 , qttools
@@ -19,6 +20,21 @@ mkDerivation rec {
     sha256 = "1ncknjayl6am740f49g0lc28z1zsifbicxz1j1kwps3ksj15nl7a";
   };
 
+  patches = [
+    # Support for USE_LAUNCHER_ABSOLUTE_PATH.
+    # 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=";
+    })
+  ];
+
   passthru = {
     updateScript = nix-update-script {
       attrPath = pname;
@@ -28,10 +44,13 @@ mkDerivation rec {
   nativeBuildInputs = [ cmake qttools qtsvg ];
   buildInputs = [ qtbase ];
 
+  # Use relative path for the .desktop file.
+  cmakeFlags = [ "-DUSE_LAUNCHER_ABSOLUTE_PATH=OFF" ];
+
   meta = with lib; {
     description = "Powerful yet simple to use screenshot software";
     homepage = "https://github.com/flameshot-org/flameshot";
-    maintainers = with maintainers; [ scode ];
+    maintainers = with maintainers; [ scode oxalica ];
     license = licenses.gpl3Plus;
     platforms = platforms.linux;
   };