2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, buildGoPackage, buildEnv }:
|
2016-08-15 01:17:05 +00:00
|
|
|
|
2018-02-23 17:50:33 +00:00
|
|
|
let
|
2021-03-18 14:28:05 +00:00
|
|
|
version = "5.32.1";
|
2018-02-23 17:50:33 +00:00
|
|
|
|
2018-05-16 17:09:19 +00:00
|
|
|
mattermost-server = buildGoPackage rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "mattermost-server";
|
|
|
|
inherit version;
|
2016-08-15 01:17:05 +00:00
|
|
|
|
2018-05-16 17:09:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mattermost";
|
|
|
|
repo = "mattermost-server";
|
|
|
|
rev = "v${version}";
|
2021-03-18 14:28:05 +00:00
|
|
|
sha256 = "BssrTfkIxUbXYXIfz9i+5b4rEYSzBim+/riK78m8Bxo=";
|
2018-05-16 17:09:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/mattermost/mattermost-server";
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}
|
|
|
|
'';
|
|
|
|
|
2016-08-15 01:17:05 +00:00
|
|
|
};
|
|
|
|
|
2018-05-16 17:09:19 +00:00
|
|
|
mattermost-webapp = stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "mattermost-webapp";
|
|
|
|
inherit version;
|
2018-05-16 17:09:19 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://releases.mattermost.com/${version}/mattermost-${version}-linux-amd64.tar.gz";
|
2021-03-18 14:28:05 +00:00
|
|
|
sha256 = "kRerl3fYRTrotj86AIFSor3GpjhABkCmego1ms9HmkQ=";
|
2018-05-16 17:09:19 +00: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 01:17:05 +00:00
|
|
|
};
|
2018-05-16 17:09:19 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
buildEnv {
|
|
|
|
name = "mattermost-${version}";
|
|
|
|
paths = [ mattermost-server mattermost-webapp ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-05-16 17:09:19 +00:00
|
|
|
description = "Open-source, self-hosted Slack-alternative";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.mattermost.org";
|
2018-05-16 17:09:19 +00:00
|
|
|
license = with licenses; [ agpl3 asl20 ];
|
|
|
|
maintainers = with maintainers; [ fpletz ryantm ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|