From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsF9e-0008Vb-N4 for guix-patches@gnu.org; Wed, 13 Sep 2017 17:25:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsF9d-0007Xh-P5 for guix-patches@gnu.org; Wed, 13 Sep 2017 17:25:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58549) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsF9d-0007Xb-Ky for guix-patches@gnu.org; Wed, 13 Sep 2017 17:25:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dsF9b-0005YV-TF for guix-patches@gnu.org; Wed, 13 Sep 2017 17:25:03 -0400 Subject: [bug#28452] [PATCH 2/6] services: Add a description and location for each service type. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 13 Sep 2017 23:24:19 +0200 Message-Id: <20170913212423.5037-2-ludo@gnu.org> In-Reply-To: <20170913212423.5037-1-ludo@gnu.org> References: <20170913212423.5037-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28452@debbugs.gnu.org * gnu/services.scm ()[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{} 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 ; + (default (and=> (current-source-location) + source-properties->location)) + (innate))) (define (write-service-type type port) (format port "#" -- 2.14.1