Add hidapitester
modules/cogd/packages/libusb.scm unknown status 1
1 | + | ;;; SPDX-FileCopyrightText: 2025 Evgeny Pisemsky <mail@pisemsky.site> | |
2 | + | ;;; | |
3 | + | ;;; SPDX-License-Identifier: GPL-3.0-or-later | |
4 | + | ||
5 | + | (define-module (cogd packages libusb)) | |
6 | + | ||
7 | + | (use-modules (guix packages) | |
8 | + | (guix git-download) | |
9 | + | (guix build-system gnu) | |
10 | + | (guix gexp) | |
11 | + | ((guix licenses) #:prefix license:) | |
12 | + | (gnu packages pkg-config) | |
13 | + | (gnu packages libusb) | |
14 | + | (gnu packages linux)) | |
15 | + | ||
16 | + | (define-public hidapitester | |
17 | + | (package | |
18 | + | (name "hidapitester") | |
19 | + | (version "0.5") | |
20 | + | (source | |
21 | + | (origin | |
22 | + | (method git-fetch) | |
23 | + | (uri (git-reference | |
24 | + | (url "https://github.com/todbot/hidapitester") | |
25 | + | (commit (string-append "v" version)))) | |
26 | + | (file-name (git-file-name name version)) | |
27 | + | (sha256 | |
28 | + | (base32 "0pilnq01yd4974xicy6as330f5b74pnj9mn5gvg1s21f78lxx4is")))) | |
29 | + | (build-system gnu-build-system) | |
30 | + | (arguments | |
31 | + | (list | |
32 | + | #:tests? #f | |
33 | + | #:phases | |
34 | + | #~(modify-phases %standard-phases | |
35 | + | (delete 'configure) | |
36 | + | (replace 'install | |
37 | + | (lambda _ | |
38 | + | (install-file "hidapitester" | |
39 | + | (string-append #$output "/bin"))))) | |
40 | + | #:make-flags | |
41 | + | #~(list "CC=gcc" | |
42 | + | (string-append "GIT_TAG=v" | |
43 | + | #$version)))) | |
44 | + | (native-inputs (list pkg-config)) | |
45 | + | (inputs (list hidapi eudev)) | |
46 | + | (home-page "https://github.com/todbot/hidapitester") | |
47 | + | (synopsis "Command-line program to exercise hidapi") | |
48 | + | (description | |
49 | + | "The hidapitester program is a simple, low-dependency command-line tool | |
50 | + | to test out every API call in hidapi.") | |
51 | + | (license license:gpl3))) |