Merge pull request #170945 from Uthar/abcl-jss

abcl: fix `(require :jss)` in ABCL with Java 17
This commit is contained in:
7c6f434c 2022-05-01 17:42:31 +00:00 committed by GitHub
commit b1160a176b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,13 +18,18 @@ stdenv.mkDerivation rec {
buildPhase = ''
ant
'';
# Fix for https://github.com/armedbear/abcl/issues/484
javaOpts =
lib.optionalString
(lib.versionAtLeast jre.version "17")
"--add-opens=java.base/java.util.jar=ALL-UNNAMED";
installPhase = ''
mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl}
cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/"
cp -r dist/*.jar contrib/ "$out/lib/abcl/"
echo "#! ${stdenv.shell}" >> "$out/bin/abcl"
echo "${jre}/bin/java -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl"
echo "${jre}/bin/java $javaOpts -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl"
chmod a+x "$out"/bin/*
'';
buildInputs = [jre ant jdk jre];