mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
a3e7a80c7e
Fixes MMSA-2023-00224, MMSA-2023-00230, MMSA-2023-00222, MMSA-2023-00223, MMSA-2023-00217, MMSA-2023-00210, MMSA-2023-00234, MMSA-2023-00232 and MMSA-2023-00239. Mattermost 7.10.x is EOL, this contribution moves to the 8.1.x branch which is the new ESR. Changelog can be found here: https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-0-major-release https://docs.mattermost.com/install/self-managed-changelog.html#release-v8-1-extended-support-release
57 lines
1.8 KiB
Nix
57 lines
1.8 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, fetchurl
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mattermost";
|
|
version = "8.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mattermost";
|
|
repo = "mattermost";
|
|
rev = "v${version}";
|
|
hash = "sha256-hOt3xqrCs7akWyCv/6keiZN0ReF2adwiQNVibKFG3mk=";
|
|
} + "/server";
|
|
|
|
webapp = fetchurl {
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
|
hash = "sha256-cIfUIGp51dyfmY3LnV+1F9CX+y5XyTCez6R8TLLz9fo=";
|
|
};
|
|
|
|
vendorHash = "sha256-3OZUWg4e2h7g15FXxiFKk2EXceHP4phBTpyy/uY2Ni4=";
|
|
|
|
subPackages = [ "cmd/mattermost" ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/mattermost/mattermost/server/public/model.Version=${version}"
|
|
"-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-nixpkgs"
|
|
"-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01"
|
|
"-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}"
|
|
"-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=v${version}"
|
|
"-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false"
|
|
];
|
|
|
|
postInstall = ''
|
|
tar --strip 1 --directory $out -xf $webapp \
|
|
mattermost/{client,i18n,fonts,templates,config}
|
|
|
|
# For some reason a bunch of these files are executable
|
|
find $out/{client,i18n,fonts,templates,config} -type f -exec chmod -x {} \;
|
|
'';
|
|
|
|
passthru.tests.mattermost = nixosTests.mattermost;
|
|
|
|
meta = with lib; {
|
|
description = "Mattermost is an open source platform for secure collaboration across the entire software development lifecycle";
|
|
homepage = "https://www.mattermost.org";
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
maintainers = with maintainers; [ ryantm numinit kranzes ];
|
|
};
|
|
}
|