nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 apacheHttpd,
5 autoreconfHook,
6 fetchFromGitHub,
7 jdk,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "mod_jk";
12 version = "1.2.50";
13
14 src = fetchFromGitHub {
15 owner = "apache";
16 repo = "tomcat-connectors";
17 tag = "JK_${lib.replaceStrings [ "." ] [ "_" ] version}";
18 hash = "sha256-hlwlx7Sb4oeZIzHQYOC3e9xEZK9u6ZG8Q2U/XdKMe3U=";
19 };
20
21 sourceRoot = "${src.name}/native";
22
23 nativeBuildInputs = [ autoreconfHook ];
24
25 buildInputs = [
26 apacheHttpd
27 jdk
28 ];
29
30 configureFlags = [
31 "--with-apxs=${apacheHttpd.dev}/bin/apxs"
32 "--with-java-home=${jdk}"
33 ];
34
35 installPhase = ''
36 runHook preInstall
37
38 mkdir -p $out/modules
39 cp apache-2.0/mod_jk.so $out/modules
40
41 runHook postInstall
42 '';
43
44 meta = {
45 description = "Provides web server plugins to connect web servers with Tomcat";
46 homepage = "https://tomcat.apache.org/download-connectors.cgi";
47 changelog = "https://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html";
48 license = lib.licenses.asl20;
49 maintainers = with lib.maintainers; [ anthonyroussel ];
50 platforms = lib.platforms.unix;
51 };
52}