2021-10-17 09:34:42 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, buildGoModule, buildEnv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "5.37.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
mattermost-server = buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "mattermost-server";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattermost";
|
2021-10-17 09:34:42 +00:00
|
|
|
repo = pname;
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-ddK7gxWl1arCtW2vqmon28AAeyZQPYlbGj3QtOlqtiU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
2021-10-17 09:34:42 +00:00
|
|
|
"-s" "-w" "-X github.com/mattermost/mattermost-server/v${lib.versions.major version}/model.BuildNumber=${version}"
|
2021-08-27 14:25:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
mattermost-webapp = stdenv.mkDerivation {
|
|
|
|
pname = "mattermost-webapp";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-G6L8Ct6PtARg2LKxcoFyg9vrDJXIKGByxovquMc6p00=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
tar --strip 1 --directory $out -xf $src \
|
|
|
|
mattermost/client \
|
|
|
|
mattermost/i18n \
|
|
|
|
mattermost/fonts \
|
|
|
|
mattermost/templates \
|
|
|
|
mattermost/config
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
buildEnv {
|
|
|
|
name = "mattermost-${version}";
|
|
|
|
paths = [ mattermost-server mattermost-webapp ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open-source, self-hosted Slack-alternative";
|
|
|
|
homepage = "https://www.mattermost.org";
|
|
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
|
|
maintainers = with maintainers; [ fpletz ryantm ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|