19 luaValue = if luaSupport then lua5 else "no";
20 optional = lib.optional;
23 stdenv.mkDerivation rec {
24 pname = "modsecurity";
27 src = fetchFromGitHub {
28 owner = "owasp-modsecurity";
31 sha256 = "sha256-hJ8wYeC83dl85bkUXGZKHpHzw9QRgtusj1/+Coxsx0k=";
45 ] ++ optional luaSupport lua5;
48 "--enable-standalone-module"
50 "--with-curl=${curl.dev}"
51 "--with-apxs=${apacheHttpd.dev}/bin/apxs"
52 "--with-pcre=${pcre.dev}"
53 "--with-apr=${apr.dev}"
54 "--with-apu=${aprutil.dev}/bin/apu-1-config"
55 "--with-libxml=${libxml2.dev}"
56 "--with-lua=${luaValue}"
63 # by default modsecurity's install script copies compiled output to httpd's modules folder
64 # this patch removes those lines
65 patches = [ ./Makefile.am.patch ];
68 nativeCheckInputs = [ perl ];
76 description = "Open source, cross-platform web application firewall (WAF)";
77 license = licenses.asl20;
78 homepage = "https://github.com/owasp-modsecurity/ModSecurity";
79 maintainers = with maintainers; [ offline ];
80 platforms = lib.platforms.linux ++ lib.platforms.darwin;