summaryrefslogtreecommitdiff
path: root/pkgs/servers/http/apache-modules/mod_jk/default.nix
blob: 041ed93c506ffd44b6940318054554882446f742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  stdenv,
  apacheHttpd,
  autoreconfHook,
  fetchFromGitHub,
  jdk,
}:

stdenv.mkDerivation rec {
  pname = "mod_jk";
  version = "1.2.50";

  src = fetchFromGitHub {
    owner = "apache";
    repo = "tomcat-connectors";
    tag = "JK_${lib.replaceStrings [ "." ] [ "_" ] version}";
    hash = "sha256-hlwlx7Sb4oeZIzHQYOC3e9xEZK9u6ZG8Q2U/XdKMe3U=";
  };

  sourceRoot = "${src.name}/native";

  nativeBuildInputs = [ autoreconfHook ];

  buildInputs = [
    apacheHttpd
    jdk
  ];

  configureFlags = [
    "--with-apxs=${apacheHttpd.dev}/bin/apxs"
    "--with-java-home=${jdk}"
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/modules
    cp apache-2.0/mod_jk.so $out/modules

    runHook postInstall
  '';

  meta = {
    description = "Provides web server plugins to connect web servers with Tomcat";
    homepage = "https://tomcat.apache.org/download-connectors.cgi";
    changelog = "https://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ anthonyroussel ];
    platforms = lib.platforms.unix;
  };
}