From: Fredrik Salomonsson <plattfot@posteo.net>
To: 42682@debbugs.gnu.org
Cc: Fredrik Salomonsson <plattfot@posteo.net>
Subject: [bug#42682] [PATCH v2 7/9] gnu: Add python-hid.
Date: Sun, 9 Apr 2023 04:31:14 +0000 [thread overview]
Message-ID: <20230409043116.13244-8-plattfot@posteo.net> (raw)
In-Reply-To: <20230409043116.13244-1-plattfot@posteo.net>
* gnu/packages/libusb.scm (python-hid): New variable.
---
gnu/packages/libusb.scm | 56 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index c009c78e88..266ab459a1 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2023 Fredrik Salomonsson <plattfot@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages libusb)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages gnupg)
@@ -54,6 +56,7 @@ (define-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
#:use-module (gnu packages tls)
@@ -650,6 +653,59 @@ (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 python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-library-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("hid/__init__.py")
+ (("'libhidapi-hidraw.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-hidraw.so") "'"))
+ (("'libhidapi-libusb.so'")
+ (string-append
+ "'" (search-input-file inputs "/lib/libhidapi-libusb.so") "'"))
+ ;; Nuke the rest of the library_paths
+ (("[[:blank:]]+'libhidapi-hidraw.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-libusb.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so',\n")
+ "")
+ (("[[:blank:]]+'libhidapi-iohidmanager.so.0',\n")
+ "")
+ (("[[:blank:]]+'libhidapi.dylib',\n")
+ "")
+ (("[[:blank:]]+'hidapi.dll',\n")
+ "")
+ (("[[:blank:]]+'hidapi-0.dll',\n")
+ "")))))))
+ (native-inputs
+ (list
+ python-nose
+ python-tox))
+ (inputs
+ (list
+ hidapi))
+ (home-page "https://github.com/apmorton/pyhidapi")
+ (synopsis "Ctypes bindings for hidapi")
+ (description "This package provides ctypes bindings in Python for the @code{hidapi}
+package. Note that this package conflicts with the
+@code{python-hidapi} package as they occupy the same Python namespace.")
+ (license license:expat)))
+
(define-public python-hidapi
(package
(name "python-hidapi")
--
2.39.2
next prev parent reply other threads:[~2023-04-09 4:32 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-02 20:42 [bug#42682] [PATCH 0/2] Qmk cli Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Jan Wielkiewicz
2020-08-02 20:49 ` [bug#42682] [PATCH 2/2] gnu: Add qmk-cli Jan Wielkiewicz
2020-08-03 8:26 ` Mathieu Othacehe
2020-08-03 12:43 ` Jan Wielkiewicz
2020-08-05 9:17 ` Mathieu Othacehe
2020-08-05 12:22 ` Jan Wielkiewicz
2020-08-07 8:20 ` Mathieu Othacehe
2020-08-07 15:44 ` Jan Wielkiewicz
2021-02-05 11:39 ` Nicolò Balzarotti
2021-02-24 21:41 ` Jan Wielkiewicz
2021-02-24 22:23 ` Nicolò Balzarotti
2020-08-03 8:21 ` [bug#42682] [PATCH 1/2] gnu: Add python-hjson Mathieu Othacehe
2020-08-03 12:28 ` Jan Wielkiewicz
2022-12-22 12:29 ` [bug#42682] [PATCH 0/2] Qmk cli Marcel van der Boom
2023-04-09 4:31 ` [bug#42682] [PATCH v2 0/9] Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 3/9] gnu: Add python-spinners Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 4/9] gnu: Add python-halo Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 5/9] gnu: Add python-milc Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
2023-04-09 4:31 ` Fredrik Salomonsson [this message]
2023-04-09 4:31 ` [bug#42682] [PATCH v2 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-04-09 4:31 ` [bug#42682] [PATCH v2 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-05-28 23:43 ` [bug#42682] [PATCH v3 1/9] gnu: Add python-hjson Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 2/9] gnu: Add python-log-symbols Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 3/9] gnu: Add python-spinners Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 4/9] gnu: Add python-halo Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 5/9] gnu: Add python-milc Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 6/9] gnu: Add python-dotty-dict Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 7/9] gnu: Add python-hid Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 8/9] gnu: Add qmk-cli Fredrik Salomonsson
2023-05-28 23:44 ` [bug#42682] [PATCH v3 9/9] gnu: Add qmk-udev-rules Fredrik Salomonsson
2023-08-19 0:34 ` [bug#42682] [PATCH v3 0/9] Add qmk-cli Fredrik Salomonsson
2023-09-02 5:23 ` Vagrant Cascadian
2023-10-10 3:56 ` bug#42682: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230409043116.13244-8-plattfot@posteo.net \
--to=plattfot@posteo.net \
--cc=42682@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).