diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2024-05-23 07:35:40 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2024-05-25 12:08:22 -0300 |
commit | e3e087e9ead7aa8892f38a5fa7443cbc9a0f5cbd (patch) | |
tree | eb02bd52781391c435efa368bac2c53075763b0b /pkgs/servers/http/nginx/generic.nix | |
parent | 64973309bba193864683109d56bb7d64987b57e1 (diff) |
nginx: make geoip optional
Diffstat (limited to 'pkgs/servers/http/nginx/generic.nix')
-rw-r--r-- | pkgs/servers/http/nginx/generic.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 11171a331ba91..bc97c4972be76 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -4,6 +4,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt , nixosTests , installShellFiles, substituteAll, removeReferencesTo, gd, geoip, perl , withDebug ? false +, withGeoIP ? false , withImageFilter ? false , withKTLS ? true , withStream ? true @@ -65,9 +66,10 @@ stdenv.mkDerivation { removeReferencesTo ] ++ nativeBuildInputs; - buildInputs = [ openssl zlib pcre libxml2 libxslt geoip perl ] + buildInputs = [ openssl zlib pcre libxml2 libxslt perl ] ++ buildInputs ++ mapModules "inputs" + ++ lib.optional withGeoIP geoip ++ lib.optional withImageFilter gd; configureFlags = [ @@ -116,8 +118,7 @@ stdenv.mkDerivation { "--with-perl_modules_path=lib/perl5" ] ++ lib.optional withImageFilter "--with-http_image_filter_module" ++ lib.optional withSlice "--with-http_slice_module" - ++ lib.optional (geoip != null) "--with-http_geoip_module" - ++ lib.optional (withStream && geoip != null) "--with-stream_geoip_module" + ++ lib.optionals withGeoIP ([ "--with-http_geoip_module" ] ++ lib.optional withStream "--with-stream_geoip_module") ++ lib.optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio" ++ configureFlags ++ map (mod: "--add-module=${mod.src}") modules; |