Merge pull request #119427 from talyz/tengine-modules

tengine: Add modules to passthru
This commit is contained in:
Kim Lindberger 2021-04-14 17:42:01 +02:00 committed by GitHub
commit 59917dc3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -818,7 +818,7 @@ in
ProtectControlGroups = true;
RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
LockPersonality = true;
MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) (optionals (cfg.package ? modules) cfg.package.modules));
MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) cfg.package.modules);
RestrictRealtime = true;
RestrictSUIDSGID = true;
PrivateMounts = true;

View File

@ -142,7 +142,10 @@ stdenv.mkDerivation {
passthru = {
modules = modules;
tests.nginx = nixosTests.nginx;
tests = {
inherit (nixosTests) nginx nginx-auth nginx-etag nginx-pubhtml nginx-sandbox nginx-sso;
variants = lib.recurseIntoAttrs nixosTests.nginx-variants;
};
};
meta = if meta != null then meta else {

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, openssl, zlib, pcre, libxml2, libxslt
, substituteAll, gd, geoip, gperftools, jemalloc
, substituteAll, gd, geoip, gperftools, jemalloc, nixosTests
, withDebug ? false
, withMail ? false
, withStream ? false
@ -111,6 +111,11 @@ stdenv.mkDerivation rec {
mv $out/sbin $out/bin
'';
passthru = {
inherit modules;
tests = nixosTests.nginx-variants.tengine;
};
meta = {
description = "A web server based on Nginx and has many advanced features, originated by Taobao";
homepage = "https://tengine.taobao.org";