From ae333e0755ed8915dd0b95ea967e65b138dbc631 Mon Sep 17 00:00:00 2001 From: Evgeny Pisemsky Date: Mon, 28 Jul 2025 20:55:01 +0300 Subject: [PATCH] gnu: Add hidapitester. * gnu/packages/libusb.scm (hidapitester): New variable. Change-Id: I663b41bf890465846e8d1e5cae8b95a6f4186155 Signed-off-by: Danny Milosavljevic --- gnu/packages/libusb.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index eb6dc9a844a1cec5aa9c0287ca58d6353c46552c..61c43ceccbdc966bcc7b64e18ee91f6441fb45d2 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2023 Foundation Devices, Inc. ;;; Copyright © 2024 hapster ;;; Copyright © 2025 Janneke Nieuwenhuizen +;;; Copyright © 2025 Evgeny Pisemsky ;;; ;;; 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)))