2015-10-05 12:23:01 +01:00
|
|
|
{ stdenv, lib, fetchurl, pkgconfig
|
2015-09-23 19:28:29 +01:00
|
|
|
, curl, apacheHttpd, pcre, apr, aprutil, libxml2 }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "modsecurity-${version}";
|
|
|
|
version = "2.9.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.modsecurity.org/tarball/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "e2bbf789966c1f80094d88d9085a81bde082b2054f8e38e0db571ca49208f434";
|
|
|
|
};
|
|
|
|
|
2015-10-05 12:23:01 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2015-09-23 19:28:29 +01:00
|
|
|
buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ];
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-standalone-module"
|
|
|
|
"--enable-static"
|
2016-04-16 17:47:59 +01:00
|
|
|
"--with-curl=${curl.dev}"
|
2016-04-16 17:40:54 +01:00
|
|
|
"--with-apxs=${apacheHttpd.dev}/bin/apxs"
|
2016-04-16 18:45:26 +01:00
|
|
|
"--with-pcre=${pcre.dev}"
|
2016-04-16 17:41:26 +01:00
|
|
|
"--with-apr=${apr.dev}"
|
2016-04-16 17:41:43 +01:00
|
|
|
"--with-apu=${aprutil.dev}/bin/apu-1-config"
|
2016-08-30 00:57:21 +01:00
|
|
|
"--with-libxml=${libxml2.dev}"
|
2015-09-23 19:28:29 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
outputs = ["out" "nginx"];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace apache2/Makefile.in --replace "install -D " "# install -D"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $nginx
|
|
|
|
cp -R * $nginx
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Open source, cross-platform web application firewall (WAF)";
|
|
|
|
license = licenses.asl20;
|
|
|
|
homepage = https://www.modsecurity.org/;
|
|
|
|
maintainers = with maintainers; [offline];
|
2015-11-17 20:29:29 +00:00
|
|
|
platforms = platforms.linux;
|
2015-09-23 19:28:29 +01:00
|
|
|
};
|
|
|
|
}
|