aboutsummaryrefslogtreecommitdiff
path: root/gnu/services.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-13 16:01:36 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-16 17:47:46 +0200
commitb714395a39fffc60f75408504a23dfe27ad13fc2 (patch)
tree0ddf0e4f385d0809ad0d0d1ce67aa0b3128f74fb /gnu/services.scm
parentc7ae219e399804a8eb33f176e532a79b389ee1f1 (diff)
downloadguix-b714395a39fffc60f75408504a23dfe27ad13fc2.tar
guix-b714395a39fffc60f75408504a23dfe27ad13fc2.tar.gz
services: Add a description and location for each service type.
* gnu/services.scm (<service-type>)[description, location]: New field. * doc/guix.texi (Service Types and Services): Document 'description'.
Diffstat (limited to 'gnu/services.scm')
-rw-r--r--gnu/services.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/services.scm b/gnu/services.scm
index 8ef1ae7c77..83a163b766 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -49,6 +49,9 @@
service-type-compose
service-type-extend
service-type-default-value
+ service-type-description
+ service-type-location
+
service
service?
@@ -145,7 +148,15 @@
;; Optional default value for instances of this type.
(default-value service-type-default-value ;Any
- (default &no-default-value)))
+ (default &no-default-value))
+
+ ;; Meta-data.
+ (description service-type-description ;string
+ (default #f))
+ (location service-type-location ;<location>
+ (default (and=> (current-source-location)
+ source-properties->location))
+ (innate)))
(define (write-service-type type port)
(format port "#<service-type ~a ~a>"