git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119427 from talyz/tengine-modules

tengine: Add modules to passthru

commit59917dc3a9012fa74a127cd5b107a45c711942be authorKim Lindberger <kim.lindberger@gmail.com> dateWed 14 Apr 2021, 17:42 (6 years ago) parent6dff6324aab799
3 files changed+11−3
nixos/modules/services/web-servers/nginx/default.nix+1−1 pkgs/servers/http/nginx/generic.nix+4−1 pkgs/servers/http/tengine/default.nix+6−1
nixos/modules/services/web-servers/nginx/default.nix+1−1
@@ -818,7 +818,7 @@ in
818818 ProtectControlGroups = true;
819819 RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
820820 LockPersonality = true;
821− MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) (optionals (cfg.package ? modules) cfg.package.modules));
821+ MemoryDenyWriteExecute = !(builtins.any (mod: (mod.allowMemoryWriteExecute or false)) cfg.package.modules);
822822 RestrictRealtime = true;
823823 RestrictSUIDSGID = true;
824824 PrivateMounts = true;
pkgs/servers/http/nginx/generic.nix+4−1
@@ -142,7 +142,10 @@ stdenv.mkDerivation {
142142
143143 passthru = {
144144 modules = modules;
145− tests.nginx = nixosTests.nginx;
145+ tests = {
146+ inherit (nixosTests) nginx nginx-auth nginx-etag nginx-pubhtml nginx-sandbox nginx-sso;
147+ variants = lib.recurseIntoAttrs nixosTests.nginx-variants;
148+ };
146149 };
147150
148151 meta = if meta != null then meta else {
pkgs/servers/http/tengine/default.nix+6−1
@@ -1,5 +1,5 @@
11{ lib, stdenv, fetchFromGitHub, openssl, zlib, pcre, libxml2, libxslt
2−, substituteAll, gd, geoip, gperftools, jemalloc
2+, substituteAll, gd, geoip, gperftools, jemalloc, nixosTests
33, withDebug ? false
44, withMail ? false
55, withStream ? false
@@ -111,6 +111,11 @@ stdenv.mkDerivation rec {
111111 mv $out/sbin $out/bin
112112 '';
113113
114+ passthru = {
115+ inherit modules;
116+ tests = nixosTests.nginx-variants.tengine;
117+ };
118+
114119 meta = {
115120 description = "A web server based on Nginx and has many advanced features, originated by Taobao";
116121 homepage = "https://tengine.taobao.org";