summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Becze <mjbecze@riseup.net>2021-04-14 05:20:09 -0500
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-03-29 14:21:00 +0000
commit558a41968aae022b2aa7f4b2182ad60a515cab3e (patch)
treed19f435801ccceb02fcdfb68c90ec73a3e6f380c
parentb68544731d8fafe317ed54b3197b1cc6ff72f3a5 (diff)
gnu: Add go-github-com-google-gousb.
* gnu/packages/libusb.scm (go-github-com-google-gousb): New variable. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Change-Id: I2649caea1e9168c50a5065c8e3a5a9eb407730b7
-rw-r--r--gnu/packages/libusb.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index d15e561668..f756763bed 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2022 Jacob Hrbek <kreyren@rixotstudio.cz>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
@@ -40,6 +41,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system go)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system pyproject)
@@ -176,6 +178,38 @@ version of libusb to run with newer libusb.")
with usb4java.")
(license license:expat))))
+(define-public go-github-com-google-gousb
+ (package
+ ;; See <https://github.com/google/gousb/issues/124> for picking up the
+ ;; correct version.
+ (name "go-github-com-google-gousb")
+ (version "1.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/gousb")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1rl43y2nn1fysnlvkkcba2rb4d4pqbab8v4v9zw0xv9j4x2r5hv1"))
+ (file-name (git-file-name name version))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/google/gousb"))
+ (native-inputs
+ (list pkg-config))
+ ;; It's for purpose to prevent failing of missing libusb when this package
+ ;; is included as inputs to build others.
+ (propagated-inputs
+ (list libusb))
+ (home-page "https://github.com/google/gousb")
+ (synopsis "Low-level interface for accessing USB devices in Golang")
+ (description
+ "The gousb package is an attempt at wrapping the libusb library into a
+Go-like binding.")
+ (license license:asl2.0)))
+
(define-public java-usb4java
(package
(name "java-usb4java")