1{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
2, doxygen, perl, valgrind
3, curl, geoip, libxml2, lmdb, lua, pcre, yajl }:
4
5stdenv.mkDerivation rec {
6 pname = "libmodsecurity";
7 version = "3.0.4";
8
9 src = fetchFromGitHub {
10 owner = "SpiderLabs";
11 repo = "ModSecurity";
12 fetchSubmodules = true;
13 rev = "v${version}";
14 sha256 = "07vry10cdll94sp652hwapn0ppjv3mb7n2s781yhy7hssap6f2vp";
15 };
16
17 nativeBuildInputs = [ autoreconfHook pkg-config doxygen ];
18
19 buildInputs = [ perl valgrind curl geoip libxml2 lmdb lua pcre yajl ];
20
21 configureFlags = [
22 "--enable-static"
23 "--with-curl=${curl.dev}"
24 "--with-libxml=${libxml2.dev}"
25 "--with-pcre=${pcre.dev}"
26 "--with-yajl=${yajl}"
27 ];
28
29 enableParallelBuilding = true;
30
31 meta = with lib; {
32 description = ''
33 ModSecurity v3 library component.
34 '';
35 longDescription = ''
36 Libmodsecurity is one component of the ModSecurity v3 project. The
37 library codebase serves as an interface to ModSecurity Connectors taking
38 in web traffic and applying traditional ModSecurity processing. In
39 general, it provides the capability to load/interpret rules written in
40 the ModSecurity SecRules format and apply them to HTTP content provided
41 by your application via Connectors.
42 '';
43 homepage = "https://modsecurity.org/";
44 license = licenses.asl20;
45 platforms = platforms.all;
46 maintainers = with maintainers; [ izorkin ];
47 };
48}