mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 06:04:14 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
83 lines
1.6 KiB
Nix
83 lines
1.6 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
autoreconfHook,
|
|
curl,
|
|
apacheHttpd,
|
|
pcre,
|
|
apr,
|
|
aprutil,
|
|
libxml2,
|
|
luaSupport ? false,
|
|
lua5,
|
|
perl,
|
|
}:
|
|
|
|
let
|
|
luaValue = if luaSupport then lua5 else "no";
|
|
optional = lib.optional;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "modsecurity";
|
|
version = "2.9.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "owasp-modsecurity";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-hJ8wYeC83dl85bkUXGZKHpHzw9QRgtusj1/+Coxsx0k=";
|
|
};
|
|
|
|
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}"
|
|
];
|
|
|
|
outputs = [
|
|
"out"
|
|
"nginx"
|
|
];
|
|
# by default modsecurity's install script copies compiled output to httpd's modules folder
|
|
# this patch removes those lines
|
|
patches = [ ./Makefile.am.patch ];
|
|
|
|
doCheck = true;
|
|
nativeCheckInputs = [ perl ];
|
|
|
|
postInstall = ''
|
|
mkdir -p $nginx
|
|
cp -R * $nginx
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source, cross-platform web application firewall (WAF)";
|
|
license = licenses.asl20;
|
|
homepage = "https://github.com/owasp-modsecurity/ModSecurity";
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
};
|
|
}
|