uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
17
pkgs/tools/security/modsecurity/Makefile.in.patch
Normal file
17
pkgs/tools/security/modsecurity/Makefile.in.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
--- a/apache2/Makefile.in 2017-10-10 09:45:51.000000000 -0400
|
||||
+++ b/apache2/Makefile.in 2017-10-10 09:46:04.000000000 -0400
|
||||
@@ -1208,14 +1208,12 @@
|
||||
@LINUX_TRUE@ for m in $(pkglib_LTLIBRARIES); do \
|
||||
@LINUX_TRUE@ base=`echo $$m | sed 's/\..*//'`; \
|
||||
@LINUX_TRUE@ rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
|
||||
-@LINUX_TRUE@ install -D -m444 $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES)/$$base.so; \
|
||||
@LINUX_TRUE@ done
|
||||
@LINUX_FALSE@install-exec-hook: $(pkglib_LTLIBRARIES)
|
||||
@LINUX_FALSE@ @echo "Removing unused static libraries..."; \
|
||||
@LINUX_FALSE@ for m in $(pkglib_LTLIBRARIES); do \
|
||||
@LINUX_FALSE@ base=`echo $$m | sed 's/\..*//'`; \
|
||||
@LINUX_FALSE@ rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
|
||||
-@LINUX_FALSE@ cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES); \
|
||||
@LINUX_FALSE@ done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
54
pkgs/tools/security/modsecurity/default.nix
Normal file
54
pkgs/tools/security/modsecurity/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ stdenv, lib, fetchurl, pkg-config
|
||||
, curl, apacheHttpd, pcre, apr, aprutil, libxml2
|
||||
, luaSupport ? false, lua5
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let luaValue = if luaSupport then lua5 else "no";
|
||||
optional = lib.optional;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "modsecurity";
|
||||
version = "2.9.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.modsecurity.org/tarball/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0611nskd2y6yagrciqafxdn4rxbdk2v4swf45kc1sgwx2sfh34j1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
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.in.patch ];
|
||||
|
||||
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 = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue