Merge pull request #266110 from linsui/jsw

java-service-wrapper: build with latest jdk
This commit is contained in:
Doron Behar 2023-12-01 11:07:37 +00:00 committed by GitHub
commit 1308c646c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 10 deletions

View File

@ -1,6 +1,10 @@
{ lib, stdenv, fetchurl { lib
, stdenv
, fetchurl
, jdk , jdk
, ant, cunit, ncurses , ant
, cunit
, ncurses
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -12,18 +16,25 @@ stdenv.mkDerivation rec {
hash = "sha256-t16i1WqvDqr4J5sDldeUk6+DAyN/6oWGV6eME5yj+i4="; hash = "sha256-t16i1WqvDqr4J5sDldeUk6+DAyN/6oWGV6eME5yj+i4=";
}; };
buildInputs = [ jdk ]; strictDeps = true;
nativeBuildInputs = [ ant cunit ncurses ];
buildInputs = [ cunit ncurses ];
nativeBuildInputs = [ ant jdk ];
postConfigure = ''
substituteInPlace default.properties \
--replace "javac.target.version=1.4" "javac.target.version=8"
'';
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
export ANT_HOME=${ant} export JAVA_HOME=${jdk}/lib/openjdk/
export JAVA_HOME=${jdk}/lib/openjdk/jre/
export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME
export CLASSPATH=${jdk}/lib/openjdk/lib/tools.jar 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 runHook postBuild
''; '';

View File

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