From patchwork Tue Jul 26 20:48:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antero Mejr X-Patchwork-Id: 4073 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 426A327BBEA; Tue, 26 Jul 2022 21:50:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 81EFA27BBE9 for ; Tue, 26 Jul 2022 21:50:33 +0100 (BST) Received: from localhost ([::1]:55786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGRVg-0006Hj-I9 for patchwork@mira.cbaines.net; Tue, 26 Jul 2022 16:50:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGRVC-0006Fe-A1 for guix-patches@gnu.org; Tue, 26 Jul 2022 16:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGRVC-0007RJ-0k for guix-patches@gnu.org; Tue, 26 Jul 2022 16:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGRVB-00079b-Kx for guix-patches@gnu.org; Tue, 26 Jul 2022 16:50:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56770] [PATCH v3] gnu: Add grimshot. References: <20220725205412.336878-1-antero@mailbox.org> In-Reply-To: <20220725205412.336878-1-antero@mailbox.org> Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Jul 2022 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56770 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56770@debbugs.gnu.org Cc: Antero Mejr , maximedevos@telenet.be Received: via spool by 56770-submit@debbugs.gnu.org id=B56770.165886855927423 (code B ref 56770); Tue, 26 Jul 2022 20:50:01 +0000 Received: (at 56770) by debbugs.gnu.org; 26 Jul 2022 20:49:19 +0000 Received: from localhost ([127.0.0.1]:54491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGRUV-00078E-Gc for submit@debbugs.gnu.org; Tue, 26 Jul 2022 16:49:19 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:40528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGRUR-00077s-0z for 56770@debbugs.gnu.org; Tue, 26 Jul 2022 16:49:17 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4LsptC4TF9z9sQB; Tue, 26 Jul 2022 22:49:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1658868547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3rThQbzp8uCdx47yju3nqUczh9CXOdEhbVFJRxHo0GM=; b=ush6JQaE6x45bDtd3XSEQ0C8GgyXhAs0nO99sjN4wYfJ+hONmcieNx28ClaZ99USGFElqu auAo3iimIRj1rLA3xWtgPSG2lIEy5WakdERgTSP+DLqMHpS8lrfnFG5SYeoighEUn6r+G2 vVeyY60Iouc1x+yoNEt18eIBschTZRZfbwbCNKXL6c7zOpjiwChQmxWXgxow0RmF8O2HFP QvceLEZQ41lLoC/8kTIR+0OFUr4SpWrHjG8THhpOH9uR4hQwlMxg1H9K14nNx8qNr6A5VH m2gx15pXIXqJQj52XdVeHZv3JZLNXcxDHxkebnO5k9edl4v7wYBjyIYNdeEGpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1658868545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3rThQbzp8uCdx47yju3nqUczh9CXOdEhbVFJRxHo0GM=; b=jijbxZqEeyq9xH81XY5Ng2U5OvHZvj+bFPQz6p0qhujU5pi8T/+GUv7SRNVsCJSYxbCkG9 upJvc+Sfc6VMszS25YMjWJgSC60Eti8RJI8NrYK1HMMNs8ffQ9fymFI9kXk4VtCYXahzqW b3m3Un4wAZSrqjLYk17OLR+FeIsyXmH+q//qnNhnMc23gwg6VtRIqEBfRAaXabDYbnFrsn 4zlEPEGxBQbxlAMWccwTe5fKjyPAsbIapIlBySm1ty+9MK34S4CwgaNOq4kowWEu0Njv9i ky+zUYBb+Iw7AL4HT0/o5eRqMuz8Tns30wcxOGeI1Mr5N/pJsrj1FlxeHuYB6Q== Date: Tue, 26 Jul 2022 16:48:58 -0400 Message-Id: <20220726204858.442904-1-antero@mailbox.org> MIME-Version: 1.0 X-MBO-RS-META: c7ad9df615r9pgtxka8qmoeza5o3o4if X-MBO-RS-ID: f50ce3a7b8b0755c8b1 X-Rspamd-Queue-Id: 4LsptC4TF9z9sQB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches X-Patchwork-Original-From: Antero Mejr via Guix-patches via From: Antero Mejr X-getmail-retrieved-from-mailbox: Patches * gnu/packages/wm.scm (grimshot): New variable. --- gnu/packages/wm.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 8fef7de77b..aa5aa8d1ec 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -2742,3 +2742,46 @@ (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") + (source (origin + (inherit (package-source sway)) + (snippet #~(delete-file "contrib/grimshot.1")))) + (build-system copy-build-system) + (arguments + (list #:install-plan #~`(("grimshot" "bin/") + ("grimshot.1" "usr/share/man/man1/")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "contrib"))) + (add-after 'chdir 'patch-script-dependencies + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "grimshot" + (("\\b(date|grim|jq|notify-send|slurp|swaymsg|wl-copy)\\b" + _ binary) + (search-input-file + inputs (string-append "bin/" binary)))))) + (add-after 'patch-script-dependencies 'build-man-page + (lambda _ + (with-input-from-file "grimshot.1.scd" + (lambda _ + (with-output-to-file "grimshot.1" + (lambda _ + (invoke "scdoc")))))))))) + (native-inputs (list scdoc)) + (inputs (list coreutils + grim + jq + libnotify + slurp + 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.")))