Skip to content
Snippets Groups Projects
Unverified Commit b714395a authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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'.
parent c7ae219e
No related branches found
No related tags found
No related merge requests found
...@@ -18020,6 +18020,10 @@ Udev extensions are composed into a list of rules, but the udev service ...@@ -18020,6 +18020,10 @@ Udev extensions are composed into a list of rules, but the udev service
value is itself a @code{<udev-configuration>} record. So here, we value is itself a @code{<udev-configuration>} record. So here, we
extend that record by appending the list of rules it contains to the extend that record by appending the list of rules it contains to the
list of contributed rules. list of contributed rules.
@item description
This is a string giving an overview of the service type. The string can
contain Texinfo markup (@pxref{Overview,,, texinfo, GNU Texinfo}).
@end table @end table
   
There can be only one instance of an extensible service type such as There can be only one instance of an extensible service type such as
......
...@@ -49,6 +49,9 @@ (define-module (gnu services) ...@@ -49,6 +49,9 @@ (define-module (gnu services)
service-type-compose service-type-compose
service-type-extend service-type-extend
service-type-default-value service-type-default-value
service-type-description
service-type-location
service service
service? service?
...@@ -145,7 +148,15 @@ (define-record-type* <service-type> service-type make-service-type ...@@ -145,7 +148,15 @@ (define-record-type* <service-type> service-type make-service-type
;; Optional default value for instances of this type. ;; Optional default value for instances of this type.
(default-value service-type-default-value ;Any (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) (define (write-service-type type port)
(format port "#<service-type ~a ~a>" (format port "#<service-type ~a ~a>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment