~ruther/guix-local

4a663ca4e8b5ded9a3d92870fba8f2ebde22d75a — Ludovic Courtès 10 years ago 5e3bfe9
services: dbus: Honor the config's dbus package.

* gnu/services/dbus.scm (dbus-dmd-service): Rewrite using 'match-lambda'
  so that the config's dbus package is used.  Fixes a regression
  introduced in 64643b9.
1 files changed, 11 insertions(+), 9 deletions(-)

M gnu/services/dbus.scm
M gnu/services/dbus.scm => gnu/services/dbus.scm +11 -9
@@ 118,15 118,17 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in
                    (execl prog)))
                (waitpid pid)))))))

(define (dbus-dmd-service config)
  (list (dmd-service
         (documentation "Run the D-Bus system daemon.")
         (provision '(dbus-system))
         (requirement '(user-processes))
         (start #~(make-forkexec-constructor
                   (list (string-append #$dbus "/bin/dbus-daemon")
                         "--nofork" "--system")))
         (stop #~(make-kill-destructor)))))
(define dbus-dmd-service
  (match-lambda
    (($ <dbus-configuration> dbus)
     (list (dmd-service
            (documentation "Run the D-Bus system daemon.")
            (provision '(dbus-system))
            (requirement '(user-processes))
            (start #~(make-forkexec-constructor
                      (list (string-append #$dbus "/bin/dbus-daemon")
                            "--nofork" "--system")))
            (stop #~(make-kill-destructor)))))))

(define dbus-root-service-type
  (service-type (name 'dbus)