nixpkgs/pkgs/tools/security/modsecurity/default.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{ 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";
};
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}"
"--with-apxs=${apacheHttpd.dev}/bin/apxs"
2015-09-23 20:28:29 +02:00
"--with-pcre=${pcre}"
"--with-apr=${apr.dev}"
"--with-apu=${aprutil.dev}/bin/apu-1-config"
2015-09-23 20:28:29 +02:00
"--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];
platforms = platforms.linux;
2015-09-23 20:28:29 +02:00
};
}