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"
|
|
|
|
"--with-curl=${curl}"
|
2016-04-16 18:40:54 +02:00
|
|
|
"--with-apxs=${apacheHttpd.dev}/bin/apxs"
|
2015-09-23 20:28:29 +02:00
|
|
|
"--with-pcre=${pcre}"
|
2016-04-16 18:41:26 +02:00
|
|
|
"--with-apr=${apr.dev}"
|
2015-09-23 20:28:29 +02:00
|
|
|
"--with-apu=${aprutil}/bin/apu-1-config"
|
|
|
|
"--with-libxml=${libxml2}"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|