about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/servers/http/nginx/generic.nix10
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix
index 3edbed22b6b6..b0a4a84b2fa2 100644
--- a/pkgs/servers/http/nginx/generic.nix
+++ b/pkgs/servers/http/nginx/generic.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
-, substituteAll, gd, geoip
+, substituteAll, gd, geoip, perl
 , withDebug ? false
 , withStream ? true
 , withMail ? false
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
     inherit sha256;
   };
 
-  buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip ]
+  buildInputs = [ openssl zlib pcre libxml2 libxslt gd geoip perl ]
     ++ mapModules "inputs";
 
   configureFlags = [
@@ -52,8 +52,6 @@ stdenv.mkDerivation {
     "--with-http_stub_status_module"
     "--with-threads"
     "--with-pcre-jit"
-    # Install destination problems
-    # "--with-http_perl_module"
   ] ++ optional withDebug [
     "--with-debug"
   ] ++ optional withStream [
@@ -65,6 +63,10 @@ stdenv.mkDerivation {
   ] ++ optional withMail [
     "--with-mail"
     "--with-mail_ssl_module"
+  ] ++ optional (perl != null) [
+    "--with-http_perl_module"
+    "--with-perl=${perl}/bin/perl"
+    "--with-perl_modules_path=lib/perl5"
   ]
     ++ optional (gd != null) "--with-http_image_filter_module"
     ++ optional (with stdenv.hostPlatform; isLinux || isFreeBSD) "--with-file-aio"
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6f7c41a08a4d..af4ae194fa13 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15210,12 +15210,14 @@ in
   nginx = nginxStable;
 
   nginxStable = callPackage ../servers/http/nginx/stable.nix {
+    perl = null;
     # 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;
     # We don't use `with` statement here on purpose!
     # See https://github.com/NixOS/nixpkgs/pull/10474/files#r42369334
     modules = [ nginxModules.dav nginxModules.moreheaders ];