From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvqBh-0000ct-Ja for guix-patches@gnu.org; Sat, 23 Sep 2017 15:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvqBe-0003Ib-EG for guix-patches@gnu.org; Sat, 23 Sep 2017 15:34:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46244) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvqBe-0003IV-BD for guix-patches@gnu.org; Sat, 23 Sep 2017 15:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvqBe-0005ie-5G for guix-patches@gnu.org; Sat, 23 Sep 2017 15:34:02 -0400 Subject: [bug#28572] [PATCH] gnu: Add footswitch. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvqB8-0000bA-Qi for guix-patches@gnu.org; Sat, 23 Sep 2017 15:33:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvqB5-0002ul-N6 for guix-patches@gnu.org; Sat, 23 Sep 2017 15:33:30 -0400 Received: from dd5424.kasserver.com ([85.13.138.252]:47262) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvqB5-0002to-G2 for guix-patches@gnu.org; Sat, 23 Sep 2017 15:33:27 -0400 From: Stefan =?UTF-8?Q?Reich=C3=B6r?= Date: Sat, 23 Sep 2017 21:33:20 +0200 Message-ID: <150619514678.21354.17534737346595094775.stgit@sandburg> 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: 28572@debbugs.gnu.org I have tested the built footswitch tool with my foot switch. It works as = expected. Is accessibility.scm the correct location for this tool? * gnu/packages/accessibility.scm (footswitch): New variable. --- gnu/packages/accessibility.scm | 45 ++++++++++++++++++++++++++++++++++= +++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/gnu/packages/accessibility.scm b/gnu/packages/accessibility.= scm index 0795808..78cb64a 100644 --- a/gnu/packages/accessibility.scm +++ b/gnu/packages/accessibility.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017 ng0 +;;; Copyright =C2=A9 2017 Stefan Reich=C3=B6r ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) #:use-module (gnu packages xml) @@ -29,7 +32,8 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) - #:use-module (gnu packages pkg-config)) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages libusb)) =20 (define-public florence (package @@ -76,3 +80,42 @@ available to help to click.") ;; The documentation is under FDL1.2, but we do not install the ;; documentation. (license license:gpl2+))) + +(define-public footswitch + (let ((commit "7cb0a9333a150c27c7e4746ee827765d244e567a")) + (package + (name "footswitch") + (version (git-version "0.1" "1" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rgerganov/footswitch") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0mg1vr4a9vls5y435w7wdnr1vb5059gy60lvrdfjgzhd2w= wf47iw")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("hidapi" ,hidapi))) + (arguments + `(#:tests? #f ; no tests + #:make-flags (list "CC=3Dgcc") + #:phases (modify-phases %standard-phases + (delete 'configure) + ;; Install target in the Makefile does not work for = Guix + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "ou= t") + "/bin"))) + (mkdir-p bin) + (install-file "footswitch" bin) + #t)))))) + (home-page "https://github.com/rgerganov/footswitch") + (synopsis "Command line utility for PCsensor foot switch") + (description + "Command line utility for programming foot switches sold by PCsen= sor. +It works for both single pedal devices and three pedal devices. All sup= ported +devices have vendorId:productId =3D 0c45:7403 or 0c45:7404.") + (license license:expat))))