diff mbox

gnu: mail: Add notifymuch.

Message ID 20161009213318.29189-1-mail@cbaines.net
State New
Headers show

Commit Message

Christopher Baines Oct. 9, 2016, 9:33 p.m. UTC
* gnu/packages/mail.scm (notifymuch): New variable.
---
 gnu/packages/mail.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Leo Famulari Oct. 9, 2016, 10:08 p.m. UTC | #1
On Sun, Oct 09, 2016 at 10:33:18PM +0100, Christopher Baines wrote:
> * gnu/packages/mail.scm (notifymuch): New variable.

Thanks for this patch!

> +    (version "0.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/kspi/notifymuch.git")
> +             (commit "9d4aaf54599282ce80643b38195ff501120807f0")))

There are no "real" releases, right? I didn't see a 0.1 version on the
home-page.

If so, can you revise this patch to use the versioning method described
in the manual, section 7.6.3 Version Numbers [0]?

So, the resulting version string would be 0.0.0-1.9d4aaf5.

There is a recent example in 4b51b21ccf (gnu: Add cl-clx.).

By the way, for anyone reading along, the commit chosen by Christopher
is the current HEAD of the master branch.

> +         (add-after 'install 'wrap-binary
> +           (lambda* (#:key inputs outputs #:allow-other-keys)

I think 'inputs' can be removed since it isn't used here.

Looks good with these changes!

[0]
https://www.gnu.org/software/guix/manual/html_node/Version-Numbers.html
Christopher Baines Oct. 10, 2016, 6:44 a.m. UTC | #2
Thanks for your review. The version (0.1) is specified in the setup.py file,
but your right in saying that there is no "real" 0.1 version release. I've also
removed inputs from the wrap-binary stage.
Hartmut Goebel Oct. 10, 2016, 7:40 a.m. UTC | #3
Am 09.10.2016 um 23:33 schrieb Christopher Baines:
> +    (description "notifymuch displays desktop notifications for messages in
> +the notmuch database.  The notifications are sent using libnotify to a

May I ask you to ass some words about what notmuch is? This saves the
ingenuous reader to recherché what notmuch is. Thanks.
Alex Kost Oct. 10, 2016, 7:52 a.m. UTC | #4
Hartmut Goebel (2016-10-10 09:40 +0200) wrote:

> Am 09.10.2016 um 23:33 schrieb Christopher Baines:
>> +    (description "notifymuch displays desktop notifications for messages in
>> +the notmuch database.  The notifications are sent using libnotify to a
>
> May I ask you to ass some words about what notmuch is? This saves the
                   ^^^

Nice typo, I think it ment to be "add", right?  :-)

> ingenuous reader to recherché what notmuch is. Thanks.
Hartmut Goebel Oct. 10, 2016, 8:12 a.m. UTC | #5
Am 10.10.2016 um 09:52 schrieb Alex Kost:
> Nice typo, I think it ment to be "add", right?  :-)

Of course :-)
Christopher Baines Oct. 12, 2016, 6:17 p.m. UTC | #6
On 10/10/16 08:40, Hartmut Goebel wrote:
> Am 09.10.2016 um 23:33 schrieb Christopher Baines:
>> +    (description "notifymuch displays desktop notifications for messages in
>> +the notmuch database.  The notifications are sent using libnotify to a
>
> May I ask you to ass some words about what notmuch is? This saves the
> ingenuous reader to recherché what notmuch is. Thanks.

I'm not quite sure how to improve on this. Copying in the full package 
description for notmuch looks out of place to me, and I'm not sure if 
just saying "the notmuch email database" instead of "the notmuch 
database" is sufficient?
Hartmut Goebel Oct. 13, 2016, 7:58 a.m. UTC | #7
Am 12.10.2016 um 20:17 schrieb Christopher Baines:
>>> +    (description "notifymuch displays desktop notifications for
>>> messages in
>>> +the notmuch database.  The notifications are sent using libnotify to a
>>
>> May I ask you to ass some words about what notmuch is? This saves the
>> ingenuous reader to recherché what notmuch is. Thanks.
>
> I'm not quite sure how to improve on this. Copying in the full package
> description for notmuch looks out of place to me, and I'm not sure if
> just saying "the notmuch email database" instead of "the notmuch
> database" is sufficient?
>

IC, this is a complicated one, since notmuch seems to be a framework. I
have to admit that I did not know about notmuch until just now.
Explaining about what notmuch is would indeed disrupt the description.
So I'd say your suggestion is okay, since it give the ingenuous reader
at least a hint.

(synopsis "Displays notifications for changes in the notmuch email
database")
Ludovic Courtès Oct. 13, 2016, 8:10 p.m. UTC | #8
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Am 12.10.2016 um 20:17 schrieb Christopher Baines:
>>>> +    (description "notifymuch displays desktop notifications for
>>>> messages in
>>>> +the notmuch database.  The notifications are sent using libnotify to a
>>>
>>> May I ask you to ass some words about what notmuch is? This saves the
>>> ingenuous reader to recherché what notmuch is. Thanks.
>>
>> I'm not quite sure how to improve on this. Copying in the full package
>> description for notmuch looks out of place to me, and I'm not sure if
>> just saying "the notmuch email database" instead of "the notmuch
>> database" is sufficient?
>>
>
> IC, this is a complicated one, since notmuch seems to be a framework. I
> have to admit that I did not know about notmuch until just now.
> Explaining about what notmuch is would indeed disrupt the description.
> So I'd say your suggestion is okay, since it give the ingenuous reader
> at least a hint.
>
> (synopsis "Displays notifications for changes in the notmuch email
> database")

Sounds good (without the newline though).

Hartmut, since the rest of the patch looked non controversial, and if
‘guix lint’ doesn’t complain, you can push to ‘master’ with the synopsis
above.

The ‘license’ field may also need to be fixed: it says ‘gpl3’, which
means GPLv3-only, but the odds are that it’s in fact GPLv3-or-later,
aka. ‘gpl3+’.

Thanks,
Ludo’.
Hartmut Goebel Oct. 14, 2016, 9:30 a.m. UTC | #9
Am 13.10.2016 um 22:10 schrieb Ludovic Courtès:
> Hartmut, since the rest of the patch looked non controversial, and if
> ‘guix lint’ doesn’t complain, you can push to ‘master’ with the synopsis
> above.

Done with minor adjustments.
0350a8bb1eef12927964fb6ce62ae64f10fa6f8d
Christopher Baines Oct. 16, 2016, 5:20 p.m. UTC | #10
On 14/10/16 10:30, Hartmut Goebel wrote:
> Am 13.10.2016 um 22:10 schrieb Ludovic Courtès:
>> Hartmut, since the rest of the patch looked non controversial, and if
>> ‘guix lint’ doesn’t complain, you can push to ‘master’ with the synopsis
>> above.
> 
> Done with minor adjustments.
> 0350a8bb1eef12927964fb6ce62ae64f10fa6f8d

Great, thanks for your review and help Hartmut :)
diff mbox

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index baa5a96..632ef5d 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -443,6 +443,50 @@  attachments, create new maildirs, and so on.")
 @code{notmuch} mail.  It is written in Python using the @code{urwid} toolkit.")
     (license gpl3+)))
 
+(define-public notifymuch
+  (package
+    (name "notifymuch")
+    (version "0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/kspi/notifymuch.git")
+             (commit "9d4aaf54599282ce80643b38195ff501120807f0")))
+       (sha256
+        (base32
+         "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system python-build-system)
+    (inputs `(("python-notmuch" ,python-notmuch)
+              ("gobject-introspection" ,gobject-introspection)
+              ("libnotify" ,libnotify)
+              ("gtk+" ,gtk+)
+              ("python-pygobject" ,python-pygobject)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-binary
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin/notifymuch")))
+               (wrap-program bin
+                 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+                 `("GI_TYPELIB_PATH" ":" prefix
+                   (,(getenv "GI_TYPELIB_PATH")
+                    ,(string-append out "/lib/girepository-1.0")))))
+             #t)))))
+  (home-page "https://github.com/kspi/notifymuch")
+    (synopsis "Displays notifications for changes in the notmuch database")
+    (description "notifymuch displays desktop notifications for messages in
+the notmuch database.  The notifications are sent using libnotify to a
+notification daemon.  The query to find messages to send a notification about
+is configurable, and a notification for the same message will not be send
+within a configurable period (defaults to 48 hours).  To use notifymuch, run
+@command{notifymuch} after new mail is indexed, this can be automated by
+invoking @command{notifymuch} from the post-new hook.")
+    (license gpl3)))
+
 (define-public notmuch
   (package
     (name "notmuch")