unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 28452@debbugs.gnu.org
Subject: [bug#28452] [PATCH 2/6] services: Add a description and location for each service type.
Date: Wed, 13 Sep 2017 23:24:19 +0200	[thread overview]
Message-ID: <20170913212423.5037-2-ludo@gnu.org> (raw)
In-Reply-To: <20170913212423.5037-1-ludo@gnu.org>

* 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 063369122..513493b86 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.
+
+@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
 
 There can be only one instance of an extensible service type such as
diff --git a/gnu/services.scm b/gnu/services.scm
index 8ef1ae7c7..83a163b76 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>"
-- 
2.14.1

  reply	other threads:[~2017-09-13 21:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 21:17 [bug#28452] [PATCH 0/6] On-line doc and search for services Ludovic Courtès
2017-09-13 21:24 ` [bug#28452] [PATCH 1/6] ui: Generalize relevance computation Ludovic Courtès
2017-09-13 21:24   ` Ludovic Courtès [this message]
2017-09-13 21:24   ` [bug#28452] [PATCH 3/6] services: Add 'fold-service-types' Ludovic Courtès
2017-09-13 21:24   ` [bug#28452] [PATCH 4/6] guix system: Add 'search' command Ludovic Courtès
2017-09-13 21:24   ` [bug#28452] [PATCH 5/6] services: base: Add descriptions Ludovic Courtès
2017-09-13 21:24   ` [bug#28452] [PATCH 6/6] services: networking: " Ludovic Courtès
2017-09-14  7:37 ` [bug#28452] [PATCH 0/6] On-line doc and search for services Christopher Baines
2017-09-16 16:13   ` bug#28452: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170913212423.5037-2-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=28452@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).