Compare commits

...

2 commits

Author SHA1 Message Date
c3c7fe44de mattermost: jump ESR versions (9.5.x → 9.11.x) 2024-08-17 22:01:18 +02:00
eaa25de128 mattermost: make it work with nix-update
this mirrors a change in the nixpkgs definition: the nix-update script
has a hardcoded list of attributes it will update. We can re-use one of
them to make it update mattermost's web frontend at the same time as it
updates mattermost itself.

The list of attribute names is here:
  https://github.com/Mic92/nix-update/tree/1.3.1?tab=readme-ov-file#features
original nixpkgs commit by numinit was
  1451a58a57e1bd1592460268bdde30cf72923010
  1451a58a57
2024-08-17 21:58:50 +02:00

View file

@ -12,13 +12,13 @@ buildGoModule rec {
# See https://docs.mattermost.com/upgrade/extended-support-release.html # See https://docs.mattermost.com/upgrade/extended-support-release.html
# When a new ESR version is available (e.g. 8.1.x -> 9.5.x), update # When a new ESR version is available (e.g. 8.1.x -> 9.5.x), update
# the version regex in passthru.updateScript as well. # the version regex in passthru.updateScript as well.
version = "9.5.8"; version = "9.11.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mattermost"; owner = "mattermost";
repo = "mattermost"; repo = "mattermost";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-WK3O1t2mMqftH8EB12g1/xzQnnmJxSsBjaGrRk0Hypw="; hash = "sha256-Qs5/f2wltG7HRTOVxfS+6C9CP+NR475ix/4XHezKxIc=";
}; };
# Needed because buildGoModule does not support go workspaces yet. # Needed because buildGoModule does not support go workspaces yet.
@ -34,10 +34,10 @@ buildGoModule rec {
webapp = fetchurl { webapp = fetchurl {
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz"; url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
hash = "sha256-gUp/Y0hI3oZkyTnEvyNXtHtPx77MC5zz+Z4b0FdrsqM="; hash = "sha256-KT8hYVhjAvSluqnZ2IGX9RdCb8EqLtIyQuIKJkf+9No=";
}; };
vendorHash = "sha256-TJCtgNf56A1U0EbV5gXjTro+YudVBRWiSZoBC3nJxnE="; vendorHash = "sha256-0rxLt2ODlGsC3z5qw7m7QsverKrTtWicnHep4+fDD3M=";
modRoot = "./server"; modRoot = "./server";
preBuild = '' preBuild = ''
@ -45,6 +45,7 @@ buildGoModule rec {
''; '';
subPackages = [ "cmd/mattermost" ]; subPackages = [ "cmd/mattermost" ];
offlineCache = webapp;
tags = [ "production" ]; tags = [ "production" ];
@ -69,7 +70,7 @@ buildGoModule rec {
passthru = { passthru = {
updateScript = nix-update-script { updateScript = nix-update-script {
extraArgs = [ "--version-regex" "^v(9\.5\.([0-9.]+))" ]; extraArgs = [ "--version-regex" "^v(9\.11\.([0-9.]+))" ];
}; };
tests.mattermost = nixosTests.mattermost; tests.mattermost = nixosTests.mattermost;
}; };