From f6807498bea9471dd7ef9b09359ba9077e7094e6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 14 Sep 2020 13:17:40 +0200 Subject: gnu: Add altermime. * gnu/packages/mail.scm (altermime): New variable. --- gnu/packages/mail.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 4a9c6fc90f..2244653724 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -627,6 +627,69 @@ Extension (MIME).") (base32 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi")))))) +(define-public altermime + (package + (name "altermime") + (version "0.3.10") + (source (origin + (method url-fetch) + (uri (string-append "http://pldaniels.com/altermime/altermime-" + version ".tar.gz")) + (sha256 + (base32 + "0vn3vmbcimv0n14khxr1782m76983zz9sf4j2kz5v86lammxld43")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "CC=gcc" + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:tests? #f ; there are none + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-bugs + (lambda _ + (substitute* "MIME_headers.c" + (("hinfo->filename, sizeof\\(hinfo->name\\)") + "hinfo->filename, sizeof(hinfo->filename)") + (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);") + "memset(hinfo->defects, 0, sizeof(hinfo->defects));")) + (substitute* "pldstr.c" + (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)") + "if ((st->start)&&(*st->start != '\\0'))")) + (substitute* "qpe.c" + (("if \\(lineend != '\\\\0'\\)") + "if (*lineend != '\\0')")) + #t)) + (add-after 'unpack 'install-to-prefix + (lambda _ + (substitute* "Makefile" + (("/usr/local") "${PREFIX}") + (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n")) + #t)) + (add-after 'unpack 'disable-Werror + (lambda _ + (substitute* "Makefile" + (("-Werror") "")) + #t))))) + (home-page "https://pldaniels.com/altermime/") + (synopsis "Modify MIME-encoded messages") + (description + "alterMIME is a small program which is used to alter your mime-encoded +mailpack. What can alterMIME do? + +@enumerate +@item Insert disclaimers, +@item insert arbitary X-headers, +@item modify existing headers, +@item remove attachments based on filename or content-type, +@item replace attachments based on filename. +@end enumerate +.") + ;; MIME_headers.c is distributed under BSD-3; the rest of the code is + ;; published under the alterMIME license. + (license (list (license:non-copyleft "file://LICENSE") + license:bsd-3)))) + (define-public bogofilter (package (name "bogofilter") -- cgit v1.2.3 c8b1b55f7ead919a90a'>pull: Acquire a lock for the target profile....Ludovic Courtès 2019-09-23git: Add 'commit-difference'....Ludovic Courtès 2019-06-05syscalls: Add 'with-file-lock' macro....Ludovic Courtès 2019-05-27publish: Add support for lzip....Ludovic Courtès 2019-03-07database: Make 'register-items' transactional....Caleb Ristvedt 2019-01-11status: Add 'with-status-verbosity'....Ludovic Courtès 2018-10-19tests: Run 'guix pack' tests using the external store....Ludovic Courtès 2018-09-27Add (guix status) and use it for pretty colored output....Ludovic Courtès 2018-06-01Add (gnu store database)....Caleb Ristvedt 2018-06-01gexp: Add 'with-extensions'....Ludovic Courtès 2018-01-08services: guix: Add 'log-compression' option....Ludovic Courtès 2017-12-01weather: Use (guix progress) for progress report....Ludovic Courtès