jextract: install with bundle binaries

This commit is contained in:
Sprite 2023-08-07 04:08:26 +08:00
parent 197df039a2
commit f484b49eeb

View File

@ -77,17 +77,14 @@ stdenv.mkDerivation {
installPhase = ''
runHook preInstall
install -D --mode=0444 --target-directory="$out/share/java" \
./build/libs/org.openjdk.jextract-unspecified.jar
mkdir -p $out/opt/
cp -r ./build/jextract $out/opt/jextract
runHook postInstall
'';
postFixup = ''
makeWrapper "${jdk20}/bin/java" "$out/bin/jextract" \
--add-flags "--enable-preview" \
--add-flags "--class-path $out/share/java/org.openjdk.jextract-unspecified.jar" \
--add-flags "org.openjdk.jextract.JextractTool"
makeWrapper "$out/opt/jextract/bin/jextract" "$out/bin/jextract"
'';
meta = with lib; {