2022-06-20 23:24:30 +00:00
|
|
|
{ lib
|
2022-06-29 21:13:54 +00:00
|
|
|
, buildGoModule
|
2022-06-20 23:24:30 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
2022-06-29 21:13:54 +00:00
|
|
|
buildGoModule rec {
|
2022-06-20 23:24:30 +00:00
|
|
|
pname = "mattermost";
|
2022-07-16 12:46:30 +00:00
|
|
|
version = "7.1.1";
|
2022-06-20 23:24:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattermost";
|
|
|
|
repo = "mattermost-server";
|
|
|
|
rev = "v${version}";
|
2022-07-16 12:46:30 +00:00
|
|
|
sha256 = "sha256-eo+NfV4S8utWdmYvp+F0sNlgptIC0zNXWXMrh7xfqN8=";
|
2022-06-20 23:24:30 +00:00
|
|
|
};
|
2018-05-16 17:09:19 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
webapp = fetchurl {
|
|
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
2022-07-16 12:46:30 +00:00
|
|
|
sha256 = "sha256-NqCZyUdbw3OrQRuPH6NSWYhHKG3R4QHlH9IVIbIPEeU=";
|
2016-08-15 01:17:05 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 20:42:42 +00:00
|
|
|
vendorSha256 = "sha256-98riYN6MaBsKyaueogjXI7x3Lcionk0xcGt4DH684QU=";
|
2021-12-31 08:15:17 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
subPackages = [ "cmd/mattermost" ];
|
2021-12-31 08:15:17 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/mattermost/mattermost-server/v6/model.Version=${version}"
|
|
|
|
];
|
2021-12-31 08:15:17 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
tar --strip 1 --directory $out -xf $webapp \
|
|
|
|
mattermost/{client,i18n,fonts,templates,config}
|
2018-05-16 17:09:19 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
# For some reason a bunch of these files are executable
|
|
|
|
find $out/{client,i18n,fonts,templates,config} -type f -exec chmod -x {} \;
|
|
|
|
'';
|
2018-05-16 17:09:19 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
passthru.tests.mattermost = nixosTests.mattermost;
|
2022-01-23 23:56:02 +00:00
|
|
|
|
2022-06-20 23:24:30 +00:00
|
|
|
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 ];
|
2022-08-03 12:13:56 +00:00
|
|
|
maintainers = with maintainers; [ ryantm numinit kranzes ];
|
2016-08-15 01:17:05 +00:00
|
|
|
};
|
2022-06-20 23:24:30 +00:00
|
|
|
}
|