guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/12: gnu: Add go-github-com-google-gousb.


From: guix-commits
Subject: 07/12: gnu: Add go-github-com-google-gousb.
Date: Fri, 29 Mar 2024 10:23:52 -0400 (EDT)

sharlatan pushed a commit to branch master
in repository guix.

commit 558a41968aae022b2aa7f4b2182ad60a515cab3e
Author: Martin Becze <mjbecze@riseup.net>
AuthorDate: Wed Apr 14 05:20:09 2021 -0500

    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
---
 gnu/packages/libusb.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]