From 5afa23e1805e68a7cd9adb2145094dcd29bf67d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Tue, 29 Oct 2019 23:26:37 +0100
Subject: [PATCH] services: colord: Deprecate 'colord-service' procedure.

* gnu/services/desktop.scm (colord-service-type)[default-value]: New field.
(colord-service): Define with 'define-deprecated'.
(%desktop-services): Use 'colord-service-type' instead of 'colord-service'.
* doc/guix.texi (Desktop Services): Adjust accordingly.
---
 doc/guix.texi            | 5 +++--
 gnu/services/desktop.scm | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f6dcb2ac63f..7b1ee163c4d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15530,8 +15530,9 @@ notifications and ways to mount/unmount disks.  Programs that talk to UDisks
 include the @command{udisksctl} command, part of UDisks, and GNOME Disks.
 @end deffn
 
-@deffn {Scheme Procedure} colord-service [#:colord @var{colord}]
-Return a service that runs @command{colord}, a system service with a D-Bus
+@deffn {Scheme Variable} colord-service-type
+This is the type of the service that runs @command{colord}, a system
+service with a D-Bus
 interface to manage the color profiles of input and output devices such as
 screens and scanners.  It is notably used by the GNOME Color Manager graphical
 tool.  See @uref{https://www.freedesktop.org/software/colord/, the colord web
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 449b606a314..0152e86e8af 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -514,12 +514,14 @@ (define colord-service-type
 
                        ;; It provides polkit "actions".
                        (service-extension polkit-service-type list)))
+                (default-value colord)
                 (description
                  "Run @command{colord}, a system service with a D-Bus
 interface to manage the color profiles of input and output devices such as
 screens and scanners.")))
 
-(define* (colord-service #:key (colord colord))
+(define-deprecated (colord-service #:key (colord colord))
+  colord-service-type
   "Return a service that runs @command{colord}, a system service with a D-Bus
 interface to manage the color profiles of input and output devices such as
 screens and scanners.  It is notably used by the GNOME Color Manager graphical
@@ -1094,7 +1096,7 @@ (define %desktop-services
          (service upower-service-type)
          (accountsservice-service)
          (service cups-pk-helper-service-type)
-         (colord-service)
+         (service colord-service-type)
          (geoclue-service)
          (service polkit-service-type)
          (elogind-service)
-- 
GitLab