Merge pull request #89344 from JJJollyjim/openresty-no-perl
openresty: disable perl module by default
This commit is contained in:
commit
132ace5fe6
|
@ -236,6 +236,7 @@ in
|
||||||
nginx-pubhtml = handleTest ./nginx-pubhtml.nix {};
|
nginx-pubhtml = handleTest ./nginx-pubhtml.nix {};
|
||||||
nginx-sandbox = handleTestOn ["x86_64-linux"] ./nginx-sandbox.nix {};
|
nginx-sandbox = handleTestOn ["x86_64-linux"] ./nginx-sandbox.nix {};
|
||||||
nginx-sso = handleTest ./nginx-sso.nix {};
|
nginx-sso = handleTest ./nginx-sso.nix {};
|
||||||
|
nginx-variants = handleTest ./nginx-variants.nix {};
|
||||||
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
|
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
|
||||||
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
|
||||||
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
|
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
|
||||||
|
|
33
nixos/tests/nginx-variants.nix
Normal file
33
nixos/tests/nginx-variants.nix
Normal 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" ]
|
||||||
|
)
|
|
@ -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"
|
||||||
|
|
|
@ -34,6 +34,8 @@ callPackage ../nginx/generic.nix args rec {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
ln -s $out/luajit/bin/luajit-2.1.0-beta3 $out/bin/luajit-openresty
|
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/sbin/nginx $out/bin/nginx
|
||||||
|
ln -s $out/nginx/conf $out/conf
|
||||||
|
ln -s $out/nginx/html $out/html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -15927,14 +15927,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 ];
|
||||||
|
@ -15964,7 +15964,9 @@ in
|
||||||
openafs = callPackage ../servers/openafs/1.6 { tsmbac = null; ncurses = null; };
|
openafs = callPackage ../servers/openafs/1.6 { tsmbac = null; ncurses = null; };
|
||||||
openafs_1_8 = callPackage ../servers/openafs/1.8 { 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 = callPackage ../servers/mail/opensmtpd { };
|
||||||
opensmtpd-extras = callPackage ../servers/mail/opensmtpd/extras.nix { };
|
opensmtpd-extras = callPackage ../servers/mail/opensmtpd/extras.nix { };
|
||||||
|
|
Loading…
Reference in a new issue