services: guix-publish: Depend on 'avahi-daemon' when needed.

* gnu/services/base.scm (guix-publish-shepherd-service): Add
'user-processes' to 'requirement'.  When ADVERTISE? is true, also add
'avahi-daemon'.
This commit is contained in:
Ludovic Courtès 2020-12-09 11:56:09 +01:00
parent 59a6780f70
commit f066e65713
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -1825,7 +1825,9 @@ raise a deprecation warning if the 'compression-level' field was used."
advertise?)
(list (shepherd-service
(provision '(guix-publish))
(requirement '(guix-daemon))
(requirement `(user-processes
guix-daemon
,@(if advertise? '(avahi-daemon) '())))
(start #~(make-forkexec-constructor
(list #$(file-append guix "/bin/guix")
"publish" "-u" "guix-publish"