angie: init at 1.4.0
This commit is contained in:
parent
00cb53de4f
commit
86efccfa45
@ -649,6 +649,8 @@ in
|
||||
Nginx package to use. This defaults to the stable version. Note
|
||||
that the nginx team recommends to use the mainline version which
|
||||
available in nixpkgs as `nginxMainline`.
|
||||
Supported Nginx forks include `angie`, `openresty` and `tengine`.
|
||||
For HTTP/3 support use `nginxQuic` or `angieQuic`.
|
||||
'';
|
||||
};
|
||||
|
||||
@ -1144,18 +1146,20 @@ in
|
||||
}
|
||||
|
||||
{
|
||||
assertion = cfg.package.pname != "nginxQuic" -> !(cfg.enableQuicBPF);
|
||||
assertion = cfg.package.pname != "nginxQuic" && cfg.package.pname != "angieQuic" -> !(cfg.enableQuicBPF);
|
||||
message = ''
|
||||
services.nginx.enableQuicBPF requires using nginxQuic package,
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;`.
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;` or
|
||||
`services.nginx.package = pkgs.angieQuic;`.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
assertion = cfg.package.pname != "nginxQuic" -> all (host: !host.quic) (attrValues virtualHosts);
|
||||
assertion = cfg.package.pname != "nginxQuic" && cfg.package.pname != "angieQuic" -> all (host: !host.quic) (attrValues virtualHosts);
|
||||
message = ''
|
||||
services.nginx.service.virtualHosts.<name>.quic requires using nginxQuic package,
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;`.
|
||||
services.nginx.service.virtualHosts.<name>.quic requires using nginxQuic or angie packages,
|
||||
which can be achieved by setting `services.nginx.package = pkgs.nginxQuic;` or
|
||||
`services.nginx.package = pkgs.angieQuic;`.
|
||||
'';
|
||||
}
|
||||
|
||||
|
@ -7,17 +7,17 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
|
||||
builtins.listToAttrs (
|
||||
builtins.map
|
||||
(nginxName:
|
||||
(nginxPackage:
|
||||
{
|
||||
name = nginxName;
|
||||
name = pkgs.lib.getName nginxPackage;
|
||||
value = makeTest {
|
||||
name = "nginx-variant-${nginxName}";
|
||||
name = "nginx-variant-${pkgs.lib.getName nginxPackage}";
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.localhost.locations."/".return = "200 'foo'";
|
||||
package = pkgs."${nginxName}";
|
||||
package = nginxPackage;
|
||||
};
|
||||
};
|
||||
|
||||
@ -29,5 +29,5 @@ builtins.listToAttrs (
|
||||
};
|
||||
}
|
||||
)
|
||||
[ "nginxStable" "nginxMainline" "nginxQuic" "nginxShibboleth" "openresty" "tengine" ]
|
||||
[ pkgs.angie pkgs.angieQuic pkgs.nginxStable pkgs.nginxMainline pkgs.nginxQuic pkgs.nginxShibboleth pkgs.openresty pkgs.tengine ]
|
||||
)
|
||||
|
45
pkgs/servers/http/angie/default.nix
Normal file
45
pkgs/servers/http/angie/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ callPackage
|
||||
, runCommand
|
||||
, lib
|
||||
, fetchurl
|
||||
, nixosTests
|
||||
, withQuic ? false
|
||||
, fetchpatch
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
callPackage ../nginx/generic.nix args rec {
|
||||
version = "1.4.0";
|
||||
pname = if withQuic then "angieQuic" else "angie";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.angie.software/files/angie-${version}.tar.gz";
|
||||
hash = "sha256-gaQsPwoxtt6oVSDX1JCWvyUwDQaNprya79CCwu4z8b4=";
|
||||
};
|
||||
|
||||
configureFlags = lib.optional withQuic [
|
||||
"--with-http_v3_module"
|
||||
];
|
||||
|
||||
preInstall = ''
|
||||
if [[ -e man/angie.8 ]]; then
|
||||
installManPage man/angie.8
|
||||
fi
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
ln -s $out/bin/nginx $out/bin/angie
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
angie = nixosTests.nginx-variants.angie;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Angie is an efficient, powerful, and scalable web server that was forked from nginx";
|
||||
homepage = "https://angie.software/en/";
|
||||
license = lib.licenses.bsd2;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ izorkin ];
|
||||
};
|
||||
}
|
@ -25,6 +25,7 @@ outer@{ lib, stdenv, fetchurl, fetchpatch, openssl, zlib, pcre, libxml2, libxslt
|
||||
, fixPatch ? p: p
|
||||
, postPatch ? ""
|
||||
, preConfigure ? ""
|
||||
, preInstall ? ""
|
||||
, postInstall ? ""
|
||||
, meta ? null
|
||||
, nginx-doc ? outer.nginx-doc
|
||||
@ -179,7 +180,7 @@ stdenv.mkDerivation {
|
||||
if [[ -e man/nginx.8 ]]; then
|
||||
installManPage man/nginx.8
|
||||
fi
|
||||
'';
|
||||
'' + preInstall;
|
||||
|
||||
disallowedReferences = map (m: m.src) modules;
|
||||
|
||||
|
@ -3250,6 +3250,25 @@ with pkgs;
|
||||
|
||||
anewer = callPackage ../tools/text/anewer { };
|
||||
|
||||
angie = callPackage ../servers/http/angie {
|
||||
zlib = zlib-ng.override { withZlibCompat = true; };
|
||||
withPerl = false;
|
||||
# We don't use `with` statement here on purpose!
|
||||
# See https://github.com/NixOS/nixpkgs/pull/10474#discussion_r42369334
|
||||
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
|
||||
};
|
||||
|
||||
angieQuic = callPackage ../servers/http/angie {
|
||||
zlib = zlib-ng.override { withZlibCompat = true; };
|
||||
withPerl = false;
|
||||
withQuic = true;
|
||||
# We don't use `with` statement here on purpose!
|
||||
# See https://github.com/NixOS/nixpkgs/pull/10474#discussion_r42369334
|
||||
modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ];
|
||||
# Use latest quictls to allow http3 support
|
||||
openssl = quictls;
|
||||
};
|
||||
|
||||
angle-grinder = callPackage ../tools/text/angle-grinder { };
|
||||
|
||||
ansifilter = callPackage ../tools/text/ansifilter { };
|
||||
|
Loading…
Reference in New Issue
Block a user