push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
--- a/apache2/Makefile.am
+++ b/apache2/Makefile.am
@@ -179,7 +179,6 @@ install-exec-hook: $(pkglib_LTLIBRARIES)
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
- install -D -m444 $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES)/$$base.so; \
done
else
install-exec-hook: $(pkglib_LTLIBRARIES)
@@ -187,6 +186,5 @@ install-exec-hook: $(pkglib_LTLIBRARIES)
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
- cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES); \
done
endif

View File

@@ -0,0 +1,95 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
autoreconfHook,
curl,
apacheHttpd,
pcre,
apr,
aprutil,
libxml2,
luaSupport ? false,
lua5,
perl,
versionCheckHook,
}:
let
luaValue = if luaSupport then lua5 else "no";
optional = lib.optional;
in
stdenv.mkDerivation (finalAttrs: {
pname = "modsecurity";
version = "2.9.12";
src = fetchFromGitHub {
owner = "owasp-modsecurity";
repo = "modsecurity";
tag = "v${finalAttrs.version}";
hash = "sha256-scMOiu8oI3+VcXe05gLNQ8ILmnP4iwls8ZZ9r+3ei5Y=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
curl
apacheHttpd
pcre
apr
aprutil
libxml2
]
++ optional luaSupport lua5;
configureFlags = [
"--enable-standalone-module"
"--enable-static"
"--with-curl=${curl.dev}"
"--with-apxs=${apacheHttpd.dev}/bin/apxs"
"--with-pcre=${pcre.dev}"
"--with-apr=${apr.dev}"
"--with-apu=${aprutil.dev}/bin/apu-1-config"
"--with-libxml=${libxml2.dev}"
"--with-lua=${luaValue}"
];
enableParallelBuilding = true;
outputs = [
"out"
"nginx"
];
patches = [
# by default modsecurity's install script copies compiled output to httpd's modules folder
# this patch removes those lines
./Makefile.am.patch
];
doCheck = true;
nativeCheckInputs = [ perl ];
postInstall = ''
mkdir -p $nginx
cp -R * $nginx
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "-v";
versionCheckProgram = "${placeholder "out"}/bin/mlogc";
meta = {
description = "Open source, cross-platform web application firewall (WAF)";
license = lib.licenses.asl20;
homepage = "https://github.com/owasp-modsecurity/ModSecurity";
maintainers = with lib.maintainers; [ offline ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})