From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:38276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glHTy-0002Xb-KZ for guix-patches@gnu.org; Sun, 20 Jan 2019 13:06:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glHTu-0004Yi-Iq for guix-patches@gnu.org; Sun, 20 Jan 2019 13:06:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39889) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glHTu-0004Yc-Ez for guix-patches@gnu.org; Sun, 20 Jan 2019 13:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1glHTu-0000HO-7F for guix-patches@gnu.org; Sun, 20 Jan 2019 13:06:02 -0500 Subject: [bug#34067] Add input-wacom/inputattach Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87fttvl9b1.fsf@yahoo.de> Date: Sun, 20 Jan 2019 19:05:29 +0100 In-Reply-To: <87fttvl9b1.fsf@yahoo.de> (Tim Gesthuizen's message of "Mon, 14 Jan 2019 13:20:50 +0100") Message-ID: <87va2jnr12.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Tim Gesthuizen Cc: 34067@debbugs.gnu.org Hi Tim, Thanks for the patches! Here=E2=80=99s a quick review: >>>From 9c5fc83d9d5a162fb3d4662c3e66cd77918159da Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Wed, 9 Jan 2019 18:40:42 +0100 > Subject: [PATCH 1/7] gnu: Add linux-libre-fill-version > > linux-libre-fill-version adds a patch version to the version if it is > missing. > > * gnu/packages/linux.scm (linux-libre-fill-version): New function Could the =E2=80=98version-major+minor=E2=80=99 procedure play a similar ro= le for what you want? >>>From 24f65c10bcfc8349778d024f039528997c9e7da9 Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Wed, 9 Jan 2019 17:56:21 +0100 > Subject: [PATCH 2/7] gnu: Add linux-libre-module-path > > Add a function that evaluates to the module path where the modules for > linux-libre in a specific version are stored. > > * gnu/packages/linux.scm (linux-libre-module-path): New function s/path/file-name/ :-) >>>From e771153f957e1bd41dbef32bf6f7e997f9a732f5 Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Fri, 4 Jan 2019 12:22:34 +0100 > Subject: [PATCH 3/7] gnu: linux-libre: Copy source to the store > > The source code is needed by some kernel modules to compile. The item in = the > store only symlinks the build directory in /tmp which is not reachable la= ter > on and is a source of non determinism for the store item. > This patch deletes the symlinks and copies the source to a separate outpu= t. > > * gnu/packages/linux.scm (linux-libre): > [outputs]: Add output source > [arguments]: Add phase to copy source to the store item. I=E2=80=99d rather avoid that and this would fill up stores. What about si= mply writing: (inputs `(("linux-libre-source" ,(package-source linux-libre)) =E2=80=A6)) in the =E2=80=98input-wacom=E2=80=99 package? The downside is that the pac= kage definition of =E2=80=98input-wacom=E2=80=99 would have to unpack it, etc., = but it seems worth it. >>>From 4cc4535566f0496e24fcf567c73494c18d4b8a08 Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Sat, 5 Jan 2019 00:32:16 +0100 > Subject: [PATCH 4/7] gnu: Add input-wacom > > * gnu/packages/firmware.scm (input-wacom): New variable [...] > + (synopsis "Linux kernel driver for various wacom touchscreens") So this should go to linux.scm rather than firmware.scm. :-) Could you please make sure the code doesn=E2=80=99t contain binary blobs=E2= =80=94e.g., in the form of large =E2=80=98char=E2=80=99 arrays? You can maybe just che= ck whether Debian =E2=80=9Cmain=E2=80=9D contains this driver. Then there=E2=80=99s the question of which kernel version to target. I gue= ss it=E2=80=99s reasonable to just choose whatever =E2=80=98linux-libre=E2=80= =99 points to. Thoughts? > + (description "A set of kernel drivers that add support for various w= acom > +touchscreens. In combination with xf86-input-wacom and libwacom it forms= a set > +of modules to support wacom touchscreens with the X server.") Please write full sentences and address the two-space-after-period issue that =E2=80=98guix lint=E2=80=99 tells you about. :-) >>>From cb02272b9759426427ba1accc60915b455dfb357 Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Sat, 5 Jan 2019 20:55:14 +0100 > Subject: [PATCH 5/7] gnu: Add inputattach > > * gnu/packages/firmware.scm (inputattach): New variable [...] > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((target-dir (string-append > + (assoc-ref outputs "out") > + "/bin/"))) > + (mkdir-p target-dir) > + (copy-file "inputattach/inputattach" > + (string-append target-dir > + "inputattach")))))))) Please return #t. >>>From 8a1bb6706be11cd9c1e683e6d242accad0346d6b Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Sat, 5 Jan 2019 23:28:18 +0100 > Subject: [PATCH 6/7] gnu: Add inputattach service > > Add a service that runs inputattach as a daemon to translate events from > serial ports. > > * gnu/local.mk: Add gnu/services/hardware.scm > * gnu/services/hardware.scm (): New record type > * gnu/services/hardware.scm (inputattach-service-type): New service type > * gnu/services/hardware.scm (inputattach-service): New function > > squash Leftover. :-) Also, no need to repeat the file name when it=E2=80=99s the= same. > +++ b/gnu/services/hardware.scm Do you think desktop.scm would make sense? > +(define-record-type* > + inputattach-configuration > + make-inputattach-configuration > + inputattach-configuration? > + (devicetype inputattach-configuration-devicetype > + (default "wacom")) =E2=80=98device-type=E2=80=99 > +(define inputattach-service-type > + (service-type > + (name 'inputattach) > + (extensions > + (list (service-extension shepherd-root-service-type > + inputattach-shepherd-service))) > + (default-value (inputattach-configuration)))) Please add a =E2=80=98description=E2=80=99 field so people can find out abo= ut it with =E2=80=98guix system search=E2=80=99. > +(define* (inputattach-service #:key (type "wacom") (device "/dev/ttyS0")= (log-file #f)) This can be removed (we no longer provide such procedures.) >>>From a9cd86ad2244fff023f0c1bf4038748872aeab13 Mon Sep 17 00:00:00 2001 > From: Tim Gesthuizen > Date: Sun, 6 Jan 2019 11:56:57 +0100 > Subject: [PATCH 7/7] doc: Add documentation for inputattach-service > > * doc/guix.texi (Miscellaneous Services): Add inputattach Service > subsubheading Can be squashed with the previous patch. > +The @code{(gnu services hardware)} module provides the following service. > + > +@deffn {Scheme Procedure} inputattach-service [#:type "wacom"] @ > + [#:device "/dev/ttyS0"] [#:log-file #f] > +Return a service that runs inputattach on @var{device} to decode events = from > +@var{type}. > +@end deffn Here could you document =E2=80=98inputattach-service-type=E2=80=99 and =E2=80=98inputattach-configuration=E2=80=99? Thanks! Ludo=E2=80=99.