aboutsummaryrefslogtreecommitdiff
-*- mode: org; coding: utf-8; -*-

#+TITLE: Hacking GNU Guix and Its Incredible Distro

Copyright © 2012, 2013, 2014, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
Copyright © 2015, 2017 Mathieu Lirzin <mthl@gnu.org>
Copyright © 2017 Leo Famulari <leo@famulari.name>
Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.

* Contributing

See the manual for useful hacking information, either by running

  info -f doc/guix.info "Contributing"

or by checking the [[https://guix.gnu.org/manual/devel/en/html_node/Contributing.html][web copy of the manual]].
option>space:mode:
authorJulien Lepiller <julien@lepiller.eu>2023-11-09 19:51:05 +0100
committerJulien Lepiller <julien@lepiller.eu>2023-12-02 19:07:56 +0100
commit06ebc45e15f2a1bd4526a5a716eed657c902a0c1 (patch)
tree7e3049f8fcf35dbbccb1e321c5f7ce330798d248 /gnu/packages
parenta640ce3fb20472c6aecc32b07fbb297298a5de7d (diff)
downloadguix-06ebc45e15f2a1bd4526a5a716eed657c902a0c1.tar.gz
guix-06ebc45e15f2a1bd4526a5a716eed657c902a0c1.zip
gnu: josm: Reduce closure size.
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/geo.scm14
1 files 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 @@ to the OSM opening hours specification.")
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 @@ to the OSM opening hours specification.")
(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)))))