From patchwork Sun Mar 17 20:36:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Gesthuizen X-Patchwork-Id: 1491 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9C8B216D8F; Sun, 17 Mar 2019 20:37:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7B69D16D59 for ; Sun, 17 Mar 2019 20:37:07 +0000 (GMT) Received: from localhost ([127.0.0.1]:59957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5cWo-0002HW-Ti for patchwork@mira.cbaines.net; Sun, 17 Mar 2019 16:37:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5cWm-0002HR-D5 for guix-patches@gnu.org; Sun, 17 Mar 2019 16:37:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5cWk-0005R8-TX for guix-patches@gnu.org; Sun, 17 Mar 2019 16:37:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5cWk-0005Qy-Jd for guix-patches@gnu.org; Sun, 17 Mar 2019 16:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h5cWk-0002y5-5b for guix-patches@gnu.org; Sun, 17 Mar 2019 16:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#34067] Add input-wacom/inputattach Resent-From: Tim Gesthuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Mar 2019 20:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34067 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 34067-submit@debbugs.gnu.org id=B34067.155285501011389 (code B ref 34067); Sun, 17 Mar 2019 20:37:02 +0000 Received: (at 34067) by debbugs.gnu.org; 17 Mar 2019 20:36:50 +0000 Received: from localhost ([127.0.0.1]:47807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h5cWS-0002xV-FV for submit@debbugs.gnu.org; Sun, 17 Mar 2019 16:36:50 -0400 Received: from sonic310-11.consmr.mail.ir2.yahoo.com ([77.238.177.32]:37522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h5cWM-0002xC-C5 for 34067@debbugs.gnu.org; Sun, 17 Mar 2019 16:36:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1552854992; bh=euSRKiIkwhLhoEorxtnzC+0piNIQYdNu0KtUpZeWRvk=; h=References:From:To:Cc:Subject:Date:From:Subject; b=cRw4DRiIi64N2Uipoiuk+KHlC+Cw6GSx7mLgvNgzeizkfJkGQ07WEs0A5Fw7tFw4cS5ChusyvtSxdNouhvUKeuYstuHr+Wt8rro+6BcoeAd6p0o7ZsooPGuu4aqQJGGjcyNFMwxbTlVwRAG0E/0ErKcf+LtjbCXcjsmveACqoj527hamyg0W9zjACNsn5Kdor5sK/N12+/80/Vm6Fqrdr7OYihLqcwSWOCOAjeIRmx45efzsGJtOHYuvqqrZHOcCUMPvCPuVViDGCGM6LGnMyehIEuSTSsJULvu/LMjcRtEoMDO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UJxE0qbhuHtViuBpyyb.hWie69NMklRM5kT C_oiOrlSPvdWeuDOdeWM6.gIV4XMsMiO5WhSJNRdM8lNyDIfoSjfWqrF4zbclGy6zq_qlkKylPiI wHX92vZgxqvY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Sun, 17 Mar 2019 20:36:32 +0000 Received: from ip5f5acae0.dynamic.kabel-deutschland.de (EHLO finkpad) ([95.90.202.224]) by smtp418.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b160fb8337a04a6a704da48ce5a1bd01; Sun, 17 Mar 2019 20:36:30 +0000 (UTC) References: <87fttvl9b1.fsf@yahoo.de> <87va2jnr12.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Tim Gesthuizen In-reply-to: <87va2jnr12.fsf@gnu.org> Date: Sun, 17 Mar 2019 21:36:27 +0100 Message-ID: <87mult44s4.fsf@yahoo.de> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 34067@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Ludo, sorry for the long delay! For now I guess it would be the best to not package the actual driver and rely on the one that is merged into linux-libre. I reduced the patches to only add inputattach and the service type for it. Tim. From 2dffbe48072e0281651a5200d75c7783de4eacbd Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Sat, 5 Jan 2019 23:28:18 +0100 Subject: [PATCH 2/2] gnu: Add inputattach service Add a service that runs inputattach as a daemon to translate events from serial ports. * gnu/services/desktop.scm (): New record type. * gnu/services/desktop.scm (inputattach-service-type): New service type. * doc/guix.texi (Miscellaneous Services): Add inputattach Service subsubheading. --- doc/guix.texi | 16 ++++++++++++++ gnu/services/desktop.scm | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 9fb5cff06d..38d5daccd7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22306,6 +22306,22 @@ that enables sharing the clipboard with a vm and setting the guest display resolution when the graphical console window resizes. @end deffn +@cindex inputattach +@subsubheading inputattach Service + +@deftp {Data Type} inputattach-configuration +@table @asis +@item @code{device-type} The type of device to connect to. +@item @code{device} The device file to connect to the device. +@item @code{log-file} The file to log messages to. +@end table +@end deftp + +@deffn {Scheme Procedure} inputattach-service-type +Return a service that runs inputattach on a device and +dispatches events from it. +@end deffn + @subsection Dictionary Services @cindex dictionary The @code{(gnu services dict)} module provides the following service: diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index ce63969dc8..16687236eb 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2017, 2019 Christopher Baines +;;; Copyright © 2019 Tim Gesthuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -123,6 +124,10 @@ enlightenment-desktop-configuration? enlightenment-desktop-service-type + inputattach-configuration + inputattach-configuration? + inputattach-service-type + %desktop-services)) ;;; Commentary: @@ -1015,6 +1020,47 @@ thumbnails and makes setuid the programs which enlightenment needs to function as expected."))) +;;; +;;; inputattach-service-type +;;; + +(define-record-type* + inputattach-configuration + make-inputattach-configuration + inputattach-configuration? + (device-type inputattach-configuration-devicetype + (default "wacom")) + (device inputattach-configuration-device + (default "/dev/ttyS0")) + (log-file inputattach-configuration-log-file + (default #f))) + +(define inputattach-shepherd-service + (match-lambda + (($ type device log-file) + (list (shepherd-service + (provision '(inputattach)) + (requirement '(udev)) + (documentation "inputattach daemon") + (start #~(make-forkexec-constructor + (list (string-append #$inputattach + "/bin/inputattach") + (string-append "--" #$type) + #$device) + #:log-file #$log-file)) + (stop #~(make-kill-destructor))))))) + +(define inputattach-service-type + (service-type + (name 'inputattach) + (extensions + (list (service-extension shepherd-root-service-type + inputattach-shepherd-service))) + (default-value (inputattach-configuration)) + (description "Return a service that runs inputattach on a device and +dispatches events from it."))) + + ;;; ;;; The default set of desktop services. ;;; -- 2.21.0