From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uNG0G/Ra+mNh9QAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 20:01:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GPfAG/Ra+mPk/wAA9RJhRA (envelope-from ) for ; Sat, 25 Feb 2023 20:01:08 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 14B67AC69 for ; Sat, 25 Feb 2023 20:01:08 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677351668; a=rsa-sha256; cv=none; b=rUlKRvUoUhnAqVfjBiLWY833jLzHQF3uwtMdvQdrdxrVZPe605eOg3Ni8E61/kzFafBGgJ s4HqrlAYLI0it6ieAVqPvTveDjD6jczmY7iMKH4hVf4zys9q1llslrPOnWgC/Pxma6oW1K 2m1f942DH56Xgd8nkkfTwrNmXbt3s+yoXGfzMbqUL8VK8b6Tvh84KyQpdCfCc8cM1HF3jX p+k62L7wN0Q4gQzBswXzev9DFBua9ALIO0TZ5s7GZmV/U9N98mZ/KfTZpmMkvH3m5AnAJp 4D9ukzDxgxS6hL5T6L4uwENxt/ie1JGtUggoagSPWK+ilyDWojT8hFYNb4nBZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677351668; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=G25NLLYAwVrZzvGoKupEW+eq2wKSrHhXR305ylTApZM=; b=Q1nPrdfVYv6QCQRdi+3DVAI8qIWz8jzwrLy32xpCp1TSuLtfozEXpsbGJczFCe9Fn/7GGP yPGh4ck5g0OssVxcEQJBnMyawEna6i1HdjfcaE1XKFxqbk7/X5KQn37xuE9JiwSG7/nwfe VchwQaR3QYzVZoGrDdtj2/WMZYOAmHoxL2uv72ZrdvaV0dOBzO8Id9reS153/8jCIeulIA tIW9RZe5oGemx1lokyVPOX/fCQ+849uxvcPUj6ymG69yCtr+B8w3CfXtOJbceG9Mq+15+j BxP8MdELrlAUGeIV7zDHJlUBTPsJ37jpwVYgEsBRj8SO/O7TtB/BklFkqN6X/w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlP-0001xq-Ki; Sat, 25 Feb 2023 13:59:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzlC-0001pL-6U for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzlB-0000cH-TR for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzlB-0007wy-QK for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 24/27] services: lirc: Deprecate 'lirc-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735151430365 (code B ref 61789); Sat, 25 Feb 2023 18:59:05 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:34 +0000 Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkf-0007ta-Pk for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:34 -0500 Received: from smtpmciv8.myservices.hosting ([185.26.106.203]:35030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkZ-0007s0-Do for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv8.myservices.hosting (Postfix) with ESMTP id A81AD20D6F for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6695F8009E; Sat, 25 Feb 2023 19:58:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xFFip-sBd-6E; Sat, 25 Feb 2023 19:58:26 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 38E8A800A0; Sat, 25 Feb 2023 19:58:25 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:58:10 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 14B67AC69 X-Spam-Score: -3.18 X-Migadu-Spam-Score: -3.18 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: SxqdMWHDJdK8 * doc/guix.texi (Miscellaneous Services): Replace 'lirc-service' with 'lirc-service-type'. Document . * gnu/services/lirc.scm (): Set default values based on the arguments from the now deprecated 'lirc-service' procedure. (lirc-service-type): Set default value. (lirc-service): Deprecate procedure. --- doc/guix.texi | 40 +++++++++++++++++++++++++++------------- gnu/services/lirc.scm | 18 ++++++++++++------ 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 880972d112..466c6c98c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -37718,24 +37718,38 @@ Miscellaneous Services @end table @end deftp -@cindex lirc -@subsubheading Lirc Service +@cindex LIRC +@subsubheading LIRC Service The @code{(gnu services lirc)} module provides the following service. -@deffn {Scheme Procedure} lirc-service [#:lirc lirc] @ - [#:device #f] [#:driver #f] [#:config-file #f] @ - [#:extra-options '()] -Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that -decodes infrared signals from remote controls. +@defvar lirc-service-type +Type for a service that runs @url{http://www.lirc.org, LIRC}, a daemon +that decodes infrared signals from remote controls. -Optionally, @var{device}, @var{driver} and @var{config-file} -(configuration file name) may be specified. See @command{lircd} manual -for details. +The value for this service is a @code{} object. +@end defvar -Finally, @var{extra-options} is a list of additional command-line options -passed to @command{lircd}. -@end deffn +@deftp {Data Type} lirc-configuration +Data type representing the configuration of @command{lircd}. + +@table @asis +@item @code{lirc} (default: @code{lirc}) (type: file-like) +Package object for @command{lirc}. + +@item @code{device} (default: @code{#f}) (type: string) +@itemx @code{driver} (default: @code{#f}) (type: string) +@itemx @code{config-file} (default: @code{#f}) (type: string-or-file-like) +TODO. See @command{lircd} manual for details. + +@item @code{extra-options} (default: @code{'()}) (type: list-of-string) +Additional command-line options to pass to @command{lircd}. + +@end table +@end deftp + +@c TODO: Document , preferably by refactoring this to use +@c define-configuration and generating documentation from it. @cindex spice @subsubheading Spice Service diff --git a/gnu/services/lirc.scm b/gnu/services/lirc.scm index 492d77defa..92784b65ca 100644 --- a/gnu/services/lirc.scm +++ b/gnu/services/lirc.scm @@ -21,12 +21,13 @@ (define-module (gnu services lirc) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu packages lirc) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix records) #:use-module (ice-9 match) #:export (lirc-configuration lirc-configuation? - lirc-service + lirc-service ; deprecated lirc-service-type)) ;;; Commentary: @@ -40,9 +41,12 @@ (define-record-type* lirc-configuation? (lirc lirc-configuration-lirc ;file-like (default lirc)) - (device lirc-configuration-device) ;string - (driver lirc-configuration-driver) ;string - (config-file lirc-configuration-file) ;string | file-like object + (device lirc-configuration-device ;string + (default #f)) + (driver lirc-configuration-driver ;string + (default #f)) + (config-file lirc-configuration-file ;string | file-like object + (default #f)) (extra-options lirc-configuration-options ;list of strings (default '()))) @@ -81,11 +85,13 @@ (define lirc-service-type (service-extension activation-service-type (const %lirc-activation)))) (description "Run LIRC, a daemon that decodes infrared signals -from remote controls."))) +from remote controls.") + (default-value (lirc-configuration)))) -(define* (lirc-service #:key (lirc lirc) +(define-deprecated (lirc-service #:key (lirc lirc) device driver config-file (extra-options '())) + lirc-service-type "Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that decodes infrared signals from remote controls. -- 2.39.1