diff options
author | Emily <git@emilylange.de> | 2024-02-27 16:26:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 16:26:39 +0100 |
commit | 972f713a5907809223d5fa25fbf49dc973b87f72 (patch) | |
tree | 501028771e3a94a1a18ec9b4eb5a429a6fa3aeeb /pkgs/servers | |
parent | 482efa9a4bff6a83afbae25dee88741423d838c6 (diff) | |
parent | 91df784a3f6673f3e44d8dc0acc7ab94da45f39b (diff) | |
download | nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar.gz nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar.bz2 nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar.lz nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar.xz nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.tar.zst nixlib-972f713a5907809223d5fa25fbf49dc973b87f72.zip |
Merge pull request #291409 from stuebinm/mattermost-esr-update
mattermost 8.1.10 → 9.5.1
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/mattermost/default.nix | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/pkgs/servers/mattermost/default.nix b/pkgs/servers/mattermost/default.nix index 0abe7e659e27..c76dd152929c 100644 --- a/pkgs/servers/mattermost/default.nix +++ b/pkgs/servers/mattermost/default.nix @@ -1,35 +1,48 @@ { lib , buildGoModule , fetchFromGitHub -, fetchpatch +, nix-update-script , fetchurl , nixosTests }: buildGoModule rec { pname = "mattermost"; - version = "8.1.10"; + # ESR releases only. + # 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 + # the version regex in passthru.updateScript as well. + version = "9.5.1"; src = fetchFromGitHub { owner = "mattermost"; repo = "mattermost"; rev = "v${version}"; - hash = "sha256-eloO83koCNZOR/NYzUCdKOtVdF7rk+VrZ9U2bKWkxNU="; - } + "/server"; + hash = "sha256-w+VF8VoS7oIcDlYS5kCFzSX4rgD9l1B99XBHeJDB6JI="; + }; - # this can probably be removed again in versions newer than 8.1.10 + # Needed because buildGoModule does not support go workspaces yet. + # We use go 1.22's workspace vendor command, which is not yet available + # in the default version of go used in nixpkgs, nor is it used by upstream: + # https://github.com/mattermost/mattermost/issues/26221#issuecomment-1945351597 overrideModAttrs = (_: { - preBuild = '' - go mod tidy + buildPhase = '' + make setup-go-work + go work vendor -e ''; }); webapp = fetchurl { url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz"; - hash = "sha256-qxFW/P+INcMKSzaGZtOOr1Mi/glgZeiKvQ+YN0qX070="; + hash = "sha256-F32NWulKUhoyHPCmCCih6Hb9+W2iuF/Mxy9USrgp1pM="; }; - vendorHash = "sha256-ZbLSxG9Gyhk7PBC2V6sMtrQNXvm+ugMfliFIHWO1VLs="; + vendorHash = "sha256-TJCtgNf56A1U0EbV5gXjTro+YudVBRWiSZoBC3nJxnE="; + + modRoot = "./server"; + preBuild = '' + make setup-go-work + ''; subPackages = [ "cmd/mattermost" ]; @@ -44,7 +57,6 @@ buildGoModule rec { "-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}" "-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none" "-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false" - "-X github.com/mattermost/mattermost/server/public/model.MockCWS=false" ]; postInstall = '' @@ -55,7 +67,12 @@ buildGoModule rec { find $out/{client,i18n,fonts,templates,config} -type f -exec chmod -x {} \; ''; - passthru.tests.mattermost = nixosTests.mattermost; + passthru = { + updateScript = nix-update-script { + extraArgs = [ "--version-regex" "^v(9\.5\.([0-9.]+))" ]; + }; + tests.mattermost = nixosTests.mattermost; + }; meta = with lib; { description = "Mattermost is an open source platform for secure collaboration across the entire software development lifecycle"; |