2015-10-05 13:23:01 +02:00
|
|
|
{ stdenv, lib, fetchurl, pkgconfig
|
2015-09-23 20:28:29 +02: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 13:23:01 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2015-09-23 20:28:29 +02:00
|
|
|
buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ];
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-standalone-module"
|
|
|
|
"--enable-static"
|
2016-04-16 18:47:59 +02:00
|
|
|
"--with-curl=${curl.dev}"
|
2016-04-16 18:40:54 +02:00
|
|
|
"--with-apxs=${apacheHttpd.dev}/bin/apxs"
|
2016-04-16 19:45:26 +02:00
|
|
|
"--with-pcre=${pcre.dev}"
|
2016-04-16 18:41:26 +02:00
|
|
|
"--with-apr=${apr.dev}"
|
2016-04-16 18:41:43 +02:00
|
|
|
"--with-apu=${aprutil.dev}/bin/apu-1-config"
|
2016-08-30 01:57:21 +02:00
|
|
|
"--with-libxml=${libxml2.dev}"
|
2015-09-23 20:28:29 +02: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 21:29:29 +01:00
|
|
|
platforms = platforms.linux;
|
2015-09-23 20:28:29 +02:00
|
|
|
};
|
|
|
|
}
|