aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/dmd.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-24 23:15:09 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-24 23:40:50 +0200
commit9fcc355529838f86f963dbdd7e47c0308df95a29 (patch)
tree7b3e985a8285060dfae43b208ed2b5b4ad289766 /gnu/system/dmd.scm
parent30f25b033c7fbcdcc7050b1655fc832252255c7e (diff)
downloadguix-9fcc355529838f86f963dbdd7e47c0308df95a29.tar
guix-9fcc355529838f86f963dbdd7e47c0308df95a29.tar.gz
gnu: vm: Add a service for the Guix daemon.
* gnu/system/dmd.scm (guix-service): New procedure. * gnu/system/vm.scm (system-qemu-image): Use it.
Diffstat (limited to 'gnu/system/dmd.scm')
-rw-r--r--gnu/system/dmd.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/system/dmd.scm b/gnu/system/dmd.scm
index 1e8767e357..a502c42e03 100644
--- a/gnu/system/dmd.scm
+++ b/gnu/system/dmd.scm
@@ -23,6 +23,8 @@
#:use-module (guix records)
#:use-module ((gnu packages system)
#:select (mingetty inetutils))
+ #:use-module ((gnu packages package-management)
+ #:select (guix))
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:export (service?
@@ -36,6 +38,7 @@
syslog-service
mingetty-service
+ guix-service
dmd-configuration-file))
;;; Commentary:
@@ -104,6 +107,17 @@
(inputs `(("inetutils" ,inetutils)
("syslog.conf" ,syslog.conf))))))
+(define* (guix-service store #:key (guix guix))
+ "Return a service that runs the build daemon from GUIX."
+ (let* ((drv (package-derivation store guix))
+ (daemon (string-append (derivation->output-path drv)
+ "/bin/guix-daemon")))
+ (service
+ (provision '(guix-daemon))
+ (start `(make-forkexec-constructor ,daemon))
+ (inputs `(("guix" ,guix))))))
+
+
(define (dmd-configuration-file store services)
"Return the dmd configuration file for SERVICES."
(define config