guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/07: services: Add a description and location for each service type.


From: Ludovic Courtès
Subject: 02/07: services: Add a description and location for each service type.
Date: Sat, 16 Sep 2017 12:11:50 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit b714395a39fffc60f75408504a23dfe27ad13fc2
Author: Ludovic Courtès <address@hidden>
Date:   Wed Sep 13 16:01:36 2017 +0200

    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'.
---
 doc/guix.texi    |  4 ++++
 gnu/services.scm | 13 ++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index c9505f4..b2eed51 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -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
 extend that record by appending the list of rules it contains to the
 list of contributed rules.
+
address@hidden 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
 
 There can be only one instance of an extensible service type such as
diff --git a/gnu/services.scm b/gnu/services.scm
index 8ef1ae7..83a163b 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>"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]