Merge pull request #44423 from obsidiansystems/configureFlags-cleanup

treewide: All configureFlags are lists
This commit is contained in:
John Ericson
2018-08-03 17:49:01 -04:00
committed by GitHub
222 changed files with 743 additions and 600 deletions

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, lib
{ stdenv, fetchFromGitHub, autoreconfHook
, libpcap, texinfo
, iptables
, gnupgSupport ? true, gnupg, gpgme # Increases dependencies!
@@ -23,21 +23,18 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional gnupgSupport [ gnupg gpgme.dev ]
++ stdenv.lib.optional wgetSupport [ wget ];
configureFlags = ''
--sysconfdir=/etc
--localstatedir=/run
--with-iptables=${iptables}/sbin/iptables
${lib.optionalString (!buildServer) "--disable-server"}
${lib.optionalString (!buildClient) "--disable-client"}
${lib.optionalString gnupgSupport ''
--with-gpgme
--with-gpgme-prefix=${gpgme.dev}
--with-gpg=${gnupg}
''}
${lib.optionalString wgetSupport ''
--with-wget=${wget}/bin/wget
''}
'';
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/run"
"--with-iptables=${iptables}/sbin/iptables"
(stdenv.lib.enableFeature buildServer "server")
(stdenv.lib.enableFeature buildClient "client")
(stdenv.lib.withFeatureAs wgetSupport wget "${wget}/bin/wget")
] ++ stdenv.lib.optionalString gnupgSupport [
"--with-gpgme"
"--with-gpgme-prefix=${gpgme.dev}"
"--with-gpg=${gnupg}"
];
# Temporary hack to copy the example configuration files into the nix-store,
# this'll probably be helpful until there's a NixOS module for that (feel free

View File

@@ -22,17 +22,17 @@ stdenv.mkDerivation rec {
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}
'';
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

View File

@@ -24,7 +24,10 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
configureFlags = "--sysconfdir=/etc --localstatedir=/var";
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
];
installFlags = "sysconfdir=$(out)/etc localstatedir=$(TMPDIR)";

View File

@@ -41,11 +41,11 @@ stdenv.mkDerivation rec {
preConfigure = "./bootstrap.sh";
configureFlags = ""
+ stdenv.lib.optionalString withCrypto "--with-crypto "
+ stdenv.lib.optionalString enableMagic "--enable-magic "
+ stdenv.lib.optionalString enableCuckoo "--enable-cuckoo "
;
configureFlags = [
(stdenv.lib.withFeature withCrypto "crypto")
(stdenv.lib.enableFeature enableMagic "magic")
(stdenv.lib.enableFeature enableCuckoo "cuckoo")
];
meta = with stdenv.lib; {
description = "The pattern matching swiss knife for malware researchers";