2018-05-16 18:09:19 +01:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
|
2016-08-15 02:17:05 +01:00
|
|
|
|
2018-02-23 17:50:33 +00:00
|
|
|
let
|
2020-07-17 18:46:55 +01:00
|
|
|
version = "5.25.0";
|
2018-02-23 17:50:33 +00:00
|
|
|
|
2018-05-16 18:09:19 +01:00
|
|
|
mattermost-server = buildGoPackage rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "mattermost-server";
|
|
|
|
inherit version;
|
2016-08-15 02:17:05 +01:00
|
|
|
|
2018-05-16 18:09:19 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattermost";
|
|
|
|
repo = "mattermost-server";
|
|
|
|
rev = "v${version}";
|
2020-07-17 18:46:55 +01:00
|
|
|
sha256 = "002mbpgsk988pfjla84ngixq4jmgjgr3gj3h874y1njgz8xq0d92";
|
2018-05-16 18:09:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/mattermost/mattermost-server";
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}
|
|
|
|
'';
|
|
|
|
|
2016-08-15 02:17:05 +01:00
|
|
|
};
|
|
|
|
|
2018-05-16 18:09:19 +01:00
|
|
|
mattermost-webapp = stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "mattermost-webapp";
|
|
|
|
inherit version;
|
2018-05-16 18:09:19 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
2020-07-17 18:46:55 +01:00
|
|
|
sha256 = "08sp4idms7qyafk59plfzk380r72bphqa3ka648v25wh5h3293pn";
|
2018-05-16 18:09:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
tar --strip 1 --directory $out -xf $src \
|
|
|
|
mattermost/client \
|
|
|
|
mattermost/i18n \
|
|
|
|
mattermost/fonts \
|
|
|
|
mattermost/templates \
|
|
|
|
mattermost/config
|
|
|
|
'';
|
2016-08-15 02:17:05 +01:00
|
|
|
};
|
2018-05-16 18:09:19 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
buildEnv {
|
|
|
|
name = "mattermost-${version}";
|
|
|
|
paths = [ mattermost-server mattermost-webapp ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Open-source, self-hosted Slack-alternative";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.mattermost.org";
|
2018-05-16 18:09:19 +01:00
|
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
|
|
maintainers = with maintainers; [ fpletz ryantm ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|