[PATCH] gnu: Add snooze.

  • Done
  • quality assurance status badge
Details
3 participants
  • jgart
  • Nicolas Goaziou
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
jgart
Severity
normal
J
(address . guix-patches@gnu.org)(name . jgart)(address . jgart@dismail.de)
20211010075339.22230-1-jgart@dismail.de
* gnu/packages/suckless.scm (snooze): New variable.
---
gnu/packages/suckless.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b24eced379..1643c89990 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -873,6 +873,37 @@ It is a front end for ii-like chat programs. It uses @code{tail -f} to get the
chat output in the background.")
(license license:isc))))
+(define-public snooze
+ (package
+ (name "snooze")
+ (version "0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/leahneukirchen/snooze")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "02ng3r1gzgpyjia4b60i11dj5bhn3xjsdcbwmxaam6dzb33dmgib"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ (string-append "DESTDIR=" %output)
+ "PREFIX=")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://github.com/leahneukirchen/snooze")
+ (synopsis "Run a command at a particular time")
+ (description
+"@command{snooze} is a new tool for waiting until a particular time and then
+running a command.")
+ (license license:cc0)))
+
(define-public scron
(package
(name "scron")
--
2.33.0
N
N
Nicolas Goaziou wrote on 13 Oct 2021 21:28
(name . jgart via Guix-patches via)(address . guix-patches@gnu.org)
87mtnc7mhb.fsf@nicolasgoaziou.fr
Hello,

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

Toggle quote (2 lines)
> * gnu/packages/suckless.scm (snooze): New variable.

Thank you. Some comments follow.

Toggle quote (3 lines)
> + (arguments
> + `(#:tests? #f

Could you add a comment explaining why tests are disabled? I assume
upstream does not provide any.

Toggle quote (5 lines)
> + #:make-flags
> + (list (string-append "CC=" ,(cc-for-target))
> + (string-append "DESTDIR=" %output)
> + "PREFIX=")

It may be worth explaining in a comment why PREFIX is reset.

Toggle quote (9 lines)
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure))))
> + (home-page "https://github.com/leahneukirchen/snooze")
> + (synopsis "Run a command at a particular time")
> + (description
> +"@command{snooze} is a new tool for waiting until a particular time and then
> +running a command.")

I would remove "new" from the description.

Otherwise, LGTM. Could you send an updated patch?

Regards,
--
Nicolas Goaziou
J
[PATCH] gnu: Add snooze.
(address . 51113@debbugs.gnu.org)
20211013212808.10334-1-jgart@dismail.de
Hi Nicolas, thanks for reviewing the patch.

Here's a new patch with your suggestions.

* gnu/packages/suckless.scm (snooze): New variable.
---
gnu/packages/suckless.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b24eced379..d207a2300b 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -873,6 +873,39 @@ It is a front end for ii-like chat programs. It uses @code{tail -f} to get the
chat output in the background.")
(license license:isc))))
+(define-public snooze
+ (package
+ (name "snooze")
+ (version "0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/leahneukirchen/snooze")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "02ng3r1gzgpyjia4b60i11dj5bhn3xjsdcbwmxaam6dzb33dmgib"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; There are no tests.
+ #:make-flags
+ (list (string-append "CC=" ,(cc-for-target))
+ (string-append "DESTDIR=" %output)
+ ;; Set prefix path to root of package path in store instead
+ ;; of /usr/local.
+ (string-append "PREFIX=" %output))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://github.com/leahneukirchen/snooze")
+ (synopsis "Run a command at a particular time")
+ (description
+"@command{snooze} is a tool for waiting until a particular time and then
+running a command.")
+ (license license:cc0)))
+
(define-public scron
(package
(name "scron")
--
2.33.0
J
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 51113@debbugs.gnu.org)
20211019021620.GB8758@gac.attlocal.net
On Wed, 13 Oct 2021 21:28:48 +0200 Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Toggle quote (34 lines)
> Hello,
>
> jgart via Guix-patches via <guix-patches@gnu.org> writes:
>
> > * gnu/packages/suckless.scm (snooze): New variable.
>
> Thank you. Some comments follow.
>
> > + (arguments
> > + `(#:tests? #f
>
> Could you add a comment explaining why tests are disabled? I assume
> upstream does not provide any.
>
> > + #:make-flags
> > + (list (string-append "CC=" ,(cc-for-target))
> > + (string-append "DESTDIR=" %output)
> > + "PREFIX=")
>
> It may be worth explaining in a comment why PREFIX is reset.
>
> > + #:phases
> > + (modify-phases %standard-phases
> > + (delete 'configure))))
> > + (home-page "https://github.com/leahneukirchen/snooze")
> > + (synopsis "Run a command at a particular time")
> > + (description
> > +"@command{snooze} is a new tool for waiting until a particular time and then
> > +running a command.")
>
> I would remove "new" from the description.
>
> Otherwise, LGTM. Could you send an updated patch?

Hi Nicolas,

I forgot to CC you.

The updated patch is above. Thank you for taking the time to review the patch.

all best,

jgart
N
N
Nicolas Goaziou wrote on 22 Oct 2021 00:13
Re: [PATCH] gnu: Add snooze.
(name . jgart)(address . jgart@dismail.de)(address . 51113-done@debbugs.gnu.org)
87k0i6vxfj.fsf@nicolasgoaziou.fr
Hello,

jgart <jgart@dismail.de> writes:

Toggle quote (6 lines)
> Hi Nicolas, thanks for reviewing the patch.
>
> Here's a new patch with your suggestions.
>
> * gnu/packages/suckless.scm (snooze): New variable.

Applied. Thank you.

Regards,
--
Nicolas Goaziou
Closed
T
T
Tobias Geerinckx-Rice wrote on 27 Oct 2021 00:13
Re: bug#51424: snooze: malformed installation path
(name . Christopher Howard)(address . christopher@librehacker.com)
87a6ivl8u0.fsf@nckx
Christopher, jgart, Nicolas,

Christopher Howard ???
Toggle quote (2 lines)
> the path to the binary is malformed:

Indeed it was.

DESTDIR does not mean ‘final destination’; it's meant as a
temporary install-time ‘staging’ directory whose contents are
expected to move back to / later. For example, ‘make install
DESTDIR=/tmp/my-package-manager-output && cd
/tmp/my-package-manager-output && tar cf foo.pkg .’. Guix does
not use this packaging method.

Setting DESTDIR in Guix is almost always a bug. The few places in
Guix where it is used are using it as a hack around buggy build
systems. It just happens to work (because, well, the build
system's buggy).

When reviewing patches, I find the ‘tree’ command very useful to
immediately spot such weirdness. Much more so than ‘ls -R’.
YMMV.

Fixed in commit 89d8417b371f3918f0508bbc561675ec100a6add.

Thanks!

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYXiBBw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15/ToBAJ3U9FOfWPmJV6XU2d5P/nEIpIL8yc6flqYYyBS4
/VR+APwPjRMOfR4OzxYDAtIDRwqc6FsQI2ZHv/kZvqGOe1GsDA==
=B9PA
-----END PGP SIGNATURE-----

J
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
20211026200322.GB9051@gac.attlocal.net
On Wed, 27 Oct 2021 00:13:47 +0200 Tobias Geerinckx-Rice <me@tobias.gr> wrote:
Toggle quote (29 lines)
> Christopher, jgart, Nicolas,
>
> Christopher Howard ???
> > the path to the binary is malformed:
>
> Indeed it was.
>
> DESTDIR does not mean ‘final destination’; it's meant as a
> temporary install-time ‘staging’ directory whose contents are
> expected to move back to / later. For example, ‘make install
> DESTDIR=/tmp/my-package-manager-output && cd
> /tmp/my-package-manager-output && tar cf foo.pkg .’. Guix does
> not use this packaging method.
>
> Setting DESTDIR in Guix is almost always a bug. The few places in
> Guix where it is used are using it as a hack around buggy build
> systems. It just happens to work (because, well, the build
> system's buggy).
>
> Fixed in commit 89d8417b371f3918f0508bbc561675ec100a6add.
>
> Thanks!
>
> T G-R

> When reviewing patches, I find the ‘tree’ command very useful to
> immediately spot such weirdness. Much more so than ‘ls -R’.
> YMMV.

I use nnn or another file manager like broot sometimes but this one escaped me.

Thanks for fixing that. I was actually going to send a patch fix for it but had
not found the time. I noticed it after the patch was accepted.

Thanks!

all best,

jgart
?