[PATCH] gnu: Add wf-shadow

  • Open
  • quality assurance status badge
Details
2 participants
  • cobra
  • Jelle Licht
Owner
unassigned
Submitted by
cobra
Severity
normal
C
(address . guix-patches@gnu.org)(name . Skylar "The Cobra" Widulski)(address . cobra@vern.cc)
20230518040259.16837-1-cobra@vern.cc
From: "Skylar \"The Cobra\" Widulski" <cobra@vern.cc>

Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
---
gnu/packages/video.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 0abc153c60..f31eee4a43 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -64,6 +64,7 @@
;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
;;; Copyright © 2022 Andy Tai <atai@atai.org>
;;; Copyright © 2023 Ott Joon <oj@vern.cc>
+;;; Copyright © 2023 Skylar Widulski <cobra@vern.cc>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -202,6 +203,7 @@ (define-module (gnu packages video)
#:use-module (gnu packages web)
#:use-module (gnu packages webkit)
#:use-module (gnu packages wget)
+ #:use-module (gnu packages wm)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
@@ -5658,3 +5660,32 @@ (define-public svtplay-dl
broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
others.")
(license license:expat)))
+
+(define-public wf-shadow
+ (package
+ (name "wf-shadow")
+ (version "1.5.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://codeberg.org/cobra/wf-shadow")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qyf1w9vw5xswf9vw1267l5zh1dckilbmcm7qj1v762n2saw103p"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("wf-shadow" "bin/")
+ ("wf-shadow-tui" "bin/")
+ ("doc/wf-shadow.1" "share/man/man1/")
+ ("doc/wf-shadow-tui.1" "share/man/man1/"))))
+ (inputs (list bash wf-recorder wofi dialog wlr-randr))
+ (home-page "https://codeberg.org/cobra/wf-shadow")
+ (synopsis "Make instant-replay easy on wlroots based compositors")
+ (description
+ "@code{wf-shadow} is a script written in order to fill the void in
+instant-replay software for Wayland, specifically wlroots compositors. It uses
+wf-recorder and wofi in order to accomplish the task.")
+ (license license:gpl3+)))
--
2.40.1
J
J
Jelle Licht wrote on 20 Jun 2023 23:02
(address . 63567@debbugs.gnu.org)(name . Skylar The Cobra Widulski)(address . cobra@vern.cc)
877crx7sps.fsf@fsfe.org
Hi cobra,

Thanks for the patch! Some comments follow.

cobra--- via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (5 lines)
> From: "Skylar \"The Cobra\" Widulski" <cobra@vern.cc>
>

> Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>

In guix, the committer adds the 'Signed-off-by' line to commits, so you
can leave that out. We also have some of our own conventions w.r.t.
formatting our commits logs:


Toggle quote (22 lines)
> ---
> gnu/packages/video.scm | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 0abc153c60..f31eee4a43 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -64,6 +64,7 @@
> ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
> ;;; Copyright © 2022 Andy Tai <atai@atai.org>
> ;;; Copyright © 2023 Ott Joon <oj@vern.cc>
> +;;; Copyright © 2023 Skylar Widulski <cobra@vern.cc>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -202,6 +203,7 @@ (define-module (gnu packages video)
> #:use-module (gnu packages web)
> #:use-module (gnu packages webkit)
> #:use-module (gnu packages wget)
> + #:use-module (gnu packages wm)

This would introduce an import cycle. WDYT about adding wf-shadow to
(gnu packages wm)'s wm.scm instead?

Toggle quote (30 lines)
> #:use-module (gnu packages wxwidgets)
> #:use-module (gnu packages xdisorg)
> #:use-module (gnu packages xiph)
> @@ -5658,3 +5660,32 @@ (define-public svtplay-dl
> broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
> others.")
> (license license:expat)))
> +
> +(define-public wf-shadow
> + (package
> + (name "wf-shadow")
> + (version "1.5.5")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://codeberg.org/cobra/wf-shadow")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1qyf1w9vw5xswf9vw1267l5zh1dckilbmcm7qj1v762n2saw103p"))))
> + (build-system copy-build-system)
> + (arguments
> + '(#:install-plan
> + '(("wf-shadow" "bin/")
> + ("wf-shadow-tui" "bin/")
> + ("doc/wf-shadow.1" "share/man/man1/")
> + ("doc/wf-shadow-tui.1" "share/man/man1/"))))
> + (inputs (list bash wf-recorder wofi dialog wlr-randr))

These inputs currently don't do much; there are multiple ways around
this. One way is already used in the grimshot package expression (guix
edit grimshot) to patch references to other command-line tools, and it
uses the copy-build-system as well. You could have a look at it for
inspiration.

AFAICS you can also leave out the

Toggle quote (7 lines)
> + (synopsis "Make instant-replay easy on wlroots based compositors")
> + (description
> + "@code{wf-shadow} is a script written in order to fill the void in
> +instant-replay software for Wayland, specifically wlroots compositors. It uses
> +wf-recorder and wofi in order to accomplish the task.")

Could you add @code{} to wlroots, wf-recorder and wofi as well? I think
having a descriptive first sentence would also help users find wf-shadow
more easily. The current opener seems to focus on the reason why it was
created.

Cheers,
Jelle
J
J
Jelle Licht wrote on 20 Jun 2023 23:03
(address . 63567@debbugs.gnu.org)(name . Skylar The Cobra Widulski)(address . cobra@vern.cc)
874jn17sns.fsf@fsfe.org
Jelle Licht <jlicht@fsfe.org> writes:

Toggle quote (3 lines)
> Hi cobra,
>
> Thanks for the patch! Some comments follow.
[snip]

Toggle quote (1 lines)
> AFAICS you can also leave out the
^ bash.

Toggle quote (2 lines)
> Cheers,
> Jelle
?