diff options
| author | Arun Isaac <arunisaac@systemreboot.net> | 2021-04-04 00:40:14 +0530 |
|---|---|---|
| committer | Arun Isaac <arunisaac@systemreboot.net> | 2021-04-21 23:36:21 +0530 |
| commit | ae5128e21eb7afa66bd7cfd7fd1bc5764d00663e (patch) | |
| tree | 20b8ada6b9331b3c8c3b54a56998314a1678fdfb /gnu | |
| parent | 88fd57fd1f316b422642593a52654eeb27742e11 (diff) | |
gnu: Add crm114.
* gnu/packages/mail.scm (crm114): New variable.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/mail.scm | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c8f29b80d6d..64c84d145d8 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com> | 17 | ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com> |
| 18 | ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is> | 18 | ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is> |
| 19 | ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org> | 19 | ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org> |
| 20 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net> | 20 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net> |
| 21 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | 21 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
| 22 | ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com> | 22 | ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com> |
| 23 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> | 23 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> |
| @@ -129,6 +129,7 @@ | |||
| 129 | #:use-module (gnu packages python-web) | 129 | #:use-module (gnu packages python-web) |
| 130 | #:use-module (gnu packages python-xyz) | 130 | #:use-module (gnu packages python-xyz) |
| 131 | #:use-module (gnu packages ragel) | 131 | #:use-module (gnu packages ragel) |
| 132 | #:use-module (gnu packages regex) | ||
| 132 | #:use-module (gnu packages rdf) | 133 | #:use-module (gnu packages rdf) |
| 133 | #:use-module (gnu packages readline) | 134 | #:use-module (gnu packages readline) |
| 134 | #:use-module (gnu packages ruby) | 135 | #:use-module (gnu packages ruby) |
| @@ -4375,3 +4376,82 @@ black lists. Each message is analysed by Rspamd and given a spam | |||
| 4375 | score.") | 4376 | score.") |
| 4376 | (home-page "https://www.rspamd.com/") | 4377 | (home-page "https://www.rspamd.com/") |
| 4377 | (license license:asl2.0))) | 4378 | (license license:asl2.0))) |
| 4379 | |||
| 4380 | (define-public crm114 | ||
| 4381 | (package | ||
| 4382 | (name "crm114") | ||
| 4383 | (version "20100106") | ||
| 4384 | (source | ||
| 4385 | (origin | ||
| 4386 | (method url-fetch) | ||
| 4387 | (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-" | ||
| 4388 | version "-BlameMichelson.src.tar.gz")) | ||
| 4389 | (sha256 | ||
| 4390 | (base32 | ||
| 4391 | "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv")))) | ||
| 4392 | (build-system gnu-build-system) | ||
| 4393 | (arguments | ||
| 4394 | `(#:modules ((guix build gnu-build-system) | ||
| 4395 | ((guix build emacs-build-system) #:prefix emacs:) | ||
| 4396 | (guix build utils) | ||
| 4397 | (ice-9 string-fun)) | ||
| 4398 | #:imported-modules (,@%gnu-build-system-modules | ||
| 4399 | (guix build emacs-build-system) | ||
| 4400 | (guix build emacs-utils)) | ||
| 4401 | #:make-flags (list (string-append "prefix=" %output) | ||
| 4402 | "LDFLAGS=") ; disable static linking | ||
| 4403 | ;; Test suite is not fully automated. It requires a human to read the | ||
| 4404 | ;; results and determine if the tests have passed. | ||
| 4405 | #:tests? #f | ||
| 4406 | #:phases | ||
| 4407 | (modify-phases %standard-phases | ||
| 4408 | (delete 'configure) | ||
| 4409 | (add-before 'build 'fix-build | ||
| 4410 | (lambda _ | ||
| 4411 | ;; Inline functions can only be used from the same compilation | ||
| 4412 | ;; unit. This causes the build to fail. | ||
| 4413 | (substitute* "crm_svm_matrix.c" | ||
| 4414 | (("^inline ") "")))) | ||
| 4415 | (add-before 'install 'pre-install | ||
| 4416 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 4417 | (let ((out (assoc-ref outputs "out"))) | ||
| 4418 | ;; Install maillib.crm library. | ||
| 4419 | (install-file "maillib.crm" (string-append out "/share/crm")) | ||
| 4420 | ;; Set absolute store paths. | ||
| 4421 | (substitute* "mailreaver.crm" | ||
| 4422 | (("insert maillib.crm") | ||
| 4423 | (string-append "insert " out "/share/crm/maillib.crm")) | ||
| 4424 | (("\\\\/bin\\\\/ls") | ||
| 4425 | (string-replace-substring (which "ls") "/" "\\/")) | ||
| 4426 | ((":\\*:trainer_invoke_command:") | ||
| 4427 | (string-append out "/bin/mailtrainer.crm"))) | ||
| 4428 | ;; Install mail related crm scripts. | ||
| 4429 | (for-each (lambda (file) | ||
| 4430 | (install-file file (string-append out "/bin"))) | ||
| 4431 | (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm")) | ||
| 4432 | ;; Create emacs site-lisp directory so that the install phase | ||
| 4433 | ;; can install crm-mode. | ||
| 4434 | (mkdir-p (string-append out "/share/emacs/site-lisp"))))) | ||
| 4435 | ;; Run phases from the emacs build system. | ||
| 4436 | (add-after 'install 'make-autoloads | ||
| 4437 | (assoc-ref emacs:%standard-phases 'make-autoloads)) | ||
| 4438 | (add-after 'make-autoloads 'enable-autoloads-compilation | ||
| 4439 | (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation)) | ||
| 4440 | (add-after 'enable-autoloads-compilation 'emacs-build | ||
| 4441 | (assoc-ref emacs:%standard-phases 'build)) | ||
| 4442 | (add-after 'emacs-build 'validate-compiled-autoloads | ||
| 4443 | (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads))))) | ||
| 4444 | (inputs | ||
| 4445 | `(("tre" ,tre))) | ||
| 4446 | (native-inputs | ||
| 4447 | `(("emacs" ,emacs-minimal))) | ||
| 4448 | (home-page "http://crm114.sourceforge.net/") | ||
| 4449 | (synopsis "Controllable regex mutilator") | ||
| 4450 | (description "CRM114 is a system to examine incoming e-mail, system log | ||
| 4451 | streams, data files or other data streams, and to sort, filter, or alter the | ||
| 4452 | incoming files or data streams according to the user's wildest desires. | ||
| 4453 | Criteria for categorization of data can be via a host of methods, including | ||
| 4454 | regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse | ||
| 4455 | Bigrams, WINNOW, Correllation, KNN/Hyperspace, or Bit Entropy (or by other | ||
| 4456 | means--it's all programmable).") | ||
| 4457 | (license license:gpl3))) | ||
