From 008a0f87c3f5278ab256630e5dbe772a2771a6ab Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 26 Jan 2022 09:26:55 +0100 Subject: gnu: zabbix-server: Adjust style. * gnu/packages/monitoring.scm (zabbix-server)[arguments]: Rewrite as gexp, use #:phases matching, and remove trailing #t's. --- gnu/packages/monitoring.scm | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index e9d2934ca1..14e9ffc459 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2018, 2019, 2020 Oleg Pykhalov ;;; Copyright © 2020 Alex ter Weele ;;; Copyright © 2020 Lars-Dominik Braun -;;; Copyright © 2021 Marius Bakke +;;; Copyright © 2021, 2022 Marius Bakke ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Raphaël Mélotte ;;; @@ -196,10 +196,10 @@ solution (client-side agent)") (name "zabbix-server") (outputs '("out" "front-end" "schema")) (arguments - (substitute-keyword-arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'install-front-end + (substitute-keyword-arguments (package-arguments zabbix-agentd) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'install 'install-front-end (lambda* (#:key outputs #:allow-other-keys) (let* ((php (string-append (assoc-ref outputs "front-end") "/share/zabbix/php")) @@ -207,11 +207,10 @@ solution (client-side agent)") (etc (string-append php "/etc"))) (mkdir-p php) (copy-recursively "ui" php) - ;; Make front-end write config to ‘/etc/zabbix’ directory. + ;; Make front-end read config from ‘/etc/zabbix’ directory. (rename-file front-end-conf (string-append front-end-conf "-example")) - (symlink "/etc/zabbix" front-end-conf)) - #t)) + (symlink "/etc/zabbix" front-end-conf)))) (add-after 'install 'install-schema (lambda* (#:key outputs #:allow-other-keys) (let ((database-directory @@ -220,21 +219,19 @@ solution (client-side agent)") (for-each delete-file (find-files "database" "Makefile\\.in|\\.am$")) (mkdir-p database-directory) - (copy-recursively "database" database-directory)) - #t))) - ,@(package-arguments zabbix-agentd)) - ((#:configure-flags flags) - `(cons* "--enable-server" - "--with-postgresql" - (string-append "--with-libevent=" - (assoc-ref %build-inputs "libevent")) - "--with-net-snmp" - (string-append "--with-gnutls=" - (assoc-ref %build-inputs "gnutls")) - "--with-libcurl" - (string-append "--with-zlib=" - (assoc-ref %build-inputs "zlib")) - ,flags)))) + (copy-recursively "database" database-directory)))))) + ((#:configure-flags flags ''()) + #~(append (list "--enable-server" + "--with-postgresql" + (string-append "--with-libevent=" + (assoc-ref %build-inputs "libevent")) + "--with-net-snmp" + (string-append "--with-gnutls=" + (assoc-ref %build-inputs "gnutls")) + "--with-libcurl" + (string-append "--with-zlib=" + (assoc-ref %build-inputs "zlib"))) + #$flags)))) (inputs (modify-inputs (package-inputs zabbix-agentd) (prepend curl -- cgit v1.2.3