* [bug#55874] [PATCH] Add timewarrior 1.4.3
@ 2022-06-09 15:11 Zac Berkowitz
2022-06-09 19:50 ` Maxime Devos
` (10 more replies)
0 siblings, 11 replies; 21+ messages in thread
From: Zac Berkowitz @ 2022-06-09 15:11 UTC (permalink / raw)
To: 55874
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-gnu-Add-timewarrior.patch --]
[-- Type: text/x-patch, Size: 2559 bytes --]
From dc3cd50a62ddce3fcc2ea9c374036192411b833a Mon Sep 17 00:00:00 2001
From: Zac Berkowitz <zac.berkowitz@gmail.com>
Date: Fri, 13 May 2022 11:56:51 -0400
Subject: [PATCH] gnu: Add timewarrior.
* gnu/packages/task-management.scm (timewarrior): New variable
---
gnu/packages/task-management.scm | 38 ++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm
index aeedbfbe6a..3a21c1a44d 100644
--- a/gnu/packages/task-management.scm
+++ b/gnu/packages/task-management.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages task-management)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages ruby)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (guix download)
@@ -145,6 +146,43 @@ (define-public taskwarrior
and querying data, exposing task data in multiple formats to other tools.")
(license license:expat)))
+(define-public timewarrior
+ (package
+ (name "timewarrior")
+ (version "1.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v" version
+ "/timew-" version ".tar.gz"))
+ (sha256 (base32
+ "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("ruby-asciidoctor" ,ruby-asciidoctor)
+ ("python" ,python)))
+ (inputs
+ `(("gnutls" ,gnutls)
+ ("util-linux:lib" ,util-linux "lib")))
+ ;; (list gnutls
+ ;; `(,util-linux "lib")))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'install-license-files) ; Already installed by package
+ (add-after 'patch-source-shebangs 'patch-cmake-shell
+ (lambda _
+ (substitute* "src/commands/CMakeLists.txt"
+ (("/bin/sh") (which "sh"))))))))
+ (home-page "https://timewarrior.net")
+ (synopsis "Command line utility to track and report time")
+ (description
+ "Timewarrior is a command line time tracking application, which allows
+you to record time spent on activities. You may be tracking your time for
+curiosity, or because your work requires it.")
+ (license license:expat)))
+
(define-public worklog
(let ((commit "0f545ad6697ef4de7f68d92cd7cc5c6a4c60517b")
(revision "1"))
--
2.36.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
@ 2022-06-09 19:50 ` Maxime Devos
2022-06-09 19:53 ` Maxime Devos
` (9 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 19:50 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (method url-fetch)
> + (uri (string-append
> +
> "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v
> " version
> + "/timew-" version ".tar.gz"))
> + (sha256 (base32
> +
> "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4"))))
I can confirm the hash matches, and hashing the file with sha256sum
agrees with the hash mentioned on <https://timewarrior.net/releases/>.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
2022-06-09 19:50 ` Maxime Devos
@ 2022-06-09 19:53 ` Maxime Devos
2022-06-09 19:55 ` Maxime Devos
` (8 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 19:53 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (native-inputs
> + `(("ruby-asciidoctor" ,ruby-asciidoctor)
> + ("python" ,python)))
> + (inputs
> + `(("gnutls" ,gnutls)
> + ("util-linux:lib" ,util-linux "lib")))
Nowadays, these can be simplified to.
(native-inputs (list ruby-asciidoctor python))
Where did you learn about the old form?
Likewise (if I remember the syntax right):
(list gnutls `(,util-linux "lib"))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
2022-06-09 19:50 ` Maxime Devos
2022-06-09 19:53 ` Maxime Devos
@ 2022-06-09 19:55 ` Maxime Devos
2022-06-09 19:56 ` Maxime Devos
` (7 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 19:55 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
+ (delete 'install-license-files) ; Already installed by
package
Not a problem I think -- at worst, the license file will appear twice,
but identical files are automatically deduplicated, and even if not, they
are relatively small files anyway.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (2 preceding siblings ...)
2022-06-09 19:55 ` Maxime Devos
@ 2022-06-09 19:56 ` Maxime Devos
2022-06-09 20:01 ` Maxime Devos
` (6 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 19:56 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (substitute* "src/commands/CMakeLists.txt"
> + (("/bin/sh") (which "sh"))))))))
In this context, (which "sh") can maybe be simplified to just "sh", not
that it really matters.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (3 preceding siblings ...)
2022-06-09 19:56 ` Maxime Devos
@ 2022-06-09 20:01 ` Maxime Devos
2022-06-09 20:06 ` Maxime Devos
` (5 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:01 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 315 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> * gnu/packages/task-management.scm (timewarrior): New variable
This contains a binary src/libshared/src/wcwidth.h, which should be
built from source with the generator
https://github.com/ridiculousfish/widecharwidth/ instead.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (4 preceding siblings ...)
2022-06-09 20:01 ` Maxime Devos
@ 2022-06-09 20:06 ` Maxime Devos
2022-06-09 20:08 ` Maxime Devos
` (4 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:06 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> * gnu/packages/task-management.scm (timewarrior): New variable
This package is irreproducible, see
https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/patches/time-sensitive-tests.patch
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (5 preceding siblings ...)
2022-06-09 20:06 ` Maxime Devos
@ 2022-06-09 20:08 ` Maxime Devos
2022-06-09 20:09 ` Maxime Devos
` (3 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:08 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (native-inputs
> + `(("ruby-asciidoctor" ,ruby-asciidoctor)
> + ("python" ,python)))
According to Debian, additional (native-)inputs are required:
https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/tests/control
Are the tests actually run and can the man page be read?
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (6 preceding siblings ...)
2022-06-09 20:08 ` Maxime Devos
@ 2022-06-09 20:09 ` Maxime Devos
2022-06-09 20:10 ` Maxime Devos
` (2 subsequent siblings)
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:09 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 485 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (method url-fetch)
> + (uri (string-append
> +
> "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v
> " version
> + "/timew-" version ".tar.gz"))
> + (sha256 (base32
The tests are missing:
https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/README.source
so maybe use the source code on git instead?
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (7 preceding siblings ...)
2022-06-09 20:09 ` Maxime Devos
@ 2022-06-09 20:10 ` Maxime Devos
2022-06-09 20:12 ` Maxime Devos
2022-06-09 20:17 ` Maxime Devos
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:10 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (origin
> + (method url-fetch)
> + (uri (string-append
> +
> "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v
> " version
> + "/timew-" version ".tar.gz"))
> + (sha256 (base32
Is the bash completion installed in the right location?
According to Debian, it isn't:
https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/timewarrior.bash-completion
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (8 preceding siblings ...)
2022-06-09 20:10 ` Maxime Devos
@ 2022-06-09 20:12 ` Maxime Devos
2022-06-09 20:17 ` Maxime Devos
10 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:12 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> + (native-inputs
> + `(("ruby-asciidoctor" ,ruby-asciidoctor)
> + ("python" ,python)))
Are the scripts in ext/*.py installed somewhere? If so, 'python' needs
to be in 'inputs' instead for cross-compilation.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
` (9 preceding siblings ...)
2022-06-09 20:12 ` Maxime Devos
@ 2022-06-09 20:17 ` Maxime Devos
2022-06-10 1:36 ` Zac Berkowitz
10 siblings, 1 reply; 21+ messages in thread
From: Maxime Devos @ 2022-06-09 20:17 UTC (permalink / raw)
To: Zac Berkowitz, 55874
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
According to archlinux, there are some bogus man pages:
https://archlinuxarm.org/packages/aarch64/timew/files/PKGBUILD
are they absent here? (Also, archlinux has the same hash!)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-09 20:17 ` Maxime Devos
@ 2022-06-10 1:36 ` Zac Berkowitz
2022-06-10 7:49 ` Maxime Devos
0 siblings, 1 reply; 21+ messages in thread
From: Zac Berkowitz @ 2022-06-10 1:36 UTC (permalink / raw)
To: Maxime Devos; +Cc: 55874
Maxime,
Thanks for all of the great feedback -- seems like "works for me"
wasn't nearly good enough in this case! I'll chip away at these
issues next week when I've got some time. Is submitting a new patch
on this bug # the best way forward? Or should I close this and open a
new patch issue when it's ready?
Cheers,
Zac
On Thu, Jun 9, 2022 at 4:17 PM Maxime Devos <maximedevos@telenet.be> wrote:
>
> According to archlinux, there are some bogus man pages:
>
> https://archlinuxarm.org/packages/aarch64/timew/files/PKGBUILD
>
> are they absent here? (Also, archlinux has the same hash!)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 1:36 ` Zac Berkowitz
@ 2022-06-10 7:49 ` Maxime Devos
2022-06-10 14:04 ` Zac Berkowitz
0 siblings, 1 reply; 21+ messages in thread
From: Maxime Devos @ 2022-06-10 7:49 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
Zac Berkowitz schreef op do 09-06-2022 om 21:36 [-0400]:
> Maxime,
>
> Thanks for all of the great feedback -- seems like "works for me"
> wasn't nearly good enough in this case! I'll chip away at these
> issues next week when I've got some time. Is submitting a new patch
> on this bug # the best way forward? Or should I close this and open a
> new patch issue when it's ready?
Send it as a v2 to 55874@, then all the relevant information is kept
together at <https://issues.guix.gnu.org/55874>.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 7:49 ` Maxime Devos
@ 2022-06-10 14:04 ` Zac Berkowitz
2022-06-10 14:54 ` Maxime Devos
` (3 more replies)
0 siblings, 4 replies; 21+ messages in thread
From: Zac Berkowitz @ 2022-06-10 14:04 UTC (permalink / raw)
To: Maxime Devos; +Cc: 55874
Maxime,
Ended up having a bit of time today to look through what you brought
up. Thanks again for it!
>> + (native-inputs
>> + `(("ruby-asciidoctor" ,ruby-asciidoctor)
>> + ("python" ,python)))
>
> According to Debian, additional (native-)inputs are required:
>
> https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/tests/control
>
> Are the tests actually run and can the man page be read?
According to the source
(https://github.com/GothenburgBitFactory/timewarrior/blob/develop/INSTALL)
asciidoctor is required to build the docs, but python is not a
requirement at runtime.
I'm able to run the timew executable in a pure shell without moving
python to the input list, so this seems to be a debian issue?
The python scripts in ext/ are completely optional according to the
README in that same directory. Like taskwarrior, timewarrior can
execute python scripts as hooks in response to various commands, but
they're not necessary for base use.
Maybe this is why debian adds the python requirement? So hooks just
work out of the box? How does guix deal with optional dependencies
like this?
Tests are run and pass, but that doesn't rule out determinism issues,
I'll see what debian did to address that.
man pages are not available, I'll correct that.
>> + (native-inputs
>> + `(("ruby-asciidoctor" ,ruby-asciidoctor)
>> + ("python" ,python)))
>> + (inputs
>> + `(("gnutls" ,gnutls)
>> + ("util-linux:lib" ,util-linux "lib")))
>
> Nowadays, these can be simplified to.
>
> (native-inputs (list ruby-asciidoctor python))
>
> Where did you learn about the old form?
Wouldn't say "learn" - I'm very new to lisps! The code here is mostly
adapted from taskwarrior (same developer) and other snippets from
gnu/packages. I'm sure I grep'd for another package that required
asciidoctor and adapted their portion of the code.
>>+ (delete 'install-license-files) ; Already installed by
>> package
>
> Not a problem I think -- at worst, the license file will appear twice,
> but identical files are automatically deduplicated, and even if not, they
> are relatively small files anyway.
This is from taskwarrior from the same developer and has a similar
build setup. Seems like both packages should be consistent, but I'm
happy to remove this directive if needed.
>> + (substitute* "src/commands/CMakeLists.txt"
>> + (("/bin/sh") (which "sh"))))))))
>
> In this context, (which "sh") can maybe be simplified to just "sh", not
> that it really matters.
Ok.
On Fri, Jun 10, 2022 at 3:49 AM Maxime Devos <maximedevos@telenet.be> wrote:
>
> Zac Berkowitz schreef op do 09-06-2022 om 21:36 [-0400]:
> > Maxime,
> >
> > Thanks for all of the great feedback -- seems like "works for me"
> > wasn't nearly good enough in this case! I'll chip away at these
> > issues next week when I've got some time. Is submitting a new patch
> > on this bug # the best way forward? Or should I close this and open a
> > new patch issue when it's ready?
>
> Send it as a v2 to 55874@, then all the relevant information is kept
> together at <https://issues.guix.gnu.org/55874>.
>
> Greetings,
> Maxime.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 14:04 ` Zac Berkowitz
@ 2022-06-10 14:54 ` Maxime Devos
2022-06-10 14:56 ` Maxime Devos
` (2 subsequent siblings)
3 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-10 14:54 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]:
> The python scripts in ext/ are completely optional according to the
> README in that same directory. Like taskwarrior, timewarrior can
> execute python scripts as hooks in response to various commands, but
> they're not necessary for base use.
> Maybe this is why debian adds the python requirement? So hooks just
> work out of the box? How does guix deal with optional dependencies
> like this?
>
If it increases the closure size a lot and does not provide much extra
functionality, the extra dependency (and the components that require
that dependency) is removed. (Alternatively the ext/ scripts can be
changed to use the 'python' in $PATH instead of a baked-in 'python',
though such things are avoided where feasible for robustness).
Even if they are optional, adding python might be required such that
the _correct_ python is used when cross-compiling. As a test, you
could try running "guix gc --references" on the timewarrior store item
-- if the output contains python, the ext/... is installed with python.
Probably most people would have python anyway, so I don't think it has
to be removed.
Looking at the output of "guix gc --references", it does indeed use
python from somewhere.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 14:04 ` Zac Berkowitz
2022-06-10 14:54 ` Maxime Devos
@ 2022-06-10 14:56 ` Maxime Devos
2022-06-10 15:00 ` Maxime Devos
2022-06-10 15:00 ` Maxime Devos
3 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-10 14:56 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]:
> According to the source
> (https://github.com/GothenburgBitFactory/timewarrior/blob/develop/INSTALL)
> asciidoctor is required to build the docs, but python is not a
> requirement at runtime.
Then something appears to be broken somewhere, because I'm not seeing
any docs (except for some README) in
</gnu/store/n2hl121g9qgvdpmx4qmsfr1d77hrpxps-timewarrior-1.4.3/>.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 14:04 ` Zac Berkowitz
2022-06-10 14:54 ` Maxime Devos
2022-06-10 14:56 ` Maxime Devos
@ 2022-06-10 15:00 ` Maxime Devos
2022-06-10 15:00 ` Maxime Devos
3 siblings, 0 replies; 21+ messages in thread
From: Maxime Devos @ 2022-06-10 15:00 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]:
> The python scripts in ext/ are completely optional according to the
> README in that same directory. Like taskwarrior, timewarrior can
> execute python scripts as hooks in response to various commands, but
> they're not necessary for base use.
Two comments:
* the scripts are installed in share/doc/timew, so I don't think they
are actually automatically or discoverable by the user, so FWIW
as-is they can be removed (removing the reference to python).
Alternatively you could look into making them functional, as some
other distros do.
* the scripts do subprocess.call(['timew', ...]). For robustness,
if these scripts are kept, the 'timew' needs to be replaced by the
/gnu/store/.../bin/timew (by using 'substitute*' in a phase).
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH] Add timewarrior 1.4.3
2022-06-10 14:04 ` Zac Berkowitz
` (2 preceding siblings ...)
2022-06-10 15:00 ` Maxime Devos
@ 2022-06-10 15:00 ` Maxime Devos
2022-06-13 18:14 ` [bug#55874] [PATCH v2] " Zac Berkowitz
3 siblings, 1 reply; 21+ messages in thread
From: Maxime Devos @ 2022-06-10 15:00 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]:
> Wouldn't say "learn" - I'm very new to lisps! The code here is mostly
> adapted from taskwarrior (same developer) and other snippets from
> gnu/packages. I'm sure I grep'd for another package that required
> asciidoctor and adapted their portion of the code.
>
Ok, not all old packages have been converted yet.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* [bug#55874] [PATCH v2] Add timewarrior 1.4.3
2022-06-10 15:00 ` Maxime Devos
@ 2022-06-13 18:14 ` Zac Berkowitz
2023-01-28 10:08 ` bug#55874: " Nicolas Goaziou
0 siblings, 1 reply; 21+ messages in thread
From: Zac Berkowitz @ 2022-06-13 18:14 UTC (permalink / raw)
To: 55874
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
A new patch that addresses many of the issues from the first attempt:
- python moved to an input dependency. Eases use of bundled but
optional python scripts
- man pages built and installed in share/man/man1/ and share/man/man7/
- bash completions installed to etc/bash_completion.d/
- non-deterministic tests skipped using same patch from debian
That last one I'm sure if it's the best way to go. It still has the
original attribution within the patch file itself, which is good.
Alternatives would be equivalent changes through snippets (hard) or
re-implementing the patch ourselves (silly).
Zac
On Fri, Jun 10, 2022 at 11:00 AM Maxime Devos <maximedevos@telenet.be> wrote:
>
> Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]:
> > Wouldn't say "learn" - I'm very new to lisps! The code here is mostly
> > adapted from taskwarrior (same developer) and other snippets from
> > gnu/packages. I'm sure I grep'd for another package that required
> > asciidoctor and adapted their portion of the code.
> >
>
> Ok, not all old packages have been converted yet.
[-- Attachment #2: 0001-gnu-Add-timewarrior.patch --]
[-- Type: text/x-patch, Size: 10178 bytes --]
From 78ec019c21c25a7bdb34650d42b16f1b159042c3 Mon Sep 17 00:00:00 2001
From: Zac Berkowitz <zac.berkowitz@gmail.com>
Date: Fri, 13 May 2022 11:56:51 -0400
Subject: [PATCH] gnu: Add timewarrior.
* gnu/packages/task-management.scm (timewarrior): New variable
---
.../timewarrior-time-sensitive-tests.patch | 163 ++++++++++++++++++
gnu/packages/task-management.scm | 52 ++++++
2 files changed, 215 insertions(+)
create mode 100644 gnu/packages/patches/timewarrior-time-sensitive-tests.patch
diff --git a/gnu/packages/patches/timewarrior-time-sensitive-tests.patch b/gnu/packages/patches/timewarrior-time-sensitive-tests.patch
new file mode 100644
index 0000000000..586d1aa261
--- /dev/null
+++ b/gnu/packages/patches/timewarrior-time-sensitive-tests.patch
@@ -0,0 +1,163 @@
+From: Gordon Ball <gordon@chronitis.net>
+Date: Sat, 23 Nov 2019 18:59:39 +0000
+Subject: skip tests which are sensitive to server time
+
+---
+ test/continue.t | 2 +-
+ test/export.t | 1 +
+ test/help.t | 1 +
+ test/lengthen.t | 1 +
+ test/move.t | 2 ++
+ test/run_all | 2 +-
+ test/shorten.t | 1 +
+ test/summary.t | 3 +++
+ test/tag.t | 1 +
+ test/tags.t | 1 +
+ 10 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/test/continue.t b/test/continue.t
+index 917699e..428f714 100755
+--- a/test/continue.t
++++ b/test/continue.t
+@@ -37,7 +37,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
+
+ from basetest import Timew, TestCase
+
+-
++@unittest.skip("Time-of-day sensitive")
+ class TestContinue(TestCase):
+ def setUp(self):
+ """Executed before each test in the class"""
+diff --git a/test/export.t b/test/export.t
+index c6726e6..8b511ff 100755
+--- a/test/export.t
++++ b/test/export.t
+@@ -62,6 +62,7 @@ class TestExport(TestCase):
+ expectedEnd=now_utc,
+ expectedTags=["foo"])
+
++ @unittest.skip("flaky")
+ def test_changing_exclusion_does_not_change_flattened_intervals(self):
+ """Changing exclusions does not change flattened intervals"""
+ now = datetime.now()
+diff --git a/test/help.t b/test/help.t
+index 786def0..9ecf5e6 100755
+--- a/test/help.t
++++ b/test/help.t
+@@ -58,6 +58,7 @@ class TestHelp(TestCase):
+ code, out2, err2 = self.t("-h")
+ self.assertEqual(out1, out2)
+
++ @unittest.skip("flaky")
+ def test_help_with_command_should_show_man_page(self):
+ """timew help with command should show man page"""
+ code, out, err = self.t("help start")
+diff --git a/test/lengthen.t b/test/lengthen.t
+index a6f1d77..f9ab54d 100755
+--- a/test/lengthen.t
++++ b/test/lengthen.t
+@@ -55,6 +55,7 @@ class TestLengthen(TestCase):
+ code, out, err = self.t.runError("lengthen @1 10mins")
+ self.assertIn('Cannot lengthen open interval @1', err)
+
++ @unittest.skip("time sensitive")
+ def test_lengthen_synthetic_interval(self):
+ """Lengthen a synthetic interval."""
+ now = datetime.now()
+diff --git a/test/move.t b/test/move.t
+index 2d7fdd9..b2336f5 100755
+--- a/test/move.t
++++ b/test/move.t
+@@ -145,6 +145,7 @@ class TestMove(TestCase):
+ expectedEnd="20170301T143000Z",
+ expectedTags=["bar"])
+
++ @unittest.skip("time sensitive")
+ def test_move_synthetic_interval_into_exclusion(self):
+ """Move a synthetic interval into exclusion"""
+ now = datetime.now()
+@@ -175,6 +176,7 @@ class TestMove(TestCase):
+ expectedTags=[],
+ description="unmodified interval")
+
++ @unittest.skip("time sensitive")
+ def test_move_synthetic_interval_away_from_exclusion(self):
+ """Move a synthetic interval away from exclusion"""
+ now = datetime.now()
+diff --git a/test/run_all b/test/run_all
+index ea7dd8f..afc6731 100755
+--- a/test/run_all
++++ b/test/run_all
+@@ -14,7 +14,7 @@ from queue import Queue, Empty
+ from subprocess import call, Popen, PIPE
+ from threading import Thread
+
+-TIMEOUT = .2
++TIMEOUT = 2.
+
+
+ def run_test(testqueue, outqueue, threadname):
+diff --git a/test/shorten.t b/test/shorten.t
+index 7058cc0..94e0067 100755
+--- a/test/shorten.t
++++ b/test/shorten.t
+@@ -69,6 +69,7 @@ class TestShorten(TestCase):
+ self.t("move @1 20170308T113000")
+ self.t("shorten @1 5min") # Does not work.
+
++ @unittest.skip("time sensitive")
+ def test_shorten_synthetic_interval(self):
+ """Shorten a synthetic interval."""
+ now = datetime.now()
+diff --git a/test/summary.t b/test/summary.t
+index 6fd3352..f91e992 100755
+--- a/test/summary.t
++++ b/test/summary.t
+@@ -192,6 +192,7 @@ W10 2017-03-09 Thu @4 Tag1 8:43:08 9:38:15 0:55:07
+ 1:09:03
+ """, out)
+
++ @unittest.skip("fails w1-9")
+ def test_with_all_hint(self):
+ """Summary should work with :all hint"""
+ now = datetime.now()
+@@ -236,6 +237,7 @@ W{5} {2:%Y-%m-%d} {2:%a} @1 BAZ 10:00:00 11:00:00 1:00:00 1:00:00
+ self.assertIn("@1", out)
+ self.assertRegex(out, r'\s{30}0:00:02')
+
++ @unittest.skip("fails w1-9")
+ def test_with_named_date_yesterday(self):
+ """Summary should work with 'yesterday'"""
+ now = datetime.now()
+@@ -260,6 +262,7 @@ W{1} {0:%Y-%m-%d} {0:%a} @3 FOO 10:00:00 11:00:00 1:00:00 1:00:00
+ {2} 1:00:00
+ """.format(yesterday, week_yesterday, " " if two_digit_week is True else "", "-" if two_digit_week is True else ""), out)
+
++ @unittest.skip("fails w1-9")
+ def test_with_named_date_today(self):
+ """Summary should work with 'today'"""
+ now = datetime.now()
+diff --git a/test/tag.t b/test/tag.t
+index 8b2f847..21b8c16 100755
+--- a/test/tag.t
++++ b/test/tag.t
+@@ -178,6 +178,7 @@ class TestTag(TestCase):
+ self.assertClosedInterval(j[0], expectedTags=["bar", "foo", "one"])
+ self.assertClosedInterval(j[1], expectedTags=["bar", "foo", "two"])
+
++ @unittest.skip("time sensitive")
+ def test_tag_synthetic_interval(self):
+ """Tag a synthetic interval."""
+ now = datetime.now()
+diff --git a/test/tags.t b/test/tags.t
+index 6cfe143..4f84d06 100755
+--- a/test/tags.t
++++ b/test/tags.t
+@@ -63,6 +63,7 @@ class TestTags(TestCase):
+ self.assertIn('foo', out)
+ self.assertIn('bar', out)
+
++ @unittest.skip("time sensitive")
+ def test_tags_filtered(self):
+ """Test that tags command filtering excludes tags that are outside the filter range"""
+ self.t("track 20160101T0100 - 20160101T1000 foo")
diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm
index aeedbfbe6a..ced5e1e661 100644
--- a/gnu/packages/task-management.scm
+++ b/gnu/packages/task-management.scm
@@ -25,6 +25,7 @@ (define-module (gnu packages task-management)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix packages)
+ #:use-module (gnu packages)
#:use-module (gnu packages check)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -38,6 +39,7 @@ (define-module (gnu packages task-management)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages ruby)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (guix download)
@@ -145,6 +147,56 @@ (define-public taskwarrior
and querying data, exposing task data in multiple formats to other tools.")
(license license:expat)))
+(define-public timewarrior
+ (package
+ (name "timewarrior")
+ (version "1.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v" version
+ "/timew-" version ".tar.gz"))
+ (patches (search-patches "timewarrior-time-sensitive-tests.patch"))
+ (sha256 (base32
+ "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list ruby-asciidoctor))
+ (inputs
+ (list gnutls `(,util-linux "lib") python))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'install-license-files) ; Already installed by package
+ (add-after 'patch-source-shebangs 'patch-cmake-shell
+ (lambda _
+ (substitute* "src/commands/CMakeLists.txt"
+ (("/bin/sh") "sh"))))
+ ;; Fix out of source building of manual pages
+ (add-after 'patch-source-shebangs 'patch-man-cmake
+ (lambda _
+ (substitute* "doc/man1/CMakeLists.txt"
+ (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}") "${CMAKE_CURRENT_SOURCE_DIR}"))
+ (substitute* "doc/man7/CMakeLists.txt"
+ (("\\$\\{CMAKE_CURRENT_BINARY_DIR\\}") "${CMAKE_CURRENT_SOURCE_DIR}"))))
+ (add-after 'install 'install-completions
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash-completion-install-dir
+ (string-append out "/etc/bash_completion.d")))
+ (mkdir-p bash-completion-install-dir)
+ (copy-file
+ "../timew-1.4.3/completion/timew-completion.bash"
+ (string-append bash-completion-install-dir "/timew"))))))))
+ (home-page "https://timewarrior.net")
+ (synopsis "Command line utility to track and report time")
+ (description
+ "Timewarrior is a command line time tracking application, which allows
+you to record time spent on activities. You may be tracking your time for
+curiosity, or because your work requires it.")
+ (license license:expat)))
+
(define-public worklog
(let ((commit "0f545ad6697ef4de7f68d92cd7cc5c6a4c60517b")
(revision "1"))
--
2.36.1
^ permalink raw reply related [flat|nested] 21+ messages in thread
* bug#55874: [PATCH v2] Add timewarrior 1.4.3
2022-06-13 18:14 ` [bug#55874] [PATCH v2] " Zac Berkowitz
@ 2023-01-28 10:08 ` Nicolas Goaziou
0 siblings, 0 replies; 21+ messages in thread
From: Nicolas Goaziou @ 2023-01-28 10:08 UTC (permalink / raw)
To: Zac Berkowitz; +Cc: 55874-done
Hello,
Zac Berkowitz <zac.berkowitz@gmail.com> writes:
> A new patch that addresses many of the issues from the first attempt:
>
> - python moved to an input dependency. Eases use of bundled but
> optional python scripts
> - man pages built and installed in share/man/man1/ and share/man/man7/
> - bash completions installed to etc/bash_completion.d/
> - non-deterministic tests skipped using same patch from debian
Thank you.
> That last one I'm sure if it's the best way to go.
I don't know either, but I think your current proposal has merits.
> Subject: [PATCH] gnu: Add timewarrior.
I added a proper commit message, used G-expressions in the package
definition, registered the patch in local.mk and applied everything.
Sorry for the delay!
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2023-01-28 10:09 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09 15:11 [bug#55874] [PATCH] Add timewarrior 1.4.3 Zac Berkowitz
2022-06-09 19:50 ` Maxime Devos
2022-06-09 19:53 ` Maxime Devos
2022-06-09 19:55 ` Maxime Devos
2022-06-09 19:56 ` Maxime Devos
2022-06-09 20:01 ` Maxime Devos
2022-06-09 20:06 ` Maxime Devos
2022-06-09 20:08 ` Maxime Devos
2022-06-09 20:09 ` Maxime Devos
2022-06-09 20:10 ` Maxime Devos
2022-06-09 20:12 ` Maxime Devos
2022-06-09 20:17 ` Maxime Devos
2022-06-10 1:36 ` Zac Berkowitz
2022-06-10 7:49 ` Maxime Devos
2022-06-10 14:04 ` Zac Berkowitz
2022-06-10 14:54 ` Maxime Devos
2022-06-10 14:56 ` Maxime Devos
2022-06-10 15:00 ` Maxime Devos
2022-06-10 15:00 ` Maxime Devos
2022-06-13 18:14 ` [bug#55874] [PATCH v2] " Zac Berkowitz
2023-01-28 10:08 ` bug#55874: " Nicolas Goaziou
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.