2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-04-24 23:36:52 +00:00
|
|
|
, jdk
|
|
|
|
, ant, cunit, ncurses
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "java-service-wrapper";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "3.5.53";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz";
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-mDXlsH+iu9CcqlMwtbrMicAwuRClK1WmPY2SYIF8USw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ jdk ];
|
|
|
|
nativeBuildInputs = [ ant cunit ncurses ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
export ANT_HOME=${ant}
|
|
|
|
export JAVA_HOME=${jdk}/lib/openjdk/jre/
|
|
|
|
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"}
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/{bin,lib}
|
|
|
|
cp bin/wrapper $out/bin/wrapper
|
|
|
|
cp lib/wrapper.jar $out/lib/wrapper.jar
|
|
|
|
cp lib/libwrapper.so $out/lib/libwrapper.so
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Enables a Java Application to be run as a Windows Service or Unix Daemon";
|
|
|
|
homepage = "https://wrapper.tanukisoftware.com/";
|
2022-03-05 16:20:37 +00:00
|
|
|
changelog = "https://wrapper.tanukisoftware.com/doc/english/release-notes.html#${version}";
|
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
maintainers = [ maintainers.suhr ];
|
|
|
|
};
|
|
|
|
}
|