diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-09-26 00:07:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-26 00:07:42 +0200 |
commit | 349746dfcd9a07e3b5908d459d0800fd5d44c3b9 (patch) | |
tree | c2cdcbd00e92fba3ac7ed0c894b2ace44c9af2f2 /gnu/system/dmd.scm | |
parent | de8bcdaeb5a828d8cee85f8700e23e15b49f4e24 (diff) | |
download | guix-patches-349746dfcd9a07e3b5908d459d0800fd5d44c3b9.tar guix-patches-349746dfcd9a07e3b5908d459d0800fd5d44c3b9.tar.gz |
gnu: vm: Add nscd service.
* gnu/system/dmd.scm (nscd-service): New procedure.
* gnu/system/vm.scm (system-qemu-image): Use it. Make /var/run/nscd.
Diffstat (limited to 'gnu/system/dmd.scm')
-rw-r--r-- | gnu/system/dmd.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/system/dmd.scm b/gnu/system/dmd.scm index 7fc4650c25..b248d9f0c5 100644 --- a/gnu/system/dmd.scm +++ b/gnu/system/dmd.scm @@ -21,6 +21,8 @@ #:use-module (guix packages) #:use-module (guix derivations) #:use-module (guix records) + #:use-module ((gnu packages base) + #:select (glibc-final)) #:use-module ((gnu packages system) #:select (mingetty inetutils)) #:use-module ((gnu packages package-management) @@ -39,6 +41,7 @@ host-name-service syslog-service mingetty-service + nscd-service guix-service static-networking-service @@ -87,6 +90,24 @@ (start `(make-forkexec-constructor ,mingetty-bin "--noclear" ,tty)) (inputs `(("mingetty" ,mingetty)))))) +(define* (nscd-service store + #:key (glibc glibc-final)) + "Return a service that runs libc's name service cache daemon (nscd)." + (let ((nscd (string-append (package-output store glibc) "/sbin/nscd"))) + (service + (provision '(nscd)) + (start `(make-forkexec-constructor ,nscd "-f" "/dev/null")) + + ;; XXX: Local copy of 'make-kill-destructor' because the one upstream + ;; uses the broken 'opt-lambda' macro. + (stop `(lambda* (#:optional (signal SIGTERM)) + (lambda (pid . args) + (kill pid signal) + #f))) + + (respawn? #f) + (inputs `(("glibc" ,glibc)))))) + (define (syslog-service store) "Return a service that runs 'syslogd' with reasonable default settings." |