From e1438cae539544ce5117f9d6a1ed8d8fcabdd70a Mon Sep 17 00:00:00 2001 From: rsynnest Date: Thu, 22 Apr 2021 22:17:24 -0700 Subject: jsvc: init at 1.2.4 --- pkgs/tools/system/jsvc/default.nix | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/tools/system/jsvc/default.nix (limited to 'pkgs/tools/system/jsvc/default.nix') diff --git a/pkgs/tools/system/jsvc/default.nix b/pkgs/tools/system/jsvc/default.nix new file mode 100644 index 00000000000..442f8d90419 --- /dev/null +++ b/pkgs/tools/system/jsvc/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchurl, commonsDaemon, jdk, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "jsvc"; + version = "1.2.4"; + + src = fetchurl { + url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz"; + sha256 = "1nrr6ggy6h20r9zyv14vx6vc9p1w6l8fl9fn6i8dx2hrq6kk2bjw"; + }; + + 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 = "JSVC is 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; + }; +} -- cgit 1.4.1