Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Guix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
inf
Guix
Commits
423b6840
Unverified
Commit
423b6840
authored
7 years ago
by
Ricardo Wurmus
Browse files
Options
Downloads
Patches
Plain Diff
gnu: Add java-usb4java.
* gnu/packages/libusb.scm (java-usb4java): New variable.
parent
18fe5ef1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnu/packages/libusb.scm
+60
-0
60 additions, 0 deletions
gnu/packages/libusb.scm
with
60 additions
and
0 deletions
gnu/packages/libusb.scm
+
60
−
0
View file @
423b6840
...
@@ -28,6 +28,7 @@ (define-module (gnu packages libusb)
...
@@ -28,6 +28,7 @@ (define-module (gnu packages libusb)
#
:use-module
(
guix
utils
)
#
:use-module
(
guix
utils
)
#
:use-module
(
guix
download
)
#
:use-module
(
guix
download
)
#
:use-module
(
guix
git-download
)
#
:use-module
(
guix
git-download
)
#
:use-module
(
guix
build-system
ant
)
#
:use-module
(
guix
build-system
cmake
)
#
:use-module
(
guix
build-system
cmake
)
#
:use-module
(
guix
build-system
gnu
)
#
:use-module
(
guix
build-system
gnu
)
#
:use-module
(
guix
build-system
glib-or-gtk
)
#
:use-module
(
guix
build-system
glib-or-gtk
)
...
@@ -129,6 +130,65 @@ (define-public libusb4java
...
@@ -129,6 +130,65 @@ (define-public libusb4java
with usb4java."
)
with usb4java."
)
(
license
expat
))))
(
license
expat
))))
(
define-public
java-usb4java
(
package
(
name
"java-usb4java"
)
(
version
"1.2.0"
)
(
source
(
origin
(
method
url-fetch
)
(
uri
(
string-append
"https://github.com/usb4java/usb4java/"
"archive/usb4java-"
version
".tar.gz"
))
(
sha256
(
base32
"0gzpsnzwgsdyra3smq288yvxnwrgvdwxr6g8jbknnsk56kv6wc34"
))))
(
build-system
ant-build-system
)
(
arguments
`
(
#
:jar-name
"usb4java.jar"
#
:phases
(
modify-phases
%standard-phases
;; Usually, native libusb4java libraries for all supported systems
;; would be included in the jar and extracted at runtime. Since we
;; build everything from source we cannot just bundle pre-built
;; binaries for other systems. Instead, we patch the loader to
;; directly return the appropriate library for this system. The
;; downside is that the jar will only work on the same architecture
;; that it was built on.
(
add-after
'unpack
'copy-libusb4java
(
lambda*
(
#
:key
inputs
#
:allow-other-keys
)
(
substitute*
"src/main/java/org/usb4java/Loader.java"
((
"private static String extractLibrary"
line
)
(
string-append
line
"(final String a, final String b) {"
"return \""
(
assoc-ref
inputs
"libusb4java"
)
"/lib/libusb4java.so"
"\"; }\n"
"private static String _extractLibrary"
)))
#t
))
(
add-after
'unpack
'disable-broken-tests
(
lambda
_
(
with-directory-excursion
"src/test/java/org/usb4java"
;; These tests should only be run when USB devices are present.
(
substitute*
'
(
"LibUsbGlobalTest.java"
"TransferTest.java"
)
((
"this.context = new Context\\(\\);"
)
"this.context = null;"
)
((
"LibUsb.init"
)
"//"
))
(
substitute*
"DeviceListIteratorTest.java"
((
"this.iterator.remove"
line
)
(
string-append
"assumeUsbTestsEnabled();"
line
))))
#t
)))))
(
inputs
`
((
"libusb4java"
,
libusb4java
)
(
"java-commons-lang3"
,
java-commons-lang3
)
(
"java-junit"
,
java-junit
)
(
"java-hamcrest-core"
,
java-hamcrest-core
)))
(
home-page
"http://usb4java.org/"
)
(
synopsis
"USB library for Java"
)
(
description
"This package provides a USB library for Java based on libusb and
implementing @code{javax.usb} (JSR-80)."
)
(
license
expat
)))
(
define-public
python-pyusb
(
define-public
python-pyusb
(
package
(
package
(
name
"python-pyusb"
)
(
name
"python-pyusb"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment