From dca001e92312a4bc837f2a087c24fbea4069d8ca Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Sat, 20 Jun 2020 14:22:34 +1200 Subject: [PATCH] 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. --- pkgs/servers/http/nginx/generic.nix | 3 ++- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index 80bc1458ad7a..6ec5b0a78510 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -4,6 +4,7 @@ , withDebug ? false , withStream ? true , withMail ? false +, withPerl ? true , modules ? [] , ... }: @@ -87,7 +88,7 @@ stdenv.mkDerivation { ] ++ optionals withMail [ "--with-mail" "--with-mail_ssl_module" - ] ++ optional (perl != null) [ + ] ++ optionals withPerl [ "--with-http_perl_module" "--with-perl=${perl}/bin/perl" "--with-perl_modules_path=lib/perl5" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 072c892ccd60..7159c101d387 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15847,14 +15847,14 @@ in nginx = nginxStable; nginxStable = callPackage ../servers/http/nginx/stable.nix { - perl = null; + withPerl = false; # We don't use `with` statement here on purpose! # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ]; }; nginxMainline = callPackage ../servers/http/nginx/mainline.nix { - perl = null; + withPerl = false; # We don't use `with` statement here on purpose! # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334 modules = [ nginxModules.dav nginxModules.moreheaders ];