From e9f301fcf7c34eca2691c6f321b2e6e3a349abe9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 28 Jun 2026 02:40:44 +0200 Subject: [PATCH] nginx: fix test and update script passthru Otherwise all nginx forks gain all of nginx' tests. --- pkgs/servers/http/nginx/generic.nix | 45 +++++++++++++++-------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/pkgs/servers/http/nginx/generic.nix b/pkgs/servers/http/nginx/generic.nix index f65cd0044fbb..019261aecfcb 100644 --- a/pkgs/servers/http/nginx/generic.nix +++ b/pkgs/servers/http/nginx/generic.nix @@ -46,9 +46,7 @@ outer@{ postInstall ? "", meta ? null, nginx-doc ? outer.nginx-doc, - passthru ? { - tests = { }; - }, + passthru ? { }, }: let @@ -281,25 +279,28 @@ stdenv.mkDerivation { passthru = { inherit modules; - tests = { - inherit (nixosTests) - nginx - nginx-auth - nginx-etag - nginx-etag-compression - nginx-globalredirect - nginx-http3 - nginx-proxyprotocol - nginx-pubhtml - nginx-sso - nginx-status-page - nginx-unix-socket - ; - variants = lib.recurseIntoAttrs nixosTests.nginx-variants; - acme-integration = nixosTests.acme.nginx; - acme-integration-without-reload = nixosTests.acme.nginx-without-reload; - } - // passthru.tests; + tests = + passthru.tests or { + inherit (nixosTests) + nginx + nginx-auth + nginx-etag + nginx-etag-compression + nginx-globalredirect + nginx-http3 + nginx-proxyprotocol + nginx-pubhtml + nginx-sso + nginx-status-page + nginx-unix-socket + ; + variants = lib.recurseIntoAttrs nixosTests.nginx-variants; + acme-integration = nixosTests.acme.nginx; + acme-integration-without-reload = nixosTests.acme.nginx-without-reload; + }; + } + // lib.optionalAttrs (passthru ? updateScript) { + inherit (passthru) updateScript; }; meta =