nginx: change how the perl module is configured

Previously, http_perl_module was disabled by overriding perl=null -- this means
it is impossible to disable http_perl_module in openresty, since openresty
requires perl for its configure scripts.
This commit is contained in:
Jamie McClymont 2020-06-20 14:22:34 +12:00
parent 44007dec5c
commit dca001e923
2 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@
, withDebug ? false , withDebug ? false
, withStream ? true , withStream ? true
, withMail ? false , withMail ? false
, withPerl ? true
, modules ? [] , modules ? []
, ... , ...
}: }:
@ -87,7 +88,7 @@ stdenv.mkDerivation {
] ++ optionals withMail [ ] ++ optionals withMail [
"--with-mail" "--with-mail"
"--with-mail_ssl_module" "--with-mail_ssl_module"
] ++ optional (perl != null) [ ] ++ optionals withPerl [
"--with-http_perl_module" "--with-http_perl_module"
"--with-perl=${perl}/bin/perl" "--with-perl=${perl}/bin/perl"
"--with-perl_modules_path=lib/perl5" "--with-perl_modules_path=lib/perl5"

View File

@ -15847,14 +15847,14 @@ in
nginx = nginxStable; nginx = nginxStable;
nginxStable = callPackage ../servers/http/nginx/stable.nix { nginxStable = callPackage ../servers/http/nginx/stable.nix {
perl = null; withPerl = false;
# We don't use `with` statement here on purpose! # We don't use `with` statement here on purpose!
# See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ]; modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
}; };
nginxMainline = callPackage ../servers/http/nginx/mainline.nix { nginxMainline = callPackage ../servers/http/nginx/mainline.nix {
perl = null; withPerl = false;
# We don't use `with` statement here on purpose! # We don't use `with` statement here on purpose!
# See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
modules = [ nginxModules.dav nginxModules.moreheaders ]; modules = [ nginxModules.dav nginxModules.moreheaders ];