guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 64793bd582487456b441cc1cab59827daedfd2dd
Author: Ludovic Courtès <[email protected]>
AuthorDate: Mon Nov 16 23:11:23 2026 +0100
gnu: Add python-phidget22.
* gnu/packages/libphidget.scm (python-phidget22): New variable.
Signed-off-by: Ludovic Courtès <[email protected]>
Merges: #12600
---
gnu/packages/libphidget.scm | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libphidget.scm b/gnu/packages/libphidget.scm
index bf5b7712750..26779b46819 100644
--- a/gnu/packages/libphidget.scm
+++ b/gnu/packages/libphidget.scm
@@ -24,8 +24,10 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
#:use-module (guix licenses)
- #:use-module (gnu packages libusb))
+ #:use-module (gnu packages libusb)
+ #:use-module (gnu packages python-build))
(define-public libphidget22
(package
@@ -51,3 +53,37 @@
(description synopsis)))
(define-deprecated-package libphidget libphidget22)
+
+(define-public python-phidget22
+ (package
+ (name "python-phidget22")
+ (version "1.27.20261112")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "phidget22" version))
+ (sha256
+ (base32 "0xgg5gpwzx944gq2ahp7vagx920fn05hp59053qpahanbvlqcp2b"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'record-libphidget-file-name
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Phidget22/_phidget_support.py"
+ (("libs_path = .*")
+ (let ((libphidget (search-input-file
+ inputs
+ "lib/libphidget22.so")))
+ (string-append "libs_path = '"
+ (dirname libphidget)
+ "'\n")))))))
+ #:tests? #f)) ;no tests
+ (inputs (list libphidget22))
+ (native-inputs (list python-setuptools))
+ (home-page "https://www.phidgets.com")
+ (synopsis "Python bindings for the Phidget library")
+ (description
+ "This package provides Python bindings to the libphidget library, which
+allows you to control Phidget devices.")
+ (license bsd-3)))