summary refs log tree commit diff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2023-11-09 19:17:30 +0100
committerJulien Lepiller <julien@lepiller.eu>2023-12-02 19:07:45 +0100
commit406e46a15965bcb9e68e7c0bf09f14b9c72c6498 (patch)
tree61d5c8334374e9a54afbbff0f79e61cd82ca6c55 /gnu/packages/java.scm
parent7ab24d717d1ddc71b325018fb81fe78008a9cae1 (diff)
downloadguix-406e46a15965bcb9e68e7c0bf09f14b9c72c6498.tar.gz
gnu: javacc: Do not reference a jdk.
The jdk provides java and javac, while a jre only provides the necessary
java, reducing the closure size by 350MB.

* gnu/packages/java.scm (javacc): Remove #t at end of phases.
[inputs]: Add icedtea-8 as the jre.
[arguments]: Use it instead of the jdk.

Change-Id: Icb218c40915550b7ff1db96a48a3c48fa6ef52b4
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 7c8c4e0a36..eded386a03 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2465,8 +2465,7 @@ debugging, etc.")
        (modules '((guix build utils)))
        ;; Delete bundled jars.
        (snippet '(begin (for-each delete-file-recursively
-                                  '("bootstrap" "lib"))
-                        #t))))
+                                  '("bootstrap" "lib"))))))
     (arguments
      `(#:make-flags                     ; bootstrap from javacc-4
        ,#~(list (string-append "-Dbootstrap-jar="
@@ -2487,17 +2486,16 @@ debugging, etc.")
                  (lambda _
                    (display
                      (string-append "#!/bin/sh\n"
-                                    (assoc-ref inputs "jdk") "/bin/java"
+                                    (assoc-ref inputs "icedtea") "/bin/java"
                                     " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
                (chmod javacc #o755)
                ;; symlink to different names to affect the first argument and
                ;; change the behavior of the jar file.
                (symlink javacc (string-append bin "/jjdoc"))
-               (symlink javacc (string-append bin "/jjtree"))
-               #t))))))
-
+               (symlink javacc (string-append bin "/jjtree"))))))))
     (native-inputs
-     (list javacc-4))))
+     (list javacc-4))
+    (inputs (list icedtea-8))))
 
 (define-public java-ecj
   (package