Subject: [PATCH 3/5] gnu: Add hidapi-cmake

From: nomike <[email-masked]>
Date: Wed, 30 Apr 2025 02:15:05 +0200

* gnu/packages/libusb.scm (hidapi-cmake): New variable

Change-Id: I8a0c324544d9de0bfa63c85d88c6e3721cdd6ecd
---
 gnu/packages/libusb.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index a6e24f8c41..3ad17a474e 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2023 Sharlatan Hellseher <[email-masked]>
 ;;; Copyright © 2023 Foundation Devices, Inc. <[email-masked]>
 ;;; Copyright © 2024 hapster <[email-masked]>
+;;; Copyright © 2025 nomike Postmann <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -712,6 +713,35 @@ (define-public hidapi
                    license:bsd-3
                    (license:non-copyleft "file://LICENSE-orig.txt")))))
 
+(define-public hidapi-cmake
+  (package
+    (name "hidapi-cmake")
+    (version "0.14.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/libusb/hidapi")
+             (commit (string-append "hidapi-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "121laqsml0104d1h4hp115gp21qiqi0r9dgcaqdi9ismmq3b6yx7"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:tests? #f))
+    (inputs (list libusb eudev))
+    (native-inputs (list autoconf automake libtool pkg-config))
+    (home-page "https://github.com/libusb/hidapi")
+    (synopsis "HID API library - CMake version")
+    (description
+     "HIDAPI is a library which allows an application to interface with USB and Bluetooth
+HID-Class devices.  This version is built using CMake instead of autoconf/automake which
+has been deprecated by the hidapi project")
+    ;; HIDAPI can be used under one of three licenses.
+    (license (list license:gpl3 license:bsd-3
+                   (license:non-copyleft "file://LICENSE-orig.txt")))))
+
 (define-public python-hid
   (package
     (name "python-hid")
-- 
2.49.0