fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ stdenv, lib, fetchurl, pkg-config
2, curl, apacheHttpd, pcre, apr, aprutil, libxml2
3, luaSupport ? false, lua5
4}:
5
6with lib;
7
8let luaValue = if luaSupport then lua5 else "no";
9 optional = lib.optional;
10in
11
12stdenv.mkDerivation rec {
13 pname = "modsecurity";
14 version = "2.9.3";
15
16 src = fetchurl {
17 url = "https://www.modsecurity.org/tarball/${version}/${pname}-${version}.tar.gz";
18 sha256 = "0611nskd2y6yagrciqafxdn4rxbdk2v4swf45kc1sgwx2sfh34j1";
19 };
20
21 nativeBuildInputs = [ pkg-config ];
22 buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ] ++
23 optional luaSupport lua5;
24
25 configureFlags = [
26 "--enable-standalone-module"
27 "--enable-static"
28 "--with-curl=${curl.dev}"
29 "--with-apxs=${apacheHttpd.dev}/bin/apxs"
30 "--with-pcre=${pcre.dev}"
31 "--with-apr=${apr.dev}"
32 "--with-apu=${aprutil.dev}/bin/apu-1-config"
33 "--with-libxml=${libxml2.dev}"
34 "--with-lua=${luaValue}"
35 ];
36
37 outputs = ["out" "nginx"];
38 # by default modsecurity's install script copies compiled output to httpd's modules folder
39 # this patch removes those lines
40 patches = [ ./Makefile.in.patch ];
41
42 postInstall = ''
43 mkdir -p $nginx
44 cp -R * $nginx
45 '';
46
47 meta = {
48 description = "Open source, cross-platform web application firewall (WAF)";
49 license = licenses.asl20;
50 homepage = "https://www.modsecurity.org/";
51 maintainers = with maintainers; [offline];
52 platforms = lib.platforms.linux ++ lib.platforms.darwin;
53 };
54}