GNU bug report logs - #64896
[PATCH 0/8] gnu: Add qmk.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>

Date: Thu, 27 Jul 2023 12:56:02 UTC

Severity: normal

Tags: patch

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 64896 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
To: 64896 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
Subject: [PATCH 1/8] gnu: Add python-hid.
Date: Thu, 27 Jul 2023 14:57:34 +0200
* gnu/packages/libusb.scm (python-hid): New variable.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
---
 gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 13090d30ab..c80e7061ad 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2022 Jacob Hrbek <kreyren <at> rixotstudio.cz>
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello <at> foundationdevices.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -653,6 +654,42 @@ (define-public hidapi
                    license:bsd-3
                    (license:non-copyleft "file://LICENSE-orig.txt")))))
 
+(define-public python-hid
+  (package
+    (name "python-hid")
+    (version "1.0.5")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "hid" version))
+              (sha256
+               (base32
+                "1s5hvfbmnlmifswr5514f4xxn5rcd429bdcdqzgwkdxrg9zlx58y"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; No tests present on the source tree, without this compilation fails
+     ;; because it "requires" the python-nose package, but it is not really
+     ;; necessary.
+     (list #:tests? #f
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'add-extra-library-paths
+                 (lambda _
+                   (let ((libhidapi-hidraw.so
+                           #$(file-append hidapi "/lib/libhidapi-hidraw.so"))
+                         (libhidapi-libusb.so
+                           #$(file-append hidapi "/lib/libhidapi-libusb.so")))
+                     (substitute* "hid/__init__.py"
+                       (("library_paths = \\(.*$" all)
+                        (string-append
+                          all
+                          "    '" libhidapi-hidraw.so "',\n"
+                          "    '" libhidapi-libusb.so "',\n")))))))))
+    (inputs (list hidapi))
+    (home-page "https://github.com/apmorton/pyhidapi")
+    (synopsis "Python @code{ctypes} bindings for HIDAPI library")
+    (description "Python @code{ctypes} bindings for HIDAPI library.")
+    (license license:expat)))
+
 (define-public python-hidapi
   (package
     (name "python-hidapi")
-- 
2.34.1





This bug report was last modified 1 year and 358 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.