diff mbox series

[bug#42899,v3,3/9] gnu: dovecot-pigeonhole: Add new variable.

Message ID 20200827151743.27712-3-levenson@mmer.org
State New
Headers show
Series [bug#42899,v3,1/9] gnu: dovecot: Set moduledir to global directory. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Alexey Abramov Aug. 27, 2020, 3:17 p.m. UTC
---
 gnu/packages/mail.scm | 50 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index c22dd27547..5470144d53 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1481,6 +1481,56 @@  It supports mbox/Maildir and its own dbox/mdbox formats.")
     (license (list license:lgpl2.1 license:expat
                    (license:non-copyleft "file://COPYING")))))
 
+(define-public dovecot-pigeonhole
+  (let ((dovecot-version (version-major+minor (package-version dovecot))))
+    (package
+      (name "dovecot-pigeonhole")
+      (version "0.5.11")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append "https://pigeonhole.dovecot.org/releases/"
+                             dovecot-version "/"
+                             "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
+         (sha256
+          (base32
+           "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("dovecot" ,dovecot)))
+      (arguments
+       `(#:configure-flags
+         (list "--with-dovecot-install-dirs=no"
+               (string-append "--with-dovecot="
+                              (assoc-ref %build-inputs "dovecot")
+                              "/lib/dovecot")
+               (string-append "--with-moduledir="
+                              (assoc-ref %outputs "out")
+                              "/lib/dovecot"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-file-names
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (substitute* "src/managesieve/managesieve-settings.c"
+                   ((".executable = \"managesieve\"")
+                    (string-append ".executable = \"" out
+                                   "/libexec/dovecot/managesieve\"")))
+                 (substitute* "src/managesieve-login/managesieve-login-settings.c"
+                   ((".executable = \"managesieve-login\"")
+                    (string-append ".executable = \"" out
+                                   "/libexec/dovecot/managesieve-login\""))))
+               #t)))))
+      (home-page "https://pigeonhole.dovecot.org")
+      (synopsis "Mail filtering in Dovecot using the Sieve language")
+      (description
+       "@code{dovecot-pigonhole} adds support for the Sieve
+language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the
+@code{Dovecot} Secure IMAP Server.")
+      (license (list license:lgpl2.1
+                     (license:non-copyleft "file://COPYING")
+                     (license:non-copyleft "file://COPYING.LGPL"))))))
+
 (define-public dovecot-trees
   (package
     (name "dovecot-trees")