summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEvgeny Pisemsky <mail@pisemsky.site>2025-07-28 20:55:01 +0300
committerDanny Milosavljevic <dannym@friendly-machines.com>2025-08-03 10:51:07 +0200
commitae333e0755ed8915dd0b95ea967e65b138dbc631 (patch)
treee584b4fe22021822c77ce32ee109718ce8531ee5 /gnu
parentb7ac124f3cfadca9a6fc9829628f84c9d9d1b27b (diff)
gnu: Add hidapitester.
* gnu/packages/libusb.scm (hidapitester): New variable. Change-Id: I663b41bf890465846e8d1e5cae8b95a6f4186155 Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/libusb.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index eb6dc9a844a..61c43ceccbd 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © 2024 hapster <o.rojon@posteo.net>
;;; Copyright © 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2025 Evgeny Pisemsky <mail@pisemsky.site>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -809,3 +810,39 @@ HID-Class devices.")
(license:non-copyleft
"https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt"
"You are free to use cython-hidapi code for any purpose.")))))
+
+(define-public hidapitester
+ (package
+ (name "hidapitester")
+ (version "0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/todbot/hidapitester")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pilnq01yd4974xicy6as330f5b74pnj9mn5gvg1s21f78lxx4is"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (install-file "hidapitester"
+ (string-append #$output "/bin")))))
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "GIT_TAG=v" #$version))))
+ (native-inputs (list pkg-config))
+ (inputs (list hidapi eudev))
+ (home-page "https://github.com/todbot/hidapitester")
+ (synopsis "Command-line program to exercise hidapi")
+ (description
+ "The hidapitester program is a simple, low-dependency command-line tool to test
+out every API call in hidapi.")
+ (license license:gpl3)))