GNU bug report logs -
#69743
[PATCH] update grimshot package definition
Previous Next
Reported by: Ignas Lapėnas <ignas <at> lapenas.dev>
Date: Tue, 12 Mar 2024 12:16:01 UTC
Severity: normal
Tags: patch
Done: Jack Hill <jackhill <at> jackhill.us>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69743 in the body.
You can then email your comments to 69743 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 12:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ignas Lapėnas <ignas <at> lapenas.dev>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 12 Mar 2024 12:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Issue: https://issues.guix.gnu.org/69667
Grimshot was dropped from sway.
https://github.com/swaywm/sway/issues/7405
The contrib was moved to:
https://github.com/OctopusET/sway-contrib
Package definition updated accordingly.
Change-Id: I9ed9cdf7ce10fe878b4f2b931791ed22a63ff99a
---
gnu/packages/wm.scm | 60 +++++++++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index edbb3096b8..eeaee0cb68 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -3524,46 +3524,52 @@ (define-public avizo
(define-public grimshot
(package
- (inherit sway)
(name "grimshot")
- (source (origin
- (inherit (package-source sway))
- (snippet #~(delete-file "contrib/grimshot.1"))))
+ (version "1.9-contrib.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/OctopusET/sway-contrib")
+ (commit version)))
+ (sha256
+ (base32 "16fa8l81zjy25nsky1i525hb7zjprqz74mbirm9b76pvksschdv5"))))
(build-system copy-build-system)
(arguments
- (list #:install-plan #~`(("grimshot" "bin/")
- ("grimshot.1" "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"))))))))))
+ (list
+ #:install-plan #~`(("grimshot" "bin/")
+ ("grimshot.1" "share/man/man1/"))
+ #:phases #~(modify-phases %standard-phases
+ (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))
+ (propagated-inputs (list grim))
+ (home-page "https://github.com/OctopusET/sway-contrib")
(synopsis "Screenshot utility for the Sway window manager")
- (description "Grimshot is a screenshot utility for @code{sway}. It provides
+ (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.")))
+file.")
+ (license license:expat)))
(define-public wld
(let ((commit "6586736176ef50a88025abae835e29a7ca980126")
base-commit: 4003c60abf7a6e59e47cc2deb9eef2f104ebb994
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 13:30:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 69743 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 12 Mar 2024, Ignas Lapėnas wrote:
> Issue: https://issues.guix.gnu.org/69667
>
> Grimshot was dropped from sway.
> https://github.com/swaywm/sway/issues/7405
>
> The contrib was moved to:
> https://github.com/OctopusET/sway-contrib
>
> Package definition updated accordingly.
>
> Change-Id: I9ed9cdf7ce10fe878b4f2b931791ed22a63ff99a
> ---
> gnu/packages/wm.scm | 60 +++++++++++++++++++++++++--------------------
> 1 file changed, 33 insertions(+), 27 deletions(-)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index edbb3096b8..eeaee0cb68 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -3524,46 +3524,52 @@ (define-public avizo
I haven't had a chance to test on a system yet, but thanks for preparing
this, reading through it it looks good.
> + (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"))))))))))
I'm happy to see this improvement of building the manpage from source.
> (native-inputs (list scdoc))
> (inputs (list coreutils
> - grim
> jq
> libnotify
> slurp
> sway
> wl-clipboard))
> + (propagated-inputs (list grim))
For my curiosity, what's the benefit of propagating grim? It looks like
the full bath is also being substituted in the script?
Thanks!
Jack
Information forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 16:28:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 69743 <at> debbugs.gnu.org (full text, mbox):
Hi, this is a first patch for me. Just to be clear, I'm still a newb
with Guix and Guile. All feedback is greatly appreciated. Thank You :)
> I'm happy to see this improvement of building the manpage from source.
This part was not written by me. Last package definition version had a
chdir to the contrib directory step, to correctly copy over required
files. Since now the contrib directory is directly downloaded from
github it was no longer necessary. (that was the part removed)
> For my curiosity, what's the benefit of propagating grim? It looks
> like the full bath is also being substituted in the script?
While running the ./pre-inst-env to check if the package still works
correctly, I had an error that grim was not found. After a quick read on
the manual, noticed that propogated inputs actually copy it over.
It seems that my mistake is probably due to not updating this part.
#+BEGIN_EXAMPLE
(add-after 'chdir 'patch-script-dependencies
#+END_EXAMPLE
since chdir stage was removed it might have possibly skipped other steps
altogether. I'll look into it some more how it works exactly and try to
provide a new patch.
Jack Hill <jackhill <at> jackhill.us> writes:
> [1. text/plain]
> On Tue, 12 Mar 2024, Ignas Lapėnas wrote:
>
>> Issue: https://issues.guix.gnu.org/69667
>>
>> Grimshot was dropped from sway.
>> https://github.com/swaywm/sway/issues/7405
>>
>> The contrib was moved to:
>> https://github.com/OctopusET/sway-contrib
>>
>> Package definition updated accordingly.
>>
>> Change-Id: I9ed9cdf7ce10fe878b4f2b931791ed22a63ff99a
>> ---
>> gnu/packages/wm.scm | 60 +++++++++++++++++++++++++--------------------
>> 1 file changed, 33 insertions(+), 27 deletions(-)
>>
>> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
>> index edbb3096b8..eeaee0cb68 100644
>> --- a/gnu/packages/wm.scm
>> +++ b/gnu/packages/wm.scm
>> @@ -3524,46 +3524,52 @@ (define-public avizo
>
> I haven't had a chance to test on a system yet, but thanks for
> preparing this, reading through it it looks good.
>
>> + (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"))))))))))
>
> I'm happy to see this improvement of building the manpage from source.
>
>> (native-inputs (list scdoc))
>> (inputs (list coreutils
>> - grim
>> jq
>> libnotify
>> slurp
>> sway
>> wl-clipboard))
>> + (propagated-inputs (list grim))
>
> For my curiosity, what's the benefit of propagating grim? It looks
> like the full bath is also being substituted in the script?
>
> Thanks!
> Jack
--
Pagarbiai,
Ignas Lapėnas
Information forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 16:28:04 GMT)
Full text and
rfc822 format available.
Message #14 received at 69743 <at> debbugs.gnu.org (full text, mbox):
Issue: https://issues.guix.gnu.org/69667
Grimshot was dropped from sway.
https://github.com/swaywm/sway/issues/7405
The contrib was moved to:
https://github.com/OctopusET/sway-contrib
Package definition updated accordingly.
Change-Id: I9ed9cdf7ce10fe878b4f2b931791ed22a63ff99a
---
gnu/packages/wm.scm | 58 +++++++++++++++++++++++++--------------------
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index edbb3096b8..bb9926d53a 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -3524,33 +3524,36 @@ (define-public avizo
(define-public grimshot
(package
- (inherit sway)
(name "grimshot")
- (source (origin
- (inherit (package-source sway))
- (snippet #~(delete-file "contrib/grimshot.1"))))
+ (version "1.9-contrib.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/OctopusET/sway-contrib")
+ (commit version)))
+ (sha256
+ (base32 "16fa8l81zjy25nsky1i525hb7zjprqz74mbirm9b76pvksschdv5"))))
(build-system copy-build-system)
(arguments
- (list #:install-plan #~`(("grimshot" "bin/")
- ("grimshot.1" "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"))))))))))
+ (list
+ #:install-plan #~`(("grimshot" "bin/")
+ ("grimshot.1" "share/man/man1/"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack '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
@@ -3559,11 +3562,14 @@ (define-public grimshot
slurp
sway
wl-clipboard))
+ (home-page "https://github.com/OctopusET/sway-contrib")
(synopsis "Screenshot utility for the Sway window manager")
- (description "Grimshot is a screenshot utility for @code{sway}. It provides
+ (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.")))
+file.")
+ (license license:expat)))
(define-public wld
(let ((commit "6586736176ef50a88025abae835e29a7ca980126")
base-commit: 4003c60abf7a6e59e47cc2deb9eef2f104ebb994
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 16:28:04 GMT)
Full text and
rfc822 format available.
Message #17 received at 69743 <at> debbugs.gnu.org (full text, mbox):
Updated the patch and sent to this issue. Seems like the initial idea
was true about skipping phases, since now it correctly works without
propagated-input. Sorry about the mess-up from my part.
--
Best Regards,
Ignas Lapėnas
Information forwarded
to
guix-patches <at> gnu.org
:
bug#69743
; Package
guix-patches
.
(Tue, 12 Mar 2024 18:15:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 69743 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 12 Mar 2024, Ignas Lapėnas wrote:
> Updated the patch and sent to this issue. Seems like the initial idea
> was true about skipping phases, since now it correctly works without
> propagated-input. Sorry about the mess-up from my part.
No worries, I'm happy we were able to collaborate. And thank you for
proposing the fix, it saves the rest of us from needing to do so.
Best,
Jack
Reply sent
to
Jack Hill <jackhill <at> jackhill.us>
:
You have taken responsibility.
(Thu, 21 Mar 2024 01:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ignas Lapėnas <ignas <at> lapenas.dev>
:
bug acknowledged by developer.
(Thu, 21 Mar 2024 01:40:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 69743-done <at> debbugs.gnu.org (full text, mbox):
Looks like grimshot was updated in a sparate commit in
fcf0fc0f33e6fc4ac96e585db5b048be620c3438
Thanks!
Jack
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 18 Apr 2024 11:26:30 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.