From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AP2WG4jfwWPlEwAAbAwnHQ (envelope-from ) for ; Fri, 13 Jan 2023 23:47:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kBB7G4jfwWNqCgAAauVa8A (envelope-from ) for ; Fri, 13 Jan 2023 23:47:36 +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 ECE892798 for ; Fri, 13 Jan 2023 23:47:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGSpO-00058e-OZ; Fri, 13 Jan 2023 17:47:14 -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 1pGSpC-00055X-23 for guix-patches@gnu.org; Fri, 13 Jan 2023 17:47:03 -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 1pGSpB-0003GP-Q5 for guix-patches@gnu.org; Fri, 13 Jan 2023 17:47:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGSpB-0007Gh-MU for guix-patches@gnu.org; Fri, 13 Jan 2023 17:47:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60791] [PATCH] gnu: services: Add joycond-service. References: In-Reply-To: Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Jan 2023 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60791 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60791@debbugs.gnu.org Cc: dthompson2@worcester.edu Received: via spool by 60791-submit@debbugs.gnu.org id=B60791.167364998727887 (code B ref 60791); Fri, 13 Jan 2023 22:47:01 +0000 Received: (at 60791) by debbugs.gnu.org; 13 Jan 2023 22:46:27 +0000 Received: from localhost ([127.0.0.1]:52665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGSod-0007Fj-7s for submit@debbugs.gnu.org; Fri, 13 Jan 2023 17:46:27 -0500 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:41722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGSoa-0007FV-Un for 60791@debbugs.gnu.org; Fri, 13 Jan 2023 17:46:25 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id BA6C120991; Fri, 13 Jan 2023 23:46:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 7896080096; Fri, 13 Jan 2023 23:46:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BCFjwBGgFS0x; Fri, 13 Jan 2023 23:46:21 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id EB91F80093; Fri, 13 Jan 2023 23:46:20 +0100 (CET) Message-ID: <5eaac013-2a20-c322-24a9-ab389ec974c5@makinata.eu> Date: Fri, 13 Jan 2023 22:46:19 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US From: Bruno Victal Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 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-Country: US X-Migadu-Flow: FLOW_IN 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-Seal: i=1; s=key1; d=yhetil.org; t=1673650056; a=rsa-sha256; cv=none; b=DQ2mDYBglm49KFM7pHNp/2++b7NPSzGqAvdZZgyHYbWqSigE40e0zyfs5pt+WjUexpQ47/ e2Q+v9vcuYm42XrVu+1ah/8SKcJKSTH+f9uCfAnB0BspoYoCo7db0WH+bKsxDNy8JdhE7+ gbc8mpakhqdFlDH+PPPCRGJHGmSSKvwiO/E5O8E8g8CrMB2TNvoF7LjEQ+26ufnGjv9ZSi djdj7u0dQ7T0+nj5rv9zxp2ePY+hqXisoLvQfycesuDLtHJbUisD99JMyJJlzeblkcRz90 gfqSmQGpd6R0FSXERj4KeXNs0jMHVPR86c1UJO6rwdvoZFklsRR3pWVIm05VeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673650056; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=sh7NDq9Rf4Bmq5RrQIv8hZEPcMnqmkRuhqDg/39ZWy8=; b=uOimhMuBV9UOGhltbrlPQdoxfnAfcndJ+vAAa1RkVz2EbLON2nNYq6TRcB/0xUPrQ5bhj3 meg8e+RaNMC9sTbhvHKpfUIq47M8r+SWcTKNJwWKt3x+usIfC/HZi/aw2XW3UFbfgZNWFD x22yBrY0J04KETx2qMEqpRgeq0jZp+MsGSREaveeHU0o3S32ZSZq7s3T8UJdwu4tdRWoKZ ctI9o/LvtpdPIWDG8poIGy9QCPSRLfdEl0ogwRh1VUFMucpv+oUv14fq8xJ9DwmcqvXThD d1LaryeM9m7/H56BHNaLKnug7JrouqCvsyPyr+LYFWChlzeYTSOqNjDiiGRLEA== X-Migadu-Queue-Id: ECE892798 X-Migadu-Scanner: scn0.migadu.com 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 X-Migadu-Spam-Score: -3.40 X-Spam-Score: -3.40 X-TUID: oRTy/F03+xXb Hi, --8<---------------cut here---------------start------------->8--- +@defvar {Scheme Variable} joycond-service-type +Service type for the joycond service. +@end defvar --8<---------------cut here---------------end--------------->8--- Should be `@defvar joycond-service-type'. --8<---------------cut here---------------start------------->8--- +(define-record-type* + joycond-configuration make-joycond-configuration + joycond-configuration? + (joycond joycond-configuration-joycond (default joycond))) --8<---------------cut here---------------end--------------->8--- This could be replaced with define-configuration/no-serialization since the only field here is a package / file-like object. (see [1], [2] for examples) I'd prefer the field be called 'package' here. --8<---------------cut here---------------start------------->8--- +(define (joycond-shepherd-service config) + (let ((joycond (joycond-configuration-joycond config))) + (list (shepherd-service + (documentation "Run joycond.") + (provision '(joycond)) + (requirement '(bluetooth)) + (start #~(make-forkexec-constructor + (list #$(file-append joycond "/bin/joycond")))) + (stop #~(make-kill-destructor)))))) --8<---------------cut here---------------end--------------->8--- You might prefer match-record here but this is okay as well. [1]: https://issues.guix.gnu.org/60788 [2]: ddclient-configuration in gnu/services/dns.scm Cheers, Bruno