Merge pull request #89344 from JJJollyjim/openresty-no-perl

openresty: disable perl module by default
This commit is contained in:
Michael Raskin 2020-06-20 18:45:44 +00:00 committed by GitHub
commit 132ace5fe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 4 deletions

View file

@ -236,6 +236,7 @@ in
nginx-pubhtml = handleTest ./nginx-pubhtml.nix {};
nginx-sandbox = handleTestOn ["x86_64-linux"] ./nginx-sandbox.nix {};
nginx-sso = handleTest ./nginx-sso.nix {};
nginx-variants = handleTest ./nginx-variants.nix {};
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};

View file

@ -0,0 +1,33 @@
{ system ? builtins.currentSystem,
config ? {},
pkgs ? import ../.. { inherit system config; }
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
builtins.listToAttrs (
builtins.map
(nginxName:
{
name = nginxName;
value = makeTest {
name = "nginx-variant-${nginxName}";
machine = { pkgs, ... }: {
services.nginx = {
enable = true;
virtualHosts.localhost.locations."/".return = "200 'foo'";
package = pkgs."${nginxName}";
};
};
testScript = ''
machine.wait_for_unit("nginx")
machine.wait_for_open_port(80)
machine.succeed('test "$(curl -fvvv http://localhost/)" = foo')
'';
};
}
)
[ "nginxStable" "nginxUnstable" "nginxShibboleth" "openresty" "tengine" ]
)

View file

@ -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"

View file

@ -34,6 +34,8 @@ callPackage ../nginx/generic.nix args rec {
postInstall = ''
ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
ln -s $out/nginx/sbin/nginx $out/bin/nginx
ln -s $out/nginx/conf $out/conf
ln -s $out/nginx/html $out/html
'';
meta = {

View file

@ -15927,14 +15927,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 ];
@ -15964,7 +15964,9 @@ in
openafs = callPackage ../servers/openafs/1.6 { tsmbac = null; ncurses = null; };
openafs_1_8 = callPackage ../servers/openafs/1.8 { tsmbac = null; ncurses = null; };
openresty = callPackage ../servers/http/openresty { };
openresty = callPackage ../servers/http/openresty {
withPerl = false;
};
opensmtpd = callPackage ../servers/mail/opensmtpd { };
opensmtpd-extras = callPackage ../servers/mail/opensmtpd/extras.nix { };