apteryx pushed a commit to branch master
in repository guix.
commit f47ff4fccec1a5ec8b939e9d7f54dffb4ef673d9
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Apr 10 16:05:43 2025 +0900
services: ngircd: Allow specifying Shepherd requirements.
* gnu/services/messaging.scm (ngircd-configuration)
[shepherd-requirement]: New field.
* gnu/services/messaging.scm (ngircd-shepherd-service) [requirement]: Use
it.
* doc/guix.texi (Messaging Services): Update doc.
Change-Id: I8164c132ca25830885005d0e8f55554047c84a95
---
doc/guix.texi | 3 +++
gnu/services/messaging.scm | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index c2640e5063..88a1505779 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -30407,6 +30407,9 @@ The @code{ngircd} package to use.
@item @code{debug?} (default: @code{#f}) (type: boolean)
Turn on debugging messages.
+@item @code{shepherd-requirement} (default: @code{(user-processes)}) (type:
list-of-symbols)
+Shepherd requirements the service should depend on.
+
@item @code{global} (type: ngircd-global)
A ngircd-global record object used to specify global options.
diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm
index 6a3569aa4c..c0f1f83d66 100644
--- a/gnu/services/messaging.scm
+++ b/gnu/services/messaging.scm
@@ -68,6 +68,7 @@
ngircd-configuration?
ngircd-configuration-ngircd
ngircd-configuration-debug?
+ ngircd-configuration-shepherd-requirement
ngircd-configuration-global
ngircd-configuration-limits
ngircd-configuration-options
@@ -1415,6 +1416,10 @@ for different users. Refer to @samp{man 5 ngircd.conf}
for more details.")
(boolean #f)
"Turn on debugging messages."
(serializer empty-serializer))
+ (shepherd-requirement
+ (list-of-symbols '(user-processes))
+ "Shepherd requirements the service should depend on."
+ (serializer empty-serializer))
(global
;; Always use a ngircd-global default to ensure the default addresses
;; listened to are known (used to compute the socket endpoints).
@@ -1583,7 +1588,7 @@ wrapper for the 'ngircd' command."
(define (ngircd-shepherd-service config)
(match-record config <ngircd-configuration>
- (ngircd debug? global ssl)
+ (ngircd debug? global shepherd-requirement ssl)
(let* ((ngircd.conf (serialize-ngircd-configuration config))
(ngircd (file-append ngircd "/sbin/ngircd"))
(addresses (ngircd-global-listen global))
@@ -1594,7 +1599,7 @@ wrapper for the 'ngircd' command."
ports*)))
(list (shepherd-service
(provision '(ngircd))
- (requirement '(user-processes networking syslogd))
+ (requirement shepherd-requirement)
(modules (cons '(srfi srfi-1) %default-modules))
(actions (list (shepherd-configuration-action ngircd.conf)))
(start #~(make-systemd-constructor