summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-12-29 11:29:19 -0500
committerLeo Famulari <leo@famulari.name>2016-12-29 17:28:34 -0500
commit87b52095584ccd2ff50f8abd2c585ea3650ece1c (patch)
tree0f51b06e183f91e5cf184dc1a09bdf71c0556eba /gnu
parent76b64381cbf1a1b48e17d5974f8dccc61a2d3e9c (diff)
downloadguix-87b52095584ccd2ff50f8abd2c585ea3650ece1c.tar.gz
gnu: mpd: Install systemd service files.
* gnu/packages/mpd.scm (mpd)[arguments]: Add 'install-service-files' phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/mpd.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 36a31048ae..5231c3f7f7 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -85,6 +85,17 @@ interfacing MPD in the C, C++ & Objective C languages.")
                (base32
                 "0c0p61p3jfh89pnqwd9nrw55krfvvnzhkpdq53g6njvg0aybh1c3"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-service-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (systemd (string-append out "/etc/systemd/system"))
+                    (systemd-user (string-append out "/etc/systemd/user")))
+               (install-file "systemd/system/mpd.service" systemd)
+               (install-file "systemd/user/mpd.service" systemd-user)
+               #t))))))
     (inputs `(("ao" ,ao)
               ("alsa-lib" ,alsa-lib)
               ("avahi" ,avahi)