diff options
author | EuAndreh <eu@euandre.org> | 2022-11-22 07:17:44 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-22 07:17:44 -0300 |
commit | b6f11dbaa9e0e0b7115c5298fdb262f7f996f2ba (patch) | |
tree | fe181929fa9f1407e217d50a12309ca2e4bf0782 | |
parent | Makefile: Run build once over doing in a loop (diff) | |
download | package-repository-b6f11dbaa9e0e0b7115c5298fdb262f7f996f2ba.tar.gz package-repository-b6f11dbaa9e0e0b7115c5298fdb262f7f996f2ba.tar.xz |
src/xyz/euandreh/queue.scm: Add postfix package
-rw-r--r-- | src/xyz/euandreh/queue.scm | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm index 6da0c8f..1333138 100644 --- a/src/xyz/euandreh/queue.scm +++ b/src/xyz/euandreh/queue.scm @@ -1,4 +1,5 @@ (define-module (xyz euandreh queue) + #:use-module ((xyz euandreh heredoc) #:prefix heredoc:) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) @@ -10,16 +11,23 @@ #:use-module (gnu packages check) #:use-module (gnu packages cpio) #:use-module (gnu packages cups) + #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages dbm) #:use-module (gnu packages image) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages m4) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages package-management) + #:use-module (gnu packages perl) #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) +(heredoc:enable-syntax) (define-public python-docx (package @@ -334,6 +342,135 @@ left it off the last time it was used.") (home-page "https://github.com/tmux-plugins/tmux-continuum/") (license license:expat))) +(define-public postfix + (package + (name "postfix") + (version "3.8-20221023") + (source + (origin + (method url-fetch) + (uri + (string-append + "http://cdn.postfix.johnriley.me/mirrors/postfix-release/experimental/postfix-" + version + ".tar.gz")) + (sha256 + (base32 "0aaylhn81n9z3kidx53kzf2jrilr3lgwfxsk1r4hn7nkrp62bcwm")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:modules `((srfi srfi-26) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + (substitute* (find-files "." "^Makefile") + (("/bin/sh") + (which "sh"))))) + (add-before 'configure 'patch-bdb-include + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "makedefs" + (("/usr/include") + (string-append (assoc-ref inputs "bdb") + "/include"))))) + (add-before 'configure 'dont-hardcode-PATH + (lambda _ + (substitute* '("postfix-install" + "conf/post-install") + (("^PATH=") + "# PATH=")))) + (add-before 'configure 'fix-strict-PATH + (lambda _ + (substitute* "src/util/sys_defs.h" + (("^#define (ROOT_PATH|_PATH_DEFPATH|_PATH_STDPATH).*") + "#define ROOT_PATH \"/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin\"\n")))) + (add-before 'configure 'use-relative-symlink-to-store + (lambda _ + (substitute* "postfix-install" + (("ln -sf") + "ln -rsf")))) + (add-before 'configure 'fix-absolute-path-to-setuid-programs + (lambda _ + (substitute* "conf/postfix-script" + (("\\$command_directory/postqueue") + "/run/setuid-programs/postqueue") + (("\\$command_directory/postdrop") + "/run/setuid-programs/postdrop")))) + (add-before 'configure 'disable-warning-on-non-writable-config-files + (lambda _ + (substitute* "conf/postfix-script" + ((#"- + find \$todo \\\( -perm -020 -o -perm -002 \\\) \\ + "#) + #"- + # find $todo \( -perm -020 -o -perm -002 \)"#)))) + (add-before 'configure 'disable-write-to-/etc/postfix + (lambda _ + (substitute* "src/postconf/postconf_edit.c" + (("pcf_set_config_dir.*") + "return;")))) + (add-before 'configure 'setup-environment + (lambda* (#:key outputs inputs #:allow-other-keys) + (setenv "CCARGS" (string-append "-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I" + (assoc-ref inputs "cyrus-sasl") + "/include/sasl")) + (setenv "AUXLIBS" "-lnsl -lcrypto -lssl -lsasl2") + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (sbin (string-append out "/sbin")) + (lib (string-append out "/lib/postfix")) + (libexec (string-append out "/libexec/postfix")) + (etc (string-append out "/etc/postfix")) + (man (string-append out "/share/man")) + (doc (string-append out "/share/doc/postfix-" #$version)) + (html (string-append doc "/html"))) + (setenv "install_root" "wip-prefix") + (setenv "newaliases_path" (string-append bin "/newaliases")) + (setenv "mailq_path" (string-append bin "/mailq")) + (setenv "sendmail_path" (string-append sbin "/sendmail")) + (setenv "command_directory" sbin) + (setenv "shlib_directory" lib) + (setenv "daemon_directory" libexec) + (setenv "meta_directory" etc) + (setenv "sample_directory" etc) + (setenv "manpage_directory" man) + (setenv "readme_directory" doc) + (setenv "html_directory" html) + (setenv "sample_directory" (string-append out "/share/postfix"))))) + (replace 'configure + (lambda _ + (invoke "make" "makefiles" + "pie=yes" + "dynamicmaps=yes"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "non-interactive-package") + (delete-file-recursively "wip-prefix/var") + (copy-recursively "wip-prefix/etc" (string-append out "/etc")) + (copy-recursively (string-append "wip-prefix" out) out))))))) + (inputs + (list bdb + cyrus-sasl + libnsl + openssl + perl)) + (native-inputs + (list m4)) + (home-page "https://www.postfix.org") + (synopsis "sendmail compatible MTA") + (description + "Postfix is Wietse Venema's mail server that started life at IBM research +as an alternative to the widely-used Sendmail program. Now at Google, Wietse +continues to support Postfix. + +Postfix attempts to be fast, easy to administer, and secure. The outside has a +definite Sendmail-ish flavor, but the inside is completely different.") + (license (list license:ibmpl1.0 + license:epl2.0)))) + (define-public python-xdg (package (name "python-xdg") @@ -395,5 +532,6 @@ This package provides a daemon to display notifications of iCalendar events") epson-L365 tmux-plugin-resurrect tmux-plugin-continuum + postfix python-xdg remhind) |