summaryrefslogtreecommitdiffstats
path: root/pkgs/servers
diff options
context:
space:
mode:
authorMilan Pässler <milan@petabyte.dev>2021-03-25 13:17:32 +0100
committerMilan Pässler <milan@petabyte.dev>2021-03-25 13:17:32 +0100
commit496873260ad5720a9a480671e2c70f8b2d9b52af (patch)
treebedcb572b053c66e28d61b9e9753ce9cf9d6fc34 /pkgs/servers
parent82515ef0d8509325a122dc674f4303e78a3e4bea (diff)
nginx: make geoip dependency optional
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/http/nginx/generic.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix
index 251f099f7d96..d249d47a2150 100644
--- a/pkgs/servers/http/nginx/generic.nix
+++ b/pkgs/servers/http/nginx/generic.nix
@@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
+
, nixosTests
, substituteAll, gd, geoip, perl
, withDebug ? false
@@ -55,7 +56,6 @@ stdenv.mkDerivation {
"--with-http_realip_module"
"--with-http_addition_module"
"--with-http_xslt_module"
- "--with-http_geoip_module"
"--with-http_sub_module"
"--with-http_dav_module"
"--with-http_flv_module"
@@ -81,7 +81,6 @@ stdenv.mkDerivation {
"--with-debug"
] ++ optionals withStream [
"--with-stream"
- "--with-stream_geoip_module"
"--with-stream_realip_module"
"--with-stream_ssl_module"
"--with-stream_ssl_preread_module"
@@ -94,6 +93,8 @@ stdenv.mkDerivation {
"--with-perl_modules_path=lib/perl5"
]
++ optional (gd != null) "--with-http_image_filter_module"
+ ++ optional (geoip != null) "--with-http_geoip_module"
+ ++ optional (withStream && geoip != null) "--with-stream_geoip_module"
++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
++ configureFlags
++ map (mod: "--add-module=${mod.src}") modules;