~ruther/guix-local

558a41968aae022b2aa7f4b2182ad60a515cab3e — Martin Becze 4 years ago b685447
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
1 files changed, 34 insertions(+), 0 deletions(-)

M gnu/packages/libusb.scm
M gnu/packages/libusb.scm => gnu/packages/libusb.scm +34 -0
@@ 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")