base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / js / jsvc / package.nix
blob2d01daabd01b3ceb12307d82642d0215797a5b2c
1 { lib, stdenv, fetchurl, commonsDaemon, jdk, makeWrapper, jre }:
3 stdenv.mkDerivation rec {
4   pname = "jsvc";
5   version = "1.4.0";
7   src = fetchurl {
8     url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz";
9     sha256 = "sha256-AFnx6AqmOfAsfh/4ALV9xiA2pbP0sX1h5dPj/9JCj+4=";
10   };
12   buildInputs = [ commonsDaemon ];
13   nativeBuildInputs = [ jdk makeWrapper ];
15   preConfigure = ''
16     cd ./src/native/unix/
17     sh ./support/buildconf.sh
18   '';
20   preBuild = ''
21     export JAVA_HOME=${jre}
22   '';
24   installPhase = ''
25     runHook preInstall
26     mkdir -p $out/bin
27     cp jsvc $out/bin/jsvc
28     chmod +x $out/bin/jsvc
29     wrapProgram $out/bin/jsvc --set JAVA_HOME "${jre}"
30     runHook postInstall
31   '';
33   meta = {
34     homepage    = "https://commons.apache.org/proper/commons-daemon";
35     description = "Part of the Apache Commons Daemon software, a set of utilities and Java support classes for running Java applications as server processes";
36     maintainers = with lib.maintainers; [ rsynnest ];
37     license     = lib.licenses.asl20;
38     platforms = with lib.platforms; unix;
39     mainProgram = "jsvc";
40   };