2022-06-21 01:24:30 +02:00
|
|
|
{ lib
|
2022-06-29 23:13:54 +02:00
|
|
|
, buildGoModule
|
2022-06-21 01:24:30 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
2022-06-29 23:13:54 +02:00
|
|
|
buildGoModule rec {
|
2022-06-21 01:24:30 +02:00
|
|
|
pname = "mattermost";
|
2022-11-20 03:43:37 +01:00
|
|
|
version = "7.5.1";
|
2022-06-21 01:24:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattermost";
|
|
|
|
repo = "mattermost-server";
|
|
|
|
rev = "v${version}";
|
2022-11-20 03:43:37 +01:00
|
|
|
sha256 = "sha256-uaud5yCJTV3/+5eqHvIurxM1EPtetTWeFTjkPKYmFiA=";
|
2022-06-21 01:24:30 +02:00
|
|
|
};
|
2018-05-16 19:09:19 +02:00
|
|
|
|
2022-06-21 01:24:30 +02:00
|
|
|
webapp = fetchurl {
|
|
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
2022-11-20 03:43:37 +01:00
|
|
|
sha256 = "sha256-DdQjXo3n13qt62iFWhSWuTcEXJiHLGdkWn8ulqvzTI0=";
|
2016-08-15 03:17:05 +02:00
|
|
|
};
|
|
|
|
|
2022-09-16 06:41:08 +02:00
|
|
|
vendorSha256 = "sha256-qZQXNVbJZDddVE+xk6F8XJCEg5dhhuXz68wcn2Uvmxk=";
|
2021-12-31 09:15:17 +01:00
|
|
|
|
2022-06-21 01:24:30 +02:00
|
|
|
subPackages = [ "cmd/mattermost" ];
|
2021-12-31 09:15:17 +01:00
|
|
|
|
2022-06-21 01:24:30 +02:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/mattermost/mattermost-server/v6/model.Version=${version}"
|
|
|
|
];
|
2021-12-31 09:15:17 +01:00
|
|
|
|
2022-06-21 01:24:30 +02:00
|
|
|
postInstall = ''
|
|
|
|
tar --strip 1 --directory $out -xf $webapp \
|
|
|
|
mattermost/{client,i18n,fonts,templates,config}
|
2018-05-16 19:09:19 +02:00
|
|
|
|
2022-06-21 01:24:30 +02: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 19:09:19 +02:00
|
|
|
|
2022-06-21 01:24:30 +02:00
|
|
|
passthru.tests.mattermost = nixosTests.mattermost;
|
2022-01-24 00:56:02 +01:00
|
|
|
|
2022-06-21 01:24:30 +02: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 14:13:56 +02:00
|
|
|
maintainers = with maintainers; [ ryantm numinit kranzes ];
|
2016-08-15 03:17:05 +02:00
|
|
|
};
|
2022-06-21 01:24:30 +02:00
|
|
|
}
|