guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/06: gnu: zabbix-server: Adjust style.


From: guix-commits
Subject: 03/06: gnu: zabbix-server: Adjust style.
Date: Wed, 26 Jan 2022 03:34:25 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 008a0f87c3f5278ab256630e5dbe772a2771a6ab
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Wed Jan 26 09:26:55 2022 +0100

    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 <go.wigust@gmail.com>
 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
-;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
 ;;;
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]