From: Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches@gnu.org>
To: 64896@debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
Subject: [bug#64896] [PATCH v2 1/8] gnu: Add python-hid.
Date: Fri, 28 Jul 2023 14:23:56 +0200 [thread overview]
Message-ID: <20230728122403.10140-2-jean@foundationdevices.com> (raw)
In-Reply-To: <20230728122403.10140-1-jean@foundationdevices.com>
* gnu/packages/libusb.scm (python-hid): New variable.
Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@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@posteo.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@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
next prev parent reply other threads:[~2023-07-28 12:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 12:54 [bug#64896] [PATCH 0/8] gnu: Add qmk Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 1/8] gnu: Add python-hid Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 2/8] gnu: Add python-spinners Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 3/8] gnu: Add python-log-symbols Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 4/8] gnu: Add python-halo Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 5/8] gnu: Add python-hjson Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 6/8] gnu: Add python-dotty-dict Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 7/8] gnu: Add python-milc Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-27 12:57 ` [bug#64896] [PATCH 8/8] gnu: Add qmk Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:23 ` [bug#64896] [PATCH v2 0/8] " Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:23 ` Jean-Pierre De Jesus DIAZ via Guix-patches via [this message]
2023-07-28 12:23 ` [bug#64896] [PATCH v2 2/8] gnu: Add python-spinners Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:23 ` [bug#64896] [PATCH v2 3/8] gnu: Add python-log-symbols Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:23 ` [bug#64896] [PATCH v2 4/8] gnu: Add python-halo Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:24 ` [bug#64896] [PATCH v2 5/8] gnu: Add python-hjson Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:24 ` [bug#64896] [PATCH v2 6/8] gnu: Add python-dotty-dict Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:24 ` [bug#64896] [PATCH v2 7/8] gnu: Add python-milc Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-07-28 12:24 ` [bug#64896] [PATCH v2 8/8] gnu: Add qmk Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-08-30 0:19 ` bug#64896: [PATCH 0/8] " Vagrant Cascadian
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=20230728122403.10140-2-jean@foundationdevices.com \
--to=guix-patches@gnu.org \
--cc=64896@debbugs.gnu.org \
--cc=jean@foundationdevices.com \
/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).