summary refs log tree commit diff
path: root/gnu/services/xorg.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-04-28 23:07:08 +0200
committerLudovic Courtès <ludo@gnu.org>2014-04-28 23:24:18 +0200
commitb5f4e686359d8842b329e6b161ef89fa6c04ebc3 (patch)
treec1a07dde7693ed45d9776095fb116d475bb6637a /gnu/services/xorg.scm
parent1aa0033b646b59e62d6a05716a21c631fca55c77 (diff)
downloadguix-b5f4e686359d8842b329e6b161ef89fa6c04ebc3.tar.gz
services: Rewrite using gexps.
* gnu/services.scm (<service>)[inputs]: Remove.
* gnu/system.scm (links): Remove.
  (etc-directory): Add PASSWD and SHADOW to #:inputs.
  (operating-system-boot-script): Pass ETC to 'dmd-configuration-file'.
  (operating-system-derivation): Remove EXTRAS from the union.
* gnu/system/linux.scm (pam-service->configuration): Rewrite in terms of
  'gexp->derivation'.  Compute the contents on the build side.  Expect
  'arguments' to contain a list of gexps.
  (pam-services->directory): Rewrite in terms of 'gexp->derivation'.
  (unix-pam-service): Change 'arguments' to a list of one gexp.
* gnu/system/shadow.scm (<user-account>)[inputs]: Remove.
  [shell]: Change default value to a gexp.
  (passwd-file): Rewrite in terms of 'gexp->derivation'.  Compute
  contents on the build side.
* gnu/services/base.scm (host-name-service, mingetty-service,
  nscd-service, syslog-service, guix-service): Change 'start' and 'stop'
  to gexps; remove 'inputs' field.
  (guix-build-accounts): Change 'shell' field to a gexp.
* gnu/services/networking.scm (static-networking-service): Change
  'start' and 'stop' to gexps; remove 'inputs' field.
* gnu/services/xorg.scm (slim-service): Likewise.
* gnu/services/dmd.scm (dmd-configuration-file): Expect ETC to be a
  derivation.  Change 'config' to a gexp.  Use 'gexp->file' instead of
  'text-file'.
* doc/guix.texi (Defining Services): Update nscd example with gexps, and
  without 'inputs'.  Add xref to "G-Expressions".
Diffstat (limited to 'gnu/services/xorg.scm')
-rw-r--r--gnu/services/xorg.scm19
1 files changed, 7 insertions, 12 deletions
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 086150a658..81b5bc17a5 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -27,6 +27,7 @@
   #:use-module (gnu packages gnustep)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages bash)
+  #:use-module (guix gexp)
   #:use-module (guix monads)
   #:use-module (guix derivations)
   #:export (xorg-start-command
@@ -190,9 +191,7 @@ reboot_cmd " dmd "/sbin/reboot
       (string-append "auto_login yes\ndefault_user " default-user)
       ""))))
 
-  (mlet %store-monad ((slim-bin (package-file slim "bin/slim"))
-                      (bash-bin (package-file bash "bin/bash"))
-                      (slim.cfg (slim.cfg)))
+  (mlet %store-monad ((slim.cfg (slim.cfg)))
     (return
      (service
       (documentation "Xorg display server")
@@ -200,15 +199,11 @@ reboot_cmd " dmd "/sbin/reboot
       (requirement '(host-name))
       (start
        ;; XXX: Work around the inability to specify env. vars. directly.
-       `(make-forkexec-constructor
-         ,bash-bin "-c"
-         ,(string-append "SLIM_CFGFILE=" (derivation->output-path slim.cfg)
-                         " " slim-bin
-                         " -nodaemon")))
-      (stop  `(make-kill-destructor))
-      (inputs `(("slim" ,slim)
-                ("slim.cfg" ,slim.cfg)
-                ("bash" ,bash)))
+       #~(make-forkexec-constructor
+          (string-append #$bash "/bin/sh") "-c"
+          (string-append "SLIM_CFGFILE=" #$slim.cfg
+                         " " #$slim "/bin/slim" " -nodaemon")))
+      (stop #~(make-kill-destructor))
       (respawn? #t)
       (pam-services
        ;; Tell PAM about 'slim'.