unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: mail: Add notifymuch.
@ 2016-10-09 21:33 Christopher Baines
  2016-10-09 22:08 ` Leo Famulari
  2016-10-10  7:40 ` Hartmut Goebel
  0 siblings, 2 replies; 12+ messages in thread
From: Christopher Baines @ 2016-10-09 21:33 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/mail.scm (notifymuch): New variable.
---
 gnu/packages/mail.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

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")
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-09 21:33 [PATCH] gnu: mail: Add notifymuch Christopher Baines
@ 2016-10-09 22:08 ` Leo Famulari
  2016-10-10  6:44   ` Christopher Baines
  2016-10-10  7:40 ` Hartmut Goebel
  1 sibling, 1 reply; 12+ messages in thread
From: Leo Famulari @ 2016-10-09 22:08 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] gnu: mail: Add notifymuch.
  2016-10-09 22:08 ` Leo Famulari
@ 2016-10-10  6:44   ` Christopher Baines
  2016-10-10  6:44     ` Christopher Baines
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Baines @ 2016-10-10  6:44 UTC (permalink / raw)
  To: guix-devel

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] gnu: mail: Add notifymuch.
  2016-10-10  6:44   ` Christopher Baines
@ 2016-10-10  6:44     ` Christopher Baines
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Baines @ 2016-10-10  6:44 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/mail.scm (notifymuch): New variable.
---
 gnu/packages/mail.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index baa5a96..02dd72a 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -443,6 +443,56 @@ 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
+  (let
+      ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
+       (revision "1"))
+    (package
+      (name "notifymuch")
+      (version (string-append "0.1-"
+                              revision
+                              "."
+                              (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kspi/notifymuch.git")
+               (commit commit)))
+         (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 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")
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-09 21:33 [PATCH] gnu: mail: Add notifymuch Christopher Baines
  2016-10-09 22:08 ` Leo Famulari
@ 2016-10-10  7:40 ` Hartmut Goebel
  2016-10-10  7:52   ` Alex Kost
  2016-10-12 18:17   ` Christopher Baines
  1 sibling, 2 replies; 12+ messages in thread
From: Hartmut Goebel @ 2016-10-10  7:40 UTC (permalink / raw)
  To: guix-devel

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.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-10  7:40 ` Hartmut Goebel
@ 2016-10-10  7:52   ` Alex Kost
  2016-10-10  8:12     ` Hartmut Goebel
  2016-10-12 18:17   ` Christopher Baines
  1 sibling, 1 reply; 12+ messages in thread
From: Alex Kost @ 2016-10-10  7:52 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

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.

-- 
Alex

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-10  7:52   ` Alex Kost
@ 2016-10-10  8:12     ` Hartmut Goebel
  0 siblings, 0 replies; 12+ messages in thread
From: Hartmut Goebel @ 2016-10-10  8:12 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Am 10.10.2016 um 09:52 schrieb Alex Kost:
> Nice typo, I think it ment to be "add", right?  :-)

Of course :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-10  7:40 ` Hartmut Goebel
  2016-10-10  7:52   ` Alex Kost
@ 2016-10-12 18:17   ` Christopher Baines
  2016-10-13  7:58     ` Hartmut Goebel
  1 sibling, 1 reply; 12+ messages in thread
From: Christopher Baines @ 2016-10-12 18:17 UTC (permalink / raw)
  To: guix-devel

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?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-12 18:17   ` Christopher Baines
@ 2016-10-13  7:58     ` Hartmut Goebel
  2016-10-13 20:10       ` Ludovic Courtès
  0 siblings, 1 reply; 12+ messages in thread
From: Hartmut Goebel @ 2016-10-13  7:58 UTC (permalink / raw)
  To: guix-devel

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")


-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-13  7:58     ` Hartmut Goebel
@ 2016-10-13 20:10       ` Ludovic Courtès
  2016-10-14  9:30         ` Hartmut Goebel
  0 siblings, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2016-10-13 20:10 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

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’.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-13 20:10       ` Ludovic Courtès
@ 2016-10-14  9:30         ` Hartmut Goebel
  2016-10-16 17:20           ` Christopher Baines
  0 siblings, 1 reply; 12+ messages in thread
From: Hartmut Goebel @ 2016-10-14  9:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] gnu: mail: Add notifymuch.
  2016-10-14  9:30         ` Hartmut Goebel
@ 2016-10-16 17:20           ` Christopher Baines
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Baines @ 2016-10-16 17:20 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]

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 :)



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 955 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-10-16 17:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-09 21:33 [PATCH] gnu: mail: Add notifymuch Christopher Baines
2016-10-09 22:08 ` Leo Famulari
2016-10-10  6:44   ` Christopher Baines
2016-10-10  6:44     ` Christopher Baines
2016-10-10  7:40 ` Hartmut Goebel
2016-10-10  7:52   ` Alex Kost
2016-10-10  8:12     ` Hartmut Goebel
2016-10-12 18:17   ` Christopher Baines
2016-10-13  7:58     ` Hartmut Goebel
2016-10-13 20:10       ` Ludovic Courtès
2016-10-14  9:30         ` Hartmut Goebel
2016-10-16 17:20           ` Christopher Baines

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).