2021-07-14 22:03:04 +00:00
|
|
|
{ lib, stdenv, fetchurl, commonsDaemon, jdk, makeWrapper, jre }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jsvc";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.4.0";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-AFnx6AqmOfAsfh/4ALV9xiA2pbP0sX1h5dPj/9JCj+4=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ commonsDaemon ];
|
|
|
|
nativeBuildInputs = [ jdk makeWrapper ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd ./src/native/unix/
|
|
|
|
sh ./support/buildconf.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export JAVA_HOME=${jre}
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp jsvc $out/bin/jsvc
|
|
|
|
chmod +x $out/bin/jsvc
|
|
|
|
wrapProgram $out/bin/jsvc --set JAVA_HOME "${jre}"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://commons.apache.org/proper/commons-daemon";
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "A part of the Apache Commons Daemon software, a set of utilities and Java support classes for running Java applications as server processes";
|
2021-07-14 22:03:04 +00:00
|
|
|
maintainers = with lib.maintainers; [ rsynnest ];
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = with lib.platforms; unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "jsvc";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
}
|