Files
nixpkgs/pkgs/by-name/js/jsvc/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
commonsDaemon,
jdk,
makeWrapper,
jre,
}:
stdenv.mkDerivation rec {
pname = "jsvc";
version = "1.4.1";
src = fetchurl {
url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz";
sha256 = "sha256-yPsiNFbqbfDGHzxlr7So8sZt395BABYEJ7jOmLEhUTE=";
};
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";
description = "Part of the Apache Commons Daemon software, a set of utilities and Java support classes for running Java applications as server processes";
maintainers = with lib.maintainers; [ rsynnest ];
license = lib.licenses.asl20;
platforms = with lib.platforms; unix;
mainProgram = "jsvc";
};
}