From eb435dcd1f5bbbcbcdc72a77ecc9cb99f04dc5b1 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Fri, 3 Jul 2026 04:51:46 -0700 Subject: [PATCH] mattermostLatest: don't test unofficial patches Warn if the user tries to enable them, and disable them in tests because it's too much work to maintain them. --- nixos/tests/mattermost/default.nix | 7 +------ pkgs/by-name/ma/mattermost/package.nix | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/mattermost/default.nix b/nixos/tests/mattermost/default.nix index 075781583c00..1fd46f19abfa 100644 --- a/nixos/tests/mattermost/default.nix +++ b/nixos/tests/mattermost/default.nix @@ -66,12 +66,7 @@ import ../make-test-python.nix ( # Upgrade to the latest Mattermost. specialisation.latest.configuration = { - services.mattermost.package = lib.mkForce ( - pkgs.mattermostLatest.override { - removeFreeBadge = true; - removeUserLimit = true; - } - ); + services.mattermost.package = lib.mkForce pkgs.mattermostLatest; system.stateVersion = lib.mkVMOverride (lib.versions.majorMinor lib.version); }; } diff --git a/pkgs/by-name/ma/mattermost/package.nix b/pkgs/by-name/ma/mattermost/package.nix index d241c440c42a..077e35239ed7 100644 --- a/pkgs/by-name/ma/mattermost/package.nix +++ b/pkgs/by-name/ma/mattermost/package.nix @@ -35,6 +35,11 @@ ... }: +assert lib.warnIf (latestVersionInfo != null && (removeUserLimit || removeFreeBadge)) '' + The user limit and free badge patches are not tested with this Mattermost version + (${latestVersionInfo.version}). +'' true; + let /* Helper function that sets the `withTests` and `withoutTests` passthru correctly,