diff mbox series

[bug#74223,11/11] gnu: Add grimblast.

Message ID 53d47bb281db1f13db3b41105edde2b3788801af.1730877074.git.hako@ultrarare.space
State New
Headers show
Series gnu: Add hyprland. | expand

Commit Message

Hilton Chain Nov. 6, 2024, 7:36 a.m. UTC
* gnu/packages/wm.scm (grimblast): New variable.

Change-Id: I38d8e0ff92e8724cec64d37d036ff307c96a2cc0
---
 gnu/packages/wm.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 01a6677e9a..bbecbf47e2 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -3766,6 +3766,66 @@  (define-public avizo
 used for multimedia keys.")
     (license license:gpl3+)))
 
+(define-public grimblast
+  (let ((commit "9d67858b437d4a1299be496d371b66fc0d3e01f6")
+        (revision "1"))
+    (package
+      (name "grimblast")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/hyprwm/contrib")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1v0v5j7ingx80b5zpyz8ilfhz0kh9dcssnx6iwwl45zzgp915cpv"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f                ;No tests.
+             #:make-flags
+             #~(list (string-append "PREFIX=" #$output))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (delete 'configure)
+                 (add-after 'unpack 'chdir
+                   (lambda _
+                     (chdir "grimblast")))
+                 (add-after 'chdir 'fix-paths
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (substitute* "grimblast"
+                       (((string-append "\\<(" (string-join
+                                                '("date"
+                                                  "grim"
+                                                  "slurp"
+                                                  "hyprctl"
+                                                  "hyprpicker"
+                                                  "wl-copy"
+                                                  "jq"
+                                                  "notify-send")
+                                                "|")
+                                        ")\\>")
+                         cmd)
+                        (search-input-file
+                         inputs (string-append "bin/" cmd)))))))))
+      (native-inputs (list scdoc))
+      (inputs
+       (list coreutils-minimal
+             grim
+             jq
+             libnotify
+             slurp
+             hyprland
+             hyprpicker
+             wl-clipboard))
+      (home-page "https://github.com/hyprwm/contrib")
+      (synopsis "Screenshot utility for Hyprland")
+      (description
+       "This package provides a Hyprland version of @code{grimshot} for
+screenshoting.")
+      (license license:expat))))
+
 (define-public grimshot
   (package
     (name "grimshot")