diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix
index 68eea5b..a2b9bab 100644
--- a/nixbld-etc-nixos/configuration.nix
+++ b/nixbld-etc-nixos/configuration.nix
@@ -957,11 +957,15 @@ in
hydraPath = oa.hydraPath + ":" + super.lib.makeBinPath [ super.jq ];
doCheck = false; # FIXME: ldap tests fail on hydra rebuild, seems unrelated to patches above.
});
- mattermost = super.mattermost.overrideAttrs(oa: {
- postInstall = oa.postInstall +
- ''
- sed -i.bak "s/FREE EDITION//g" $out/client/*.js $out/client/*.js.map
- '';
+ mattermost = let
+ webapp-new = self.mattermost.webapp.overrideAttrs(oa: {
+ patches = oa.patches or [ ] ++ [ ./mattermost-remove-free-banner.patch ];
+ });
+ in super.mattermost.overrideAttrs(oa: {
+ postInstall = builtins.replaceStrings
+ [ self.mattermost.webapp.outPath ]
+ [ "${webapp-new}" ]
+ oa.postInstall;
});
matterbridge = super.matterbridge.overrideAttrs(oa: {
patches = oa.patches or [] ++ [ ./matterbridge-disable-github.patch ];
diff --git a/nixbld-etc-nixos/mattermost-remove-free-banner.patch b/nixbld-etc-nixos/mattermost-remove-free-banner.patch
new file mode 100644
index 0000000..3bd9502
--- /dev/null
+++ b/nixbld-etc-nixos/mattermost-remove-free-banner.patch
@@ -0,0 +1,163 @@
+diff --git webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_team_edition.tsx webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_team_edition.tsx
+index 9af4fc7354..60ae3160e8 100644
+--- webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_team_edition.tsx
++++ webapp/channels/src/components/global_header/left_controls/product_menu/product_branding_team_edition/product_branding_team_edition.tsx
+@@ -9,10 +9,6 @@ import Logo from 'components/common/svg_images_components/logo_dark_blue_svg';
+ const ProductBrandingTeamEditionContainer = styled.div`
+ display: flex;
+ align-items: center;
+-
+- > * + * {
+- margin-left: 8px;
+- }
+ `;
+
+ const StyledLogo = styled(Logo)`
+@@ -21,23 +17,6 @@ const StyledLogo = styled(Logo)`
+ }
+ `;
+
+-const Badge = styled.div`
+- display: flex;
+- align-self: center;
+- padding: 2px 6px;
+- position: relative;
+- top: 1px;
+- border-radius: var(--radius-s);
+- margin-left: 12px;
+- background: rgba(var(--sidebar-text-rgb), 0.08);
+- color: rgba(var(--sidebar-text-rgb), 0.75);
+- font-family: 'Open Sans', sans-serif;
+- font-size: 10px;
+- font-weight: 600;
+- letter-spacing: 0.025em;
+- line-height: 16px;
+-`;
+-
+ const ProductBrandingTeamEdition = (): JSX.Element => {
+ return (
+