diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | guix.scm | 3 | ||||
-rw-r--r-- | mumi/config.scm.in | 1 | ||||
-rw-r--r-- | scripts/mumi.in | 17 |
4 files changed, 22 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f24c741..8b66861 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,8 @@ if test "x$have_fibers" != "xyes"; then AC_MSG_ERROR([Guile fibers is missing; please install it.]) fi +AC_PATH_PROG([MU], [mu]) + guilemoduledir="${datarootdir}/guile/site/${GUILE_EFFECTIVE_VERSION}" AC_SUBST([guilemoduledir]) AC_SUBST([GUILE_EFFECTIVE_VERSION]) @@ -73,7 +73,8 @@ ("guile-json" ,guile-json) ("guile-fibers" ,guile-fibers) ("guile-syntax-highlight" ,guile-syntax-highlight) - ("guile" ,guile-2.2))) + ("guile" ,guile-2.2) + ("mu" ,mu))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) diff --git a/mumi/config.scm.in b/mumi/config.scm.in index 098e2e8..9d8a9c3 100644 --- a/mumi/config.scm.in +++ b/mumi/config.scm.in @@ -46,6 +46,7 @@ (submission-bug-email-address . "bug-guix@gnu.org") (lists . ("guix-patches@gnu.org" "bug-guix@gnu.org")) (packages . ("guix-patches" "guix")) + (mu-executable . "@MU@") (debbugs . ,%gnu) (debbugs-domain . "debbugs.gnu.org")))) (lambda (key) diff --git a/scripts/mumi.in b/scripts/mumi.in index 2abfd51..3bd34f4 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -94,4 +94,21 @@ (when repl-port (spawn-server (make-tcp-server-socket #:port repl-port))))))) +;; Keep indexing the mail directory +(define %mu-index-interval 30) +(define mu-index + (let ((mu (%config 'mu-executable))) + (lambda _ + (let* ((maildir (%config 'mail-dir)) + (args (list "index" + "--quiet" + (format #f "--muhome=~a" maildir) + (format #f "--maildir=~a" maildir)))) + (unless (zero? (apply system* mu args)) + (format (current-error-port) + "Failed to run `~a'~%" command)) + (alarm %mu-index-interval))))) +(sigaction SIGALRM mu-index 0) +(mu-index) + (start-mumi-web-server 1234) |