about summary refs log tree commit diff
path: root/pkgs/tools/security/modsecurity/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/security/modsecurity/default.nix')
-rw-r--r--pkgs/tools/security/modsecurity/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/tools/security/modsecurity/default.nix b/pkgs/tools/security/modsecurity/default.nix
index 1bbefd1342c34..431a6f9338eae 100644
--- a/pkgs/tools/security/modsecurity/default.nix
+++ b/pkgs/tools/security/modsecurity/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, lib, fetchurl, pkg-config
+{ stdenv, lib, fetchFromGitHub, pkg-config, autoreconfHook
 , curl, apacheHttpd, pcre, apr, aprutil, libxml2
-, luaSupport ? false, lua5
+, luaSupport ? false, lua5, perl
 }:
 
 with lib;
@@ -11,14 +11,16 @@ in
 
 stdenv.mkDerivation rec {
   pname = "modsecurity";
-  version = "2.9.3";
+  version = "2.9.6";
 
-  src = fetchurl {
-    url = "https://www.modsecurity.org/tarball/${version}/${pname}-${version}.tar.gz";
-    sha256 = "0611nskd2y6yagrciqafxdn4rxbdk2v4swf45kc1sgwx2sfh34j1";
+  src = fetchFromGitHub {
+    owner = "SpiderLabs";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-C/D/UWaI4GsXjfhLmNnYhRJoUvlsps1551SqhmZUc/4=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
   buildInputs = [  curl apacheHttpd pcre apr aprutil libxml2 ] ++
     optional luaSupport lua5;
 
@@ -37,7 +39,10 @@ stdenv.mkDerivation rec {
   outputs = ["out" "nginx"];
   # by default modsecurity's install script copies compiled output to httpd's modules folder
   # this patch removes those lines
-  patches = [ ./Makefile.in.patch ];
+  patches = [ ./Makefile.am.patch ];
+
+  doCheck = true;
+  checkInputs = [ perl ];
 
   postInstall = ''
     mkdir -p $nginx