all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56770] [PATCH] gnu: Add grimshot.
@ 2022-07-25 20:54 Antero Mejr via Guix-patches via
  2022-07-26 15:46 ` Maxime Devos
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Antero Mejr via Guix-patches via @ 2022-07-25 20:54 UTC (permalink / raw)
  To: 56770; +Cc: Antero Mejr

* gnu/packages/wm.scm (grimshot): New variable.
---
 gnu/packages/wm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8fef7de77b..9aad6c1c37 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -2742,3 +2742,38 @@ (define-public avizo
      "Avizo is a simple notification daemon for Sway, mainly intended to be
 used for multimedia keys.")
     (license license:gpl3+)))
+
+(define-public grimshot
+  (package
+    (inherit sway)
+    (name "grimshot")
+    (build-system trivial-build-system)
+    (arguments
+     (list
+      #:modules '((guix build utils))
+      #:builder
+      #~(begin
+          (use-modules (guix build utils))
+          (copy-recursively
+           (string-append #$(package-source this-package) "/contrib") ".")
+          (substitute* "grimshot"
+            (("date ") (string-append #$coreutils "/bin/date "))
+            (("jq ") (string-append #$jq "/bin/jq "))
+            (("swaymsg ") (string-append #$sway "/bin/swaymsg "))
+            (("notify-send ") (string-append #$libnotify "/bin/notify-send "))
+            (("grim ") (string-append #$grim "/bin/grim "))
+            (("slurp ") (string-append #$slurp "/bin/slurp "))
+            (("wl-copy ") (string-append #$wl-clipboard "/bin/wl-copy ")))
+          (delete-file "grimshot.1")
+          (system
+           (string-append #$scdoc "/bin/scdoc < grimshot.1.scd > grimshot.1"))
+          (install-file "grimshot" (string-append #$output "/bin"))
+          (install-file "grimshot.1"
+                        (string-append #$output "/usr/share/man/man1")))))
+    (native-inputs (list scdoc))
+    (inputs (list coreutils grim jq libnotify sway wl-clipboard))
+    (synopsis "Screenshot utility for the Sway window manager")
+    (description "Grimshot is a screenshot utility for @code{sway}.  It provides
+an interface over @code{grim}, @code{slurp} and @code{jq}, and supports storing
+the screenshot either directly to the clipboard using @code{wl-copy} or to a
+file.")))
-- 
2.37.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-27 18:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 20:54 [bug#56770] [PATCH] gnu: Add grimshot Antero Mejr via Guix-patches via
2022-07-26 15:46 ` Maxime Devos
2022-07-26 15:52   ` Maxime Devos
2022-07-26 15:49 ` Maxime Devos
2022-07-26 17:58 ` [bug#56770] [PATCH v2] " Antero Mejr via Guix-patches via
2022-07-26 18:17   ` Maxime Devos
2022-07-26 18:29   ` Maxime Devos
2022-07-26 20:48 ` [bug#56770] [PATCH v3] " Antero Mejr via Guix-patches via
2022-07-26 22:06   ` [bug#56770] LGTM: [PATCH v3] gnu: Add grimshot. (LGTM) Maxime Devos
2022-07-27 18:42     ` bug#56770: " Liliana Marie Prikler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.