summaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-12-18 17:29:11 +0100
committerRicardo Wurmus <rekado@elephly.net>2021-12-23 20:27:47 +0100
commit380c52e901f6d1ac1267fc0a2311a0f52d0c109f (patch)
tree9f3207a71663069538d0dd8a587509fa6ccdafa5 /gnu/packages/java.scm
parentde48029bb3304f88d164a81015185573a6634801 (diff)
downloadguix-patches-380c52e901f6d1ac1267fc0a2311a0f52d0c109f.tar
guix-patches-380c52e901f6d1ac1267fc0a2311a0f52d0c109f.tar.gz
gnu: classpath-jamvm-wrappers: Use G-Expression.
* gnu/packages/java.scm (classpath-jamvm-wrappers)[arguments]: Use a gexp to remove references to %build-inputs and %outputs. [native-inputs]: Replace bash with bash-minimal; use label-less style.
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm67
1 files changed, 32 insertions, 35 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b8ed4d5c2a..021e9f4cee 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -622,45 +622,42 @@ the standard javac executable.")))
(source #f)
(build-system trivial-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((bash (assoc-ref %build-inputs "bash"))
- (jamvm (assoc-ref %build-inputs "jamvm"))
- (classpath (assoc-ref %build-inputs "classpath"))
- (bin (string-append (assoc-ref %outputs "out")
- "/bin/")))
- (mkdir-p bin)
- (for-each (lambda (tool)
- (with-output-to-file (string-append bin tool)
- (lambda _
- ,@(if (string-prefix? "armhf" (or (%current-system)
- (%current-target-system)))
- `((format #t "#!~a/bin/sh
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((bash #$(this-package-native-input "bash-minimal"))
+ (jamvm #$(this-package-native-input "jamvm"))
+ (classpath #$(this-package-native-input "classpath"))
+ (bin (string-append #$output "/bin/")))
+ (mkdir-p bin)
+ (for-each (lambda (tool)
+ (with-output-to-file (string-append bin tool)
+ (lambda _
+ #$@(if (string-prefix? "armhf" (or (%current-system)
+ (%current-target-system)))
+ `((format #t "#!~a/bin/sh
~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
gnu.classpath.tools.~a.~a $@"
- bash jamvm classpath tool
- (if (string=? "native2ascii" tool)
- "Native2ASCII" "Main")))
- `((format #t "#!~a/bin/sh
+ bash jamvm classpath tool
+ (if (string=? "native2ascii" tool)
+ "Native2ASCII" "Main")))
+ `((format #t "#!~a/bin/sh
~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
gnu.classpath.tools.~a.~a $@"
- bash jamvm classpath tool
- (if (string=? "native2ascii" tool)
- "Native2ASCII" "Main"))))))
- (chmod (string-append bin tool) #o755))
- (list "javah"
- "rmic"
- "rmid"
- "orbd"
- "rmiregistry"
- "native2ascii"))
- #t))))
- (native-inputs
- `(("bash" ,bash)
- ("jamvm" ,jamvm-1-bootstrap)
- ("classpath" ,classpath-0.99)))
+ bash jamvm classpath tool
+ (if (string=? "native2ascii" tool)
+ "Native2ASCII" "Main"))))))
+ (chmod (string-append bin tool) #o755))
+ (list "javah"
+ "rmic"
+ "rmid"
+ "orbd"
+ "rmiregistry"
+ "native2ascii"))))))
+ (native-inputs
+ (list bash-minimal jamvm-1-bootstrap classpath-0.99))
(inputs '())
(synopsis "Executables from GNU Classpath")
(description "This package provides wrappers around the tools provided by