From 18fe5ef1520ee085bf409ee983ed12baf20ea40e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 10 Oct 2016 18:27:40 +0200 Subject: gnu: Add libusb4java. * gnu/packages/libusb.scm (libusb4java): New variable. --- gnu/packages/libusb.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 4c80de2369..3932f1e660 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Andy Wingo -;;; Copyright © 2015, 2016 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Theodoros Foradis ;;; @@ -27,12 +27,15 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system python) #:use-module (gnu packages autotools) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) + #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages mp3) #:use-module (gnu packages pkg-config) @@ -91,6 +94,41 @@ devices on various operating systems.") version of libusb to run with newer libusb.") (license lgpl2.1+))) +(define-public libusb4java + ;; There is no public release so we take the latest version from git. + (let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e") + (revision "1")) + (package + (name "libusb4java") + (version (string-append "0-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/usb4java/libusb4java.git") + (commit commit))) + (sha256 + (base32 + "0wqgapalhfh9v38ycbl6i2f5lh1wpr6fzwn5dwd0rdacypkd1gml")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; there are no tests + #:phases + (modify-phases %standard-phases + (add-before 'configure 'set-JAVA_HOME + (lambda* (#:key inputs #:allow-other-keys) + (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) + #t))))) + (inputs + `(("libusb" ,libusb))) + (native-inputs + `(("jdk" ,icedtea "jdk"))) + (home-page "https://github.com/usb4java/libusb4java/") + (synopsis "JNI bindings to libusb") + (description + "This package provides Java JNI bindings to the libusb library for use +with usb4java.") + (license expat)))) + (define-public python-pyusb (package (name "python-pyusb") -- cgit v1.2.3