all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 67026@debbugs.gnu.org
Subject: [bug#67026] [PATCH 3/3] gnu: josm: Reduce closure size.
Date: Thu,  9 Nov 2023 20:13:09 +0100	[thread overview]
Message-ID: <20231109191309.6876-3-julien@lepiller.eu> (raw)
In-Reply-To: <20231109191309.6876-1-julien@lepiller.eu>

This saves 240MB of closure size.

* gnu/packages/geo.scm (josm)[inputs]: Add openjdk11.
[arguments]: Filter native inputs out of CLASSPATH.  Use `java' from
openjdk11 instead of the JDK.

Change-Id: Ifa03b5cd033c5866d22e7557119284be0ea25a0e
---
 gnu/packages/geo.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index dbc8440141..746b22a082 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1970,7 +1970,8 @@ (define-public josm
            java-openjfx-media
            java-parsson ; runtime dependency
            java-signpost-core
-           java-svg-salamander))
+           java-svg-salamander
+           openjdk11))
     (arguments
      `(#:tests? #f
        #:jar-name "josm.jar"
@@ -2070,9 +2071,16 @@ (define-public josm
                  (lambda _
                    (display
                      (string-append "#!/bin/sh\n"
-                                    (assoc-ref inputs "jdk") "/bin/java"
+                                    (assoc-ref inputs "openjdk") "/bin/java"
                                     " -cp " out "/share/java/josm.jar:"
-                                    (getenv "CLASSPATH")
+                                    ;; CLASSPATH, but remove native inputs
+                                    (string-join
+                                      (filter
+                                        (lambda (jar)
+                                          (and (not (string-contains jar "-jdk/"))
+                                               (not (string-contains jar "-javacc-"))))
+                                        (string-split (getenv "CLASSPATH") #\:))
+                                      ":")
                                     " org.openstreetmap.josm.gui.MainApplication"))))
                (chmod (string-append bin "/josm") #o755))
              #t)))))
-- 
2.41.0





  parent reply	other threads:[~2023-11-09 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 18:57 [bug#67026] [PATCH] gnu: josm: Reduce closure size Julien Lepiller
2023-11-09 19:13 ` [bug#67026] [PATCH 1/3] gnu: javacc: Do not reference a jdk Julien Lepiller
2023-11-09 19:13   ` [bug#67026] [PATCH 2/3] gnu: java-openjfx-graphics: Make java-swt optional Julien Lepiller
2023-11-09 19:13   ` Julien Lepiller [this message]
2023-12-02 10:21 ` [bug#67026] [PATCH] gnu: josm: Reduce closure size Ludovic Courtès
2023-12-02 18:10   ` bug#67026: " Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231109191309.6876-3-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=67026@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.