From e4d5a9864a2102dbbc17adc765fd759db24a6edd Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:47:21 -0300 Subject: [PATCH] k3s: refactor passthru and expose k3s dependencies for update script --- .../networking/cluster/k3s/builder.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/cluster/k3s/builder.nix b/pkgs/applications/networking/cluster/k3s/builder.nix index 28e55da9b64d..eeff2578efb7 100644 --- a/pkgs/applications/networking/cluster/k3s/builder.nix +++ b/pkgs/applications/networking/cluster/k3s/builder.nix @@ -417,16 +417,21 @@ buildGoModule rec { runHook postInstallCheck ''; - passthru.updateScript = updateScript; - - passthru.mkTests = - version: - let - k3s_version = "k3s_" + lib.replaceStrings [ "." ] [ "_" ] (lib.versions.majorMinor version); - in - lib.mapAttrs (name: value: nixosTests.k3s.${name}.${k3s_version}) nixosTests.k3s; - - passthru.tests = passthru.mkTests k3sVersion; + passthru = { + k3sCNIPlugins = k3sCNIPlugins; + k3sContainerd = k3sContainerd; + k3sRepo = k3sRepo; + k3sRoot = k3sRoot; + k3sServer = k3sServer; + mkTests = + version: + let + k3s_version = "k3s_" + lib.replaceStrings [ "." ] [ "_" ] (lib.versions.majorMinor version); + in + lib.mapAttrs (name: value: nixosTests.k3s.${name}.${k3s_version}) nixosTests.k3s; + tests = passthru.mkTests k3sVersion; + updateScript = updateScript; + }; meta = baseMeta; }