java-service-wrapper: build with latest jdk

This commit is contained in:
linsui 2023-11-24 02:16:03 +08:00
parent 570757826e
commit 826ee3f67d
2 changed files with 19 additions and 10 deletions

View File

@ -1,6 +1,10 @@
{ lib, stdenv, fetchurl
{ lib
, stdenv
, fetchurl
, jdk
, ant, cunit, ncurses
, ant
, cunit
, ncurses
}:
stdenv.mkDerivation rec {
@ -12,18 +16,25 @@ stdenv.mkDerivation rec {
hash = "sha256-t16i1WqvDqr4J5sDldeUk6+DAyN/6oWGV6eME5yj+i4=";
};
buildInputs = [ jdk ];
nativeBuildInputs = [ ant cunit ncurses ];
strictDeps = true;
buildInputs = [ cunit ncurses ];
nativeBuildInputs = [ ant jdk ];
postConfigure = ''
substituteInPlace default.properties \
--replace "javac.target.version=1.4" "javac.target.version=8"
'';
buildPhase = ''
runHook preBuild
export ANT_HOME=${ant}
export JAVA_HOME=${jdk}/lib/openjdk/jre/
export JAVA_HOME=${jdk}/lib/openjdk/
export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME
export CLASSPATH=${jdk}/lib/openjdk/lib/tools.jar
${if stdenv.isi686 then "./build32.sh" else "./build64.sh"}
ant -f build.xml -Dbits=${if stdenv.isi686 then "32" else "64"}
runHook postBuild
'';

View File

@ -16510,9 +16510,7 @@ with pkgs;
jasmin = callPackage ../development/compilers/jasmin { };
java-service-wrapper = callPackage ../tools/system/java-service-wrapper {
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
};
java-service-wrapper = callPackage ../tools/system/java-service-wrapper { };
jna = callPackage ../development/java-modules/jna { };